TUDelft-CNS-ATM / bluesky

The open source air traffic simulator
GNU General Public License v3.0
388 stars 249 forks source link

GUI closed automatically on windows #421

Open Shulu-Chen opened 2 years ago

Shulu-Chen commented 2 years ago

Hello,

I want to update the BlueSky to the latest version. Clone and create a new env for it. I use python 3.10 and installed all of the packages needed. It works well on macOS, but not ok on windows. The GUI would automatically be closed once I run bluesky.py. No error shows out. Here is the running info:

Using Python-based geo functions
Reading config from settings.cfg
Reading magnetic variation data
Loading global navigation database...
Reading cache: D:\***\data\cache\navdata.p
   *****   BlueSky Open ATM simulator *****
Distributed under GNU General Public License v3
Accepting event connections on port 11000, and stream connections on port 11001
Discovery is disabled
Loading palette bluesky-default
Found Qt-provided OpenGL functions for OpenGL (4, 1) Core
Using Python-based geo functions
Reading config from settings.cfg
Reading magnetic variation data
Loading global navigation database...
Reading cache: D:\***\data\cache\navdata.p
pygame 2.1.2 (SDL 2.0.18, Python 3.10.4)
Hello from the pygame community. https://www.pygame.org/contribute.html
Warning: RTree could not be loaded. areafilter get_intersecting and get_knearest won't work
Using Qt 6.3.1 for windows and widgets
Warning: RTree could not be loaded. areafilter get_intersecting and get_knearest won't work
Successfully loaded OpenAP performance model
Failed to load BADA performance model
Successfully loaded legacy performance model
Reading cache: D:\***\data\cache\aptsurface.p
Qt gui warning: An OpenGL Core Profile was requested, but it is not supported on the current platform. Falling back to a non-Core profile. Note that this might cause rendering issues.
Qt information message: 

GL Type: desktop
Surface Type: OpenGL
Surface Profile: CoreProfile
Surface Version: 4.1
QSG RHI Backend: OpenGL
Using Supported QSG Backend: yes
Using Software Dynamic GL: no
Using Multithreaded OpenGL: yes

Init Parameters:
  *  application-name python 
  *  browser-subprocess-path C:\ProgramData\Anaconda3\envs\bluesky-terminal\lib\site-packages\PyQt6\Qt6\bin\QtWebEngineProcess.exe 
  *  disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture 
  *  disable-speech-api  
  *  enable-features NetworkServiceInProcess,TracingServiceInProcess 
  *  enable-threaded-compositing  
  *  in-process-gpu  
  *  use-gl desktop 

Reading cache: D:\***\data\cache\console_history.p
Successfully loaded plugin AREA
Successfully loaded plugin DATAFEED

Process finished with exit code -1073741819 (0xC0000005)

I guess it perhaps is the issue of OpenGL core or PyQt6 because the older version of BlueSky runs well on my Windows. Thanks a lot for your help!

jooste commented 2 years ago

Hi @Shulu-Chen,

Does the gui show briefly, or not at all? Are you by chance running in a debugging/interactive environment (default in e.g., PyCharm, or Spyder). You could have a look here for several leads.

Another suggestion; since you are running on a clean environment, could you:

Shulu-Chen commented 2 years ago

Hi @jooste,

Thanks for your help, I replaced the PyQt6 with PyQt5, then everything goes well on Windows! Just want to let you know that this issue only happens on the Windows side, while PyQt6 works well on macOS. Here is the pip list on my Windows:

Package           Version
----------------- ---------
certifi           2022.6.15
colorama          0.4.5
commonmark        0.9.1
cycler            0.11.0
fonttools         4.37.1
geographiclib     1.52
geopy             2.2.0
kiwisolver        1.4.4
matplotlib        3.5.3
msgpack           1.0.4
numpy             1.23.2
packaging         21.3
pandas            1.4.4
Pillow            9.2.0
pip               22.1.2
ply               3.11
pygame            2.1.2
Pygments          2.13.0
PyOpenGL          3.1.6
pyparsing         3.0.9
PyQt5             5.15.7
PyQt5-Qt5         5.15.2
PyQt5-sip         12.11.0
PyQtWebEngine     5.15.6
PyQtWebEngine-Qt5 5.15.2
python-dateutil   2.8.2
pytz              2022.2.1
pyzmq             23.2.1
rich              12.5.1
scipy             1.9.1
setuptools        63.4.1
sip               6.6.2
six               1.16.0
textual           0.1.18
toml              0.10.2
tqdm              4.64.0
wheel             0.37.1
wincertstore      0.2
zmq               0.0.0
jtoledo1974 commented 2 years ago

Can confirm I had the same issue on windows.

jooste commented 2 years ago

Hi @jtoledo1974, can you show the output of the command pip list? This is a known problem with Qt6 on Windows, but not with all versions I think.

jtoledo1974 commented 1 year ago

This was on a clean environment I created like

python311 -m venv venv venv\scripts\activate cd bluesky pip install -e .[full]

After it failed to load I uninstalled the qt6 packages to install the qt5 packages as mentioned by Shulu-Chen