obfs4proxy.go crash on opening socket
Opened this issue · 2 comments
When I connect to the obfs4proxy/meek_list instance local socks port to configure it (https://github.com/guardianproject/AndroidPluggableTransports/blob/master/APTDispatchLibrary-MeekObfs4-Full/src/main/java/info/pluggabletransports/dispatch/transports/MeekTransport.java#L113), the crash below happens
05-08 22:33:22.234 20763-0/info.pluggabletransports.sample E/Go: panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x8 pc=0x7678ff5034]
goroutine 20 [running]:
gitlab.com/pluggable-transports/goptbundle/obfs4proxy.(*termMonitor).onHandlerStart(...)
/home/hans/go/src/gitlab.com/pluggable-transports/goptbundle/obfs4proxy/termmon.go:51
gitlab.com/pluggable-transports/goptbundle/obfs4proxy.clientHandler(0x767912a4a0, 0x442013e0a0, 0x767912b800, 0x4420140010, 0x0)
/home/hans/go/src/gitlab.com/pluggable-transports/goptbundle/obfs4proxy/obfs4proxy.go:140 +0x54
created by gitlab.com/pluggable-transports/goptbundle/obfs4proxy.clientAcceptLoop
05-08 22:33:22.235 20763-0/info.pluggabletransports.sample E/Go: /home/hans/go/src/gitlab.com/pluggable-transports/goptbundle/obfs4proxy/obfs4proxy.go:134 +0x10c
05-08 22:33:22.235 20763-20839/info.pluggabletransports.sample A/libc: Fatal signal 6 (SIGABRT), code -6 in tid 20839 (AsyncTask #1), pid 20763 (ansports.sample)
I found the issue... in your new Load() method, you don't call the "// Initialize the termination state monitor as soon as possible.
termMon = newTermMonitor()"
that is in the Main() code