I have an android device running the current playstore version (v4.10.0.39) of ATAK. I am running goatak version server_0.14.6_linux_amd64. I can connect from ATAK to the server using port 8999, however if I disconnect (uncheck the box beside the server profile in ATAK) from the server it crashes.
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0xb154bb]
goroutine 22 [running]:
main.(*App).RemoveHandlerCb(0xc000290a90, {0xebe720, 0xc000342680})
github.com/kdudkov/goatak/cmd/goatak_server/main.go:203 +0x15b
github.com/kdudkov/goatak/internal/client.(*ConnClientHandler).stopHandle(0xc0000a61a0?)
github.com/kdudkov/goatak/internal/client/client_handler.go:360 +0xda
github.com/kdudkov/goatak/internal/client.(*ConnClientHandler).handleRead(0xc000342680)
github.com/kdudkov/goatak/internal/client/client_handler.go:224 +0x723
created by github.com/kdudkov/goatak/internal/client.(*ConnClientHandler).Start in goroutine 38
github.com/kdudkov/goatak/internal/client/client_handler.go:131 +0xed
I also tested this with client_0.14.6_linux_amd64 running on the same machine by stopping the client (ctrl+d in the window running the client process) and produced the same result.
$ ./goatak_server
version unknown:0.14.6
{"level":"info","ts":1704493303.925199,"caller":"goatak_server/udpserver.go:15","msg":"listening UDP at :8999"}
{"level":"info","ts":1704493303.925332,"caller":"goatak_server/tcpserver.go:15","msg":"listening TCP at :8999"}
{"level":"info","ts":1704493303.9256148,"caller":"goatak_server/http_server.go:103","msg":"listening admin api calls at :8088"}
{"level":"info","ts":1704493303.9256127,"caller":"goatak_server/http_server.go:103","msg":"listening marti api calls at :8080"}
{"level":"info","ts":1704493303.9257321,"caller":"goatak_server/http_server.go:103","msg":"listening cert api calls at :8446"}
{"level":"info","ts":1704493309.5388691,"caller":"goatak_server/tcpserver.go:29","msg":"TCP connection from 127.0.0.1:54014"}
{"level":"info","ts":1704493309.5389545,"logger":"client tcp:127.0.0.1:54014","caller":"client/client_handler.go:129","msg":"starting","addr":"tcp:127.0.0.1:54014"}
{"level":"info","ts":1704493309.5407484,"logger":"marti_api","caller":"goatak_server/air_gases.go:71","msg":"GET /Marti/api/contacts/all, client: 127.0.0.1:43108, time :564.63µs","user":"","status":200}
{"level":"info","ts":1704493309.540827,"caller":"goatak_server/main.go:213","msg":"new contact: ANDROID-5465737455736572 TestUser"}
{"level":"info","ts":1704493309.5409472,"caller":"goatak_server/processors.go:95","msg":"new contact ANDROID-5465737455736572 (TestUser) a-f-G-U-C"}
{"level":"info","ts":1704493309.5410256,"logger":"client tcp:127.0.0.1:54014","caller":"client/client_handler.go:258","msg":"client tcp:127.0.0.1:54014 switch to v.1","addr":"tcp:127.0.0.1:54014"}
{"level":"info","ts":1704493323.4859045,"logger":"client tcp:127.0.0.1:54014","caller":"client/client_handler.go:180","msg":"EOF","addr":"tcp:127.0.0.1:54014"}
{"level":"info","ts":1704493323.4859793,"logger":"client tcp:127.0.0.1:54014","caller":"client/client_handler.go:351","msg":"stopping","addr":"tcp:127.0.0.1:54014"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x68 pc=0xb154bb]
goroutine 53 [running]:
main.(*App).RemoveHandlerCb(0xc0001f7790, {0xebe720, 0xc00055a340})
github.com/kdudkov/goatak/cmd/goatak_server/main.go:203 +0x15b
github.com/kdudkov/goatak/internal/client.(*ConnClientHandler).stopHandle(0xc000112410?)
github.com/kdudkov/goatak/internal/client/client_handler.go:360 +0xda
github.com/kdudkov/goatak/internal/client.(*ConnClientHandler).handleRead(0xc00055a340)
github.com/kdudkov/goatak/internal/client/client_handler.go:224 +0x723
created by github.com/kdudkov/goatak/internal/client.(*ConnClientHandler).Start in goroutine 13
github.com/kdudkov/goatak/internal/client/client_handler.go:131 +0xed
I have an android device running the current playstore version (v4.10.0.39) of ATAK. I am running goatak version server_0.14.6_linux_amd64. I can connect from ATAK to the server using port 8999, however if I disconnect (uncheck the box beside the server profile in ATAK) from the server it crashes.
I also tested this with client_0.14.6_linux_amd64 running on the same machine by stopping the client (ctrl+d in the window running the client process) and produced the same result.