EFB app and version: (e.g., WingX Pro7 8.6.2) - FlightView
EFB platform: (e.g., iOS 9.2) - iOS 14.4
EFB hardware: (e.g., iPad Mini 2) - n/a
Description of your issue:
This is a rare (I've seen it twice in hundreds of hours of operations) crash caused by the loop in the function that processes the message log into stats coming up short (index off by 1) due to another Go routine making changes to the array while the stats generator is running. Here's the output:
panic: runtime error: index out of range [13132] with length 13132
goroutine 43 [running]:
main.updateMessageStats()
/root/flightbox/main/gen_gdl90.go:831 +0x7c8
main.heartBeatSender()
/root/flightbox/main/gen_gdl90.go:809 +0x3b4
created by main.main
/root/flightbox/main/gen_gdl90.go:1956 +0xd2c
The line numbers are a bit off from the official 1.6 build as this is running in my fork, but the code in question hasn't changed.
I think the solution here is to wrap a read/write mutex (RWMutex) around any changes to the MsgLog array.
Stratux version: v1.6r1
Stratux config:
SDR
GPS
AHRS
power source: ship's power via 2.5 amp buck reg
usb cable: n/a
EFB app and version: (e.g., WingX Pro7 8.6.2) - FlightView
EFB platform: (e.g., iOS 9.2) - iOS 14.4
EFB hardware: (e.g., iPad Mini 2) - n/a
Description of your issue:
This is a rare (I've seen it twice in hundreds of hours of operations) crash caused by the loop in the function that processes the message log into stats coming up short (index off by 1) due to another Go routine making changes to the array while the stats generator is running. Here's the output:
The line numbers are a bit off from the official 1.6 build as this is running in my fork, but the code in question hasn't changed.
I think the solution here is to wrap a read/write mutex (RWMutex) around any changes to the MsgLog array.
If possible, enable "Replay Logs", reproduce the problem, and provide a copy of the logs in http://192.168.10.1/logs/stratux/ and http://192.168.10.1/logs/stratux.log.