Closed theonlydude closed 3 years ago
Thanks for the report! I'll look into it.
Fixed in v0.0.38
Thanks for the fix.
I've just tried the v0.0.41 release and I have a different crash now when I close RetroArch:
2021/08/01 18:38:36.890934 sni v0.0.41 139186ea built on 2021-08-01T16:21:14 by go 2021/08/01 18:38:36.890947 logging to '/home/dude/.sni/sni-2021-08-01T20-38-36-889Z.log' 2021/08/01 18:38:36.890950 config: load 2021/08/01 18:38:36.891055 error: Config File "config" Not Found in "[/home/dude/.sni]" 2021/08/01 18:38:36.891212 error: Config File "apps" Not Found in "[/home/dude/.sni]" 2021/08/01 18:38:36.891281 Read env var SNI_FXPAKPRO_DISABLE: not found; defaulting to '0' 2021/08/01 18:38:36.891290 Read env var SNI_EMUNW_DISABLE: not found; defaulting to '0' 2021/08/01 18:38:36.891295 Read env var SNI_EMUNW_HOSTS: not found; defaulting to 'localhost:65400,localhost:65401,localhost:65402,localhost:65403,localhost:65404,localhost:65405,localhost:65406,localhost:65407,localhost:65408,localhost:65409' 2021/08/01 18:38:36.892021 Read env var SNI_EMUNW_DETECT_LOG: not found; defaulting to '0' 2021/08/01 18:38:36.892034 Read env var SNI_LUABRIDGE_LISTEN_HOST: not found; defaulting to '0.0.0.0' 2021/08/01 18:38:36.892037 Read env var SNI_LUABRIDGE_LISTEN_PORT: not found; defaulting to '65398' 2021/08/01 18:38:36.892043 Read env var SNI_RETROARCH_DISABLE: not found; defaulting to '0' 2021/08/01 18:38:36.892046 Read env var SNI_RETROARCH_HOSTS: not found; defaulting to 'localhost:55355' 2021/08/01 18:38:36.892084 Read env var SNI_RETROARCH_DETECT_LOG: not found; defaulting to '0' 2021/08/01 18:38:36.892089 Read env var SNI_MOCK_ENABLE: not found; defaulting to '0' 2021/08/01 18:38:36.892092 Read env var SNI_GRPC_LISTEN_HOST: not found; defaulting to '0.0.0.0' 2021/08/01 18:38:36.892094 Read env var SNI_GRPC_LISTEN_PORT: not found; defaulting to '8191' 2021/08/01 18:38:36.893142 luabridge: listening on 0.0.0.0:65398 2021/08/01 18:38:36.893167 grpc: listening on 0.0.0.0:8191 2021/08/01 18:38:36.893194 Read env var SNI_USB2SNES_DISABLE: not found; defaulting to '0' 2021/08/01 18:38:36.893197 Read env var SNI_USB2SNES_LISTEN_ADDRS: not found; defaulting to '0.0.0.0:23074,0.0.0.0:8080' 2021/08/01 18:38:36.893300 usb2snes: listening on 0.0.0.0:8080 2021/08/01 18:38:36.893318 usb2snes: listening on 0.0.0.0:23074
(sni:5481): Gdk-CRITICAL **: 20:38:37.347: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed 2021/08/01 18:39:07.585023 usb2snes: 127.0.0.1:51530: connected 2021/08/01 18:39:07.612185 127.0.0.1:55355: connect to server '127.0.0.1:55355' 2021/08/01 18:39:07.612249 127.0.0.1:55355: connected to server '127.0.0.1:55355' 2021/08/01 18:39:07.626446 detect: read {address:(FxPakPro $007fb0 LoROM),size:$50} 2021/08/01 18:39:07.646053 detect: read {address:(FxPakPro $007fb0 LoROM),deviceAddress:(SnesABus $80ffb0 LoROM),size:$50} complete: score=23 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000010 53 75 70 65 72 20 4d 65 74 72 6f 69 64 20 20 20 |Super Metroid | 00000020 20 20 20 20 20 30 02 0c 03 00 01 00 df 0a 20 f5 | 0........ .| 00000030 73 85 73 85 73 85 73 85 73 85 83 95 73 85 6a 98 |s.s.s.s.s...s.j.| 00000040 73 85 73 85 73 85 73 85 73 85 73 85 1c 84 73 85 |s.s.s.s.s.s...s.| 2021/08/01 18:39:07.646081 detect: read {address:(FxPakPro $007fb0 HiROM),size:$50} 2021/08/01 18:39:07.661181 detect: read {address:(FxPakPro $007fb0 HiROM),deviceAddress:(SnesABus $00ffb0 HiROM),size:$50} complete: score=23 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000010 53 75 70 65 72 20 4d 65 74 72 6f 69 64 20 20 20 |Super Metroid | 00000020 20 20 20 20 20 30 02 0c 03 00 01 00 df 0a 20 f5 | 0........ .| 00000030 73 85 73 85 73 85 73 85 73 85 83 95 73 85 6a 98 |s.s.s.s.s...s.j.| 00000040 73 85 73 85 73 85 73 85 73 85 73 85 1c 84 73 85 |s.s.s.s.s.s...s.| 2021/08/01 18:39:07.661271 detect: read {address:(FxPakPro $007fb0 ExHiROM),size:$50} 2021/08/01 18:39:07.677699 detect: map mode 20 2021/08/01 18:39:07.677779 detect: detected mapping mode = LoROM 2021/08/01 18:39:07.677899 usb2snes: 127.0.0.1:51530: Name 'VARIA Tracker' panic: runtime error: invalid memory address or nil pointer dereference [signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x5d64a6]
goroutine 151 [running]: net.(UDPConn).ReadFromUDP(0x0, 0xc00055e000, 0x10000, 0x10000, 0x0, 0x0, 0x409dab, 0xc000282120) /opt/hostedtoolcache/go/1.16.6/x64/src/net/udpsock.go:103 +0x26 sni/udpclient.(UDPClient).ReadWithDeadline(0xc000792000, 0xc039d87f28004cad, 0x1293713a96, 0x1062ca0, 0xc00001c240, 0x0, 0x0, 0x0, 0x0) /home/runner/work/sni/sni/udpclient/udpclient.go:83 +0xd0 sni/snes/drivers/retroarch.(*RAClient).handleIncoming(0xc000792000) /home/runner/work/sni/sni/snes/drivers/retroarch/raclient.go:481 +0xba created by sni/snes/drivers/retroarch.NewRAClient /home/runner/work/sni/sni/snes/drivers/retroarch/raclient.go:92 +0xf7
v0.0.38 doesn't crash, the log when I close the RetroArch window:
2021/08/01 18:43:51.626789 usb2snes: VARIA Tracker: GetAddress error: write udp 127.0.0.1:55143->127.0.0.1:55355: write: connection refused 2021/08/01 18:43:51.626851 usb2snes: VARIA Tracker: 127.0.0.1:52232 disconnected
Sorry about that. Should be fixed now in v0.0.42
just tried v0.0.43 and it no longer crash. thank you.
Hello,
I've tried SNI and it works out of the box as a replacement for QUsb2snes, but when I close the RetroArch window SNI crashes with "panic: send on closed channel".
SNI: sni-v0.0.37-linux-amd64.tar.gz RetroArch: 1.9.6 with bsnes-mercury Balanced core OS: Linux Mint 19.1 Tessa
dude@computer:~/download/sni$ ./sni 2021/08/01 09:51:19.574670 sni v0.0.37 d3445d97 built on 2021-08-01T05:44:48 by go 2021/08/01 09:51:19.574684 logging to '/home/dude/.sni/sni-2021-08-01T11-51-19-574Z.log' 2021/08/01 09:51:19.574687 config: load 2021/08/01 09:51:19.574758 error: Config File "config" Not Found in "[/home/dude/.sni]" 2021/08/01 09:51:19.574928 error: Config File "apps" Not Found in "[/home/dude/.sni]" 2021/08/01 09:51:19.574961 Read env var SNI_FXPAKPRO_DISABLE: not found; defaulting to '0' 2021/08/01 09:51:19.574969 Read env var SNI_EMUNW_DISABLE: not found; defaulting to '0' 2021/08/01 09:51:19.574977 Read env var SNI_EMUNW_HOSTS: not found; defaulting to 'localhost:65400,localhost:65401,localhost:65402,localhost:65403,localhost:65404,localhost:65405,localhost:65406,localhost:65407,localhost:65408,localhost:65409' 2021/08/01 09:51:19.575612 Read env var SNI_EMUNW_DETECT_LOG: not found; defaulting to '0' 2021/08/01 09:51:19.575621 Read env var SNI_LUABRIDGE_LISTEN_HOST: not found; defaulting to '0.0.0.0' 2021/08/01 09:51:19.575624 Read env var SNI_LUABRIDGE_LISTEN_PORT: not found; defaulting to '65398' 2021/08/01 09:51:19.575630 Read env var SNI_RETROARCH_DISABLE: not found; defaulting to '0' 2021/08/01 09:51:19.575633 Read env var SNI_RETROARCH_HOSTS: not found; defaulting to 'localhost:55355' 2021/08/01 09:51:19.575662 Read env var SNI_RETROARCH_DETECT_LOG: not found; defaulting to '0' 2021/08/01 09:51:19.575671 Read env var SNI_MOCK_ENABLE: not found; defaulting to '0' 2021/08/01 09:51:19.575674 Read env var SNI_GRPC_LISTEN_HOST: not found; defaulting to '0.0.0.0' 2021/08/01 09:51:19.575676 Read env var SNI_GRPC_LISTEN_PORT: not found; defaulting to '8191' 2021/08/01 09:51:19.576704 luabridge: listening on 0.0.0.0:65398 2021/08/01 09:51:19.576730 Read env var SNI_USB2SNES_DISABLE: not found; defaulting to '0' 2021/08/01 09:51:19.576735 Read env var SNI_USB2SNES_LISTEN_ADDRS: not found; defaulting to '0.0.0.0:23074,0.0.0.0:8080' 2021/08/01 09:51:19.576808 usb2snes: listening on 0.0.0.0:23074 2021/08/01 09:51:19.576836 usb2snes: listening on 0.0.0.0:8080
(sni:7686): Gdk-CRITICAL **: 11:51:20.012: gdk_window_thaw_toplevel_updates: assertion 'window->update_and_descendants_freeze_count > 0' failed 2021/08/01 09:51:43.074560 usb2snes: 127.0.0.1:56202: connected 2021/08/01 09:51:43.095159 127.0.0.1:55355: connect to server '127.0.0.1:55355' 2021/08/01 09:51:43.095195 127.0.0.1:55355: connected to server '127.0.0.1:55355' 2021/08/01 09:51:43.105577 detect: read {address:(FxPakPro $007fb0 LoROM),size:$50} 2021/08/01 09:51:43.122866 detect: read {address:(FxPakPro $007fb0 LoROM),deviceAddress:(SnesABus $80ffb0 LoROM),size:$50} complete: score=23 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000010 53 75 70 65 72 20 4d 65 74 72 6f 69 64 20 20 20 |Super Metroid | 00000020 20 20 20 20 20 30 02 0c 03 00 01 00 df 0a 20 f5 | 0........ .| 00000030 73 85 73 85 73 85 73 85 73 85 83 95 73 85 6a 98 |s.s.s.s.s...s.j.| 00000040 73 85 73 85 73 85 73 85 73 85 73 85 1c 84 73 85 |s.s.s.s.s.s...s.| 2021/08/01 09:51:43.122956 detect: read {address:(FxPakPro $007fb0 HiROM),size:$50} 2021/08/01 09:51:43.146622 detect: read {address:(FxPakPro $007fb0 HiROM),deviceAddress:(SnesABus $00ffb0 HiROM),size:$50} complete: score=23 00000000 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff |................| 00000010 53 75 70 65 72 20 4d 65 74 72 6f 69 64 20 20 20 |Super Metroid | 00000020 20 20 20 20 20 30 02 0c 03 00 01 00 df 0a 20 f5 | 0........ .| 00000030 73 85 73 85 73 85 73 85 73 85 83 95 73 85 6a 98 |s.s.s.s.s...s.j.| 00000040 73 85 73 85 73 85 73 85 73 85 73 85 1c 84 73 85 |s.s.s.s.s.s...s.| 2021/08/01 09:51:43.146652 detect: read {address:(FxPakPro $007fb0 ExHiROM),size:$50} 2021/08/01 09:51:43.154499 detect: map mode 20 2021/08/01 09:51:43.154522 detect: detected mapping mode = LoROM 2021/08/01 09:51:43.154560 usb2snes: 127.0.0.1:56202: Name 'VARIA Tracker' panic: send on closed channel
goroutine 116 [running]: sni/snes/drivers/retroarch.(*RAClient).handleIncoming(0xc0002da000) /home/runner/work/sni/sni/snes/drivers/retroarch/raclient.go:472 +0x245 created by sni/snes/drivers/retroarch.NewRAClient /home/runner/work/sni/sni/snes/drivers/retroarch/raclient.go:92 +0xf7