ncssar / radiolog

SAR radio log program
Other
13 stars 3 forks source link

poll for GPS causes unbound 'widget' errors #733

Open caver456 opened 4 months ago

caver456 commented 4 months ago

3-2-24 R6: image

these errors continued once per second until closing radiolog.

caver456 commented 4 months ago

Comparing with a 'healthy' polling call which just times out due to no response:

145436:polling GPS for fleet=100 device=3038
145436:com data: ☻R31003038♥
145436:fsLog:[['100', '3001', 'SAR 1', False, 'Sun 14:54:19', 'COM2', 1, 0]]
145436:WARNING: 100:3038 has no fsLog entry so it probably has not been heard from yet
145436:getCallsign called for FleetSync fleet=100 dev=3038
145436:  found matching entry/entries:[['100', '3038', 'SAR 38']]
145444:Timed out awaiting FleetSync or NEXEDGE response

It looks like the '0' traffic was received while waiting for a response, and this '0' traffic was never really processed or cleared from the buffer. It doesn't seem to even be related to the polling...?

Need to try some more to track down the source of the '0' traffic, and also to handle it gracefully and clear it from the buffer.

caver456 commented 3 months ago

Here's the full sequence from the problem session:

154946:polling GPS for fleet=100 device=3087
154946:com data: R31003087
154946:fsLog:[['100', '1301', 'SnowCat 1', False, 'Sat 15:35:55', 'COM4', 0, 1]]
154946:WARNING: 100:3087 has no fsLog entry so it probably has not been heard from yet
154946:getCallsign called for FleetSync fleet=100 dev=3087
154946:  found matching entry/entries:[['100', '3087', 'SAR 87']]
154948:PARSING
154948:0
154948: line:0
154948:checking for existing open new entry tabs: callsign= continueSec=20
Uncaught exception
Traceback (most recent call last):
  File "radiolog.py", line 2069, in fsCheck
  File "radiolog.py", line 2479, in fsParse
UnboundLocalError: local variable 'widget' referenced before assignment
154949:PARSING
154949:0
154949: line:0
154949:checking for existing open new entry tabs: callsign= continueSec=20
Uncaught exception
Traceback (most recent call last):
  File "radiolog.py", line 2069, in fsCheck
  File "radiolog.py", line 2479, in fsParse
UnboundLocalError: local variable 'widget' referenced before assignment
154950:PARSING
154950:0
154950: line:0
154950:checking for existing open new entry tabs: callsign= continueSec=20
Uncaught exception
Traceback (most recent call last):
  File "radiolog.py", line 2069, in fsCheck
  File "radiolog.py", line 2479, in fsParse
UnboundLocalError: local variable 'widget' referenced before assignment
154951:PARSING
154951:0
154951: line:0
154951:checking for existing open new entry tabs: callsign= continueSec=20
Uncaught exception
Traceback (most recent call last):
  File "radiolog.py", line 2069, in fsCheck
  File "radiolog.py", line 2479, in fsParse
UnboundLocalError: local variable 'widget' referenced before assignment
154952:PARSING
154952:0
154952: line:0
154952:checking for existing open new entry tabs: callsign= continueSec=20
Uncaught exception
Traceback (most recent call last):
  File "radiolog.py", line 2069, in fsCheck
  File "radiolog.py", line 2479, in fsParse
UnboundLocalError: local variable 'widget' referenced before assignment
154953:PARSING
154953:0
154953: line:0
154953:checking for existing open new entry tabs: callsign= continueSec=20
Uncaught exception
Traceback (most recent call last):
  File "radiolog.py", line 2069, in fsCheck
  File "radiolog.py", line 2479, in fsParse
UnboundLocalError: local variable 'widget' referenced before assignment
154954:PARSING
154954:0
154954: line:0
154954:checking for existing open new entry tabs: callsign= continueSec=20
Uncaught exception
Traceback (most recent call last):
  File "radiolog.py", line 2069, in fsCheck
  File "radiolog.py", line 2479, in fsParse
UnboundLocalError: local variable 'widget' referenced before assignment
154955:Timed out awaiting FleetSync or NEXEDGE response
154955:getCallsign called for FleetSync fleet=100 dev=3087
154955:  found matching entry/entries:[['100', '3087', 'SAR 87']]
154955:newEntry called with these values:
154955:['1549', '', 'SAR 87', 'FLEETSYNC: No response received for location request from 100:3087 (SAR 87)', '', '', 1709423395.0814044, '', '', '']
154955:new team: newTeamName=SAR 87 extTeamName=z_SAR00087 niceTeamName=SAR 87 shortNiceTeamName=SAR87
154955:extTeamNameList before sort:['dummy', 'z_SAR00087']
154955:grouped tabs:{'NCSOcmd': [], 'NCSO': [], 'NCPD': [], 'TPD': [], 'GVPD': [], 'CHP': [], 'Numbers': [], 'other': ['dummy', 'z_SAR00087']}
154955:extTeamNameList after sort:['spacerLeft', 'z_SAR00087']
154955:setting tab initial style in addTab: #tab_spacerLeft { font-size:20px;background:none;padding-left:1px;padding-right:1px }
154955:setting tab initial style in addTab: #tab_z_SAR00087 { font-size:20px;background:none;padding-left:1px;padding-right:1px }
154955:teamNotesBuildTooltip called for z_SAR00087
154955:next available hotkey:1
154955:  writing C:\Users\NCSSAR\RadioLog\German_Bar_2024_03_02_154108\German_Bar_2024_03_02_154108.csv
154955:  done writing C:\Users\NCSSAR\RadioLog\German_Bar_2024_03_02_154108\German_Bar_2024_03_02_154108.csv
154955:  writing X:\German_Bar_2024_03_02_154108.csv
154955:  done writing X:\German_Bar_2024_03_02_154108.csv
154955:  writing C:\Users\NCSSAR\RadioLog\German_Bar_2024_03_02_154108\German_Bar_2024_03_02_154108_clueLog.csv
154955:  done writing C:\Users\NCSSAR\RadioLog\German_Bar_2024_03_02_154108\German_Bar_2024_03_02_154108_clueLog.csv
154955:  writing X:\German_Bar_2024_03_02_154108_clueLog.csv
154955:  done writing X:\German_Bar_2024_03_02_154108_clueLog.csv
154956:PARSING
154956:0
154956: line:0
154956:checking for existing open new entry tabs: callsign= continueSec=20
Uncaught exception
Traceback (most recent call last):
  File "radiolog.py", line 2069, in fsCheck
  File "radiolog.py", line 2479, in fsParse
UnboundLocalError: local variable 'widget' referenced before assignment
154956:failed on preferred COM port; no alternate COM port available
154957:PARSING
154957:0
154957: line:0
154957:checking for existing open new entry tabs: callsign= continueSec=20
Uncaught exception
Traceback (most recent call last):
  File "radiolog.py", line 2069, in fsCheck
  File "radiolog.py", line 2479, in fsParse
UnboundLocalError: local variable 'widget' referenced before assignment
...
...

So it seems like it timed out appropriately, but it continued to try to process the 'zero' data every second until the end of the session.

Should probably try to duplicate the 'zero' traffic at R6, since I can't duplicate it at home. Then, after fixing the code, confirm that the 'zero' traffic is handled gracefully.

It would also be good to find out why the tracebacks are happening - is it in a piece of dead code that should never be called anyway, or something to that effect?