Board index FlightGear Support Tools ATC-pie

ATC-pie bug and stop

ATC-pie is a radar air traffic control simulation program for the FlightGear multi-player network.

ATC-pie bug and stop

Postby bavi90 » Tue Feb 09, 2016 7:08 pm

Hi,

sometime, ATC-pie stop and return to the console.

It's happend when a new plane come in radar range, from out. And not when a new plain appair inside the radar range.

(Windows 10, ATC-pie r8b, python 3.4)

C:\ATC-pie-20160202>c:\Python34\python.exe ATC-pie.py LFSB
Reading world navigation data... done.
Session PID 2604 started in AD mode at location LFSB
Traceback (most recent call last):
File "C:\ATC-pie-20160202\GUI\notifier.py", line 255, in notifyNewContact
msg = 'New contact near %s' % env.navpoints.findClosest(coords)
File "C:\ATC-pie-20160202\data\nav.py", line 164, in findClosest
return min(candidates, key=(lambda p: ref.distanceTo(p.coordinates)))
File "C:\ATC-pie-20160202\data\nav.py", line 164, in <lambda>
return min(candidates, key=(lambda p: ref.distanceTo(p.coordinates)))
AttributeError: 'NoneType' object has no attribute 'distanceTo'

C:\ATC-pie-20160202>

I'm a developper, but not with Python.

If somebody can help me.

Thanks a lot.
bavi90
 
Posts: 4
Joined: Tue Feb 09, 2016 11:15 am

Re: ATC-pie bug and stop

Postby mickybadia » Tue Feb 09, 2016 11:17 pm

Thank you for reporting. Questions:
- is it on EVERY entrance into range? (I do not yet see how this can be happening, and only to you)
- are you sure your program crashes ON the messages you report? (reproducing the same cause here leads to same messages but not to crash)
- could we sort this by email so I can get you to try things if needed? (please PM me so we can take this backstage until something informational comes up) I might need to log and simulate things with you

If anything gets fixed, it will have to be an r8c, since a crash is too serious to keep open.
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am

Re: ATC-pie bug and stop

Postby bavi90 » Wed Feb 10, 2016 3:54 pm

Hi,

I'am testing release r7b to see if the same bug appear.

I'll give you news in a few days.
bavi90
 
Posts: 4
Joined: Tue Feb 09, 2016 11:15 am

Re: ATC-pie bug and stop

Postby mickybadia » Wed Feb 10, 2016 6:05 pm

OK, but that is not exactly what I asked so it is probably still better to stick with the latest version... Of course if the behaviour is different it will be an information, but nothing was changed regarding radar detection. Plus, I do see an easy fix for your problem, only I do not see how the conditions for it to occur can be satisfied. So I will soon be hiding the symptom, but I would prefer to rule out any deeper cause.
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am

Re: ATC-pie bug and stop

Postby jaxsin » Sat Feb 20, 2016 1:05 pm

I had this same problem too, I think i may know what the problem was for me, but I could not test it.

I just installed ATC-pie last night, so latest copy out of SF and python 3.4.3 pyQT 5.5

I would hear the chime and see the messages go off in channel with everyone saying 'Hello', then crash. After looking back at chat on my FG client, I see someone was the 'nimitz' the aircraft carrier in the ocean. If that was case and they were really the nimitz model then it seemed to me to appear when that player was logged in. I tried to reload right after a crash only to have an immediate crash. When nimitz wasn't around and in contact range ATC-pie seemed to work. Maybe the OP will verify what airport he was at when it crashed and whether he was playing MP or single player mode.

I can very the same crash with the same error "NoneType" "distanceTo", which seems like a radar contact wasn't able to return a property?
jaxsin
 
Posts: 395
Joined: Mon Dec 28, 2015 4:54 pm

Re: ATC-pie bug and stop

Postby jaxsin » Sat Feb 20, 2016 1:19 pm

ok, well I am having issues again today. Not sure what is up, contact me via PM and I will email you micky and we can diagnose this
jaxsin
 
Posts: 395
Joined: Mon Dec 28, 2015 4:54 pm

Re: ATC-pie bug and stop

Postby mickybadia » Sun Feb 21, 2016 12:17 am

jaxsin wrote in Sat Feb 20, 2016 1:05 pm:I can very the same crash with the same error "NoneType" "distanceTo", which seems like a radar contact wasn't able to return a property?

Do make sure you copy-paste exact console messages instead of digested interpretation of them. I understand you are reporting the same problem as bavi90.
This was an easy fix which has been ready in the dev version and could be tested by OP for a few days. I was only waiting for his/her no-crash news... But since a crash is serious business and it seems not to be just one person, I will release the fix just now. Funnily after months only two users would report that problem. Are you Windows10 like bavi90? Please get r8c and report if problem is persistent.
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am

Re: ATC-pie bug and stop

Postby jaxsin » Sun Feb 21, 2016 1:02 am

mickybadia wrote in Sun Feb 21, 2016 12:17 am:Do make sure you copy-paste exact console messages instead of digested interpretation of them. I understand you are reporting the same problem as bavi90.


Ok sure here you go, hope my interpretation was correct. Not that it matters, MP only, will test r8c per request

Code: Select all
Traceback (most recent call last):
  File "D:\Downloads\ATC-pie-20160202\GUI\notifier.py", line 255, in notifyNewContact
    msg = 'New contact near %s' % env.navpoints.findClosest(coords)
  File "D:\Downloads\ATC-pie-20160202\data\nav.py", line 164, in findClosest
    return min(candidates, key=(lambda p: ref.distanceTo(p.coordinates)))
  File "D:\Downloads\ATC-pie-20160202\data\nav.py", line 164, in <lambda>
    return min(candidates, key=(lambda p: ref.distanceTo(p.coordinates)))
AttributeError: 'NoneType' object has no attribute 'distanceTo'
jaxsin
 
Posts: 395
Joined: Mon Dec 28, 2015 4:54 pm

Re: ATC-pie bug and stop

Postby jaxsin » Sun Feb 21, 2016 2:01 am

Windows 10
py 3.4.3
pyQT5
r8c, I no longer get the other error and i was able to have fun for at least an hour this time before the crash. I think the problem runs a little deeper

Code: Select all
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: 456
WARNING: Visible ACFT with None coords to paint: bo1224
WARNING: Visible ACFT with None coords to paint: bo1224
WARNING: Visible ACFT with None coords to paint: N1224F
WARNING: Visible ACFT with None coords to paint: N1224F
WARNING: Visible ACFT with None coords to paint: N1224F
Traceback (most recent call last):
  File "D:\ATC-pie-20160221\GUI\weather.py", line 60, in run
    update_weather(settings.METAR_station, env.weather)
  File "D:\ATC-pie-20160221\GUI\weather.py", line 46, in update_weather
    if new_weather.isNewerThan(old_weather):
  File "D:\ATC-pie-20160221\data\weather.py", line 212, in isNewerThan
    return day_A < day_B and day_B - day_A > 15 or day_A > day_B and day_A - day_B < 15
TypeError: unsupported operand type(s) for -: 'str' and 'str'
QObject::~QObject: Timers cannot be stopped from another thread
jaxsin
 
Posts: 395
Joined: Mon Dec 28, 2015 4:54 pm

Re: ATC-pie bug and stop

Postby mickybadia » Sun Feb 21, 2016 9:13 am

jaxsin wrote in Sun Feb 21, 2016 2:01 am:r8c, I no longer get the other error and i was able to have fun for at least an hour this time before the crash. I think the problem runs a little deeper

Thank you for posting exact messages. For instance here I can tell that what you call "the crash" is in fact a totally unrelated problem (related to weather updates), which had never occurred either (!) and which I have fixed immediately.

The warning lines though:
jaxsin wrote in Sun Feb 21, 2016 2:01 am:
Code: Select all
WARNING: Visible ACFT with None coords to paint: 456

might well be related to the OP's problem, and I have worked more things to avoid the situation.

Sorry for the inconvenience, but radar visibility has obviously been tested quite extensively for over a year! It seems that Windows 10 might have a different behaviour regarding Qt signal ordering or thread schedulling or something, to me the only reasons for the new situations appearing in this thread. This is in a way pretty good as it makes the code more robust as you report the problems.
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am

Re: ATC-pie bug and stop

Postby jaxsin » Sun Feb 21, 2016 1:54 pm

Just for clarification: It was not till I downloaded and used r8c though that the weather crash happened or the warning messages appeared in console. The original output the OP and I eventually pasted was the console output in r8b.

Will report back on the latest in the meantime, thanks for the quick work
jaxsin
 
Posts: 395
Joined: Mon Dec 28, 2015 4:54 pm

Re: ATC-pie bug and stop

Postby mickybadia » Tue Feb 23, 2016 1:07 pm

OK, as far as I am concerned, r8d should have fixed this all.
If you confirm, you can mark the thread as "solved" EDIT: which I am guessing only OP can do
mickybadia
 
Posts: 475
Joined: Tue Sep 24, 2013 10:12 am


Return to ATC-pie

Who is online

Users browsing this forum: No registered users and 1 guest