Andrew-Shay / Neuron

Python project for creating desktop applications with HTML and Javascript
MIT License
93 stars 10 forks source link

Linux, Python3, wxPython4 - app freezes without rendering anything #13

Open azmathmoosa opened 6 years ago

azmathmoosa commented 6 years ago

Hi, I cloned the repo, installed prerquisites installed wxPython4 and ran the command $ python3 neuron/__main__.py

The app started with a window with nothing but white. And it froze after a few seconds.

2018-04-24 16:42:52,585 neuron INFO     Neuron v2.0.0
2018-04-24 16:42:52,585 neuron DEBUG    _program_files: '/tmp/'
2018-04-24 16:42:52,585 neuron DEBUG    log path: '/work/21_DeepSight/attendance/app/Neuron/neuron/neuron.log'
2018-04-24 16:42:52,586 neuron INFO     ROOT_PATH: '/work/21_DeepSight/attendance/app/Neuron/neuron'
2018-04-24 16:42:52,586 neuron INFO     WRITE_PATH: '/work/21_DeepSight/attendance/app/Neuron/neuron'
[wxpython.py] CEF Python 57.0
[wxpython.py] Python 3.5.2 64bit
[wxpython.py] wxPython 4.0.1 gtk3 (phoenix)
creating cefapp
init got called
[0424/164252.808147:ERROR:sandbox_linux.cc(343)] InitializeSandbox() called with multiple threads in process gpu-process. 
preinit got called
[0424/164252.843109:ERROR:child_thread_impl.cc(762)] Request for unknown Channel-associated interface: ui::mojom::GpuMain
PORT: 38293
Killed

I tried debugging but it seems one needs to know intricacies of wxPython and cefpython.

I've installed pip install cefpython==57

I modified some code and made it run with python2 and it works.

$ python2 neuron/__main__.py 
2018-04-24 16:47:45,558 neuron INFO     Neuron v2.0.0
2018-04-24 16:47:45,558 neuron DEBUG    _program_files: '/tmp/'
2018-04-24 16:47:45,558 neuron DEBUG    log path: '/work/21_DeepSight/attendance/app/Neuron/neuron/neuron.log'
2018-04-24 16:47:45,558 neuron INFO     ROOT_PATH: '/work/21_DeepSight/attendance/app/Neuron/neuron'
2018-04-24 16:47:45,558 neuron INFO     WRITE_PATH: '/work/21_DeepSight/attendance/app/Neuron/neuron'
[wxpython.py] CEF Python 57.0
[wxpython.py] Python 2.7.12 64bit
[wxpython.py] wxPython 3.0.2.0 gtk2 (classic)
creating cefapp
init got called
preinit got called
[0424/164745.791440:ERROR:sandbox_linux.cc(343)] InitializeSandbox() called with multiple threads in process gpu-process. 
[0424/164745.813487:ERROR:child_thread_impl.cc(762)] Request for unknown Channel-associated interface: ui::mojom::GpuMain
PORT: 50581
trying to load
::1 - - [2018-04-24 16:47:46] "GET / HTTP/1.1" 200 6480 0.010686
::1 - - [2018-04-24 16:47:46] "GET /static/css/bootstrap.css HTTP/1.1" 200 178458 0.009771
::1 - - [2018-04-24 16:47:46] "GET /static/css/starter-template.css HTTP/1.1" 200 396 0.000906
::1 - - [2018-04-24 16:47:46] "GET /static/js/popper.min.js HTTP/1.1" 200 19490 0.000887
::1 - - [2018-04-24 16:47:46] "GET /static/js/bootstrap.min.js HTTP/1.1" 200 49246 0.000899
[wxpython.py] OnClose called

So there is some issue that I'm unable to debug. Can you suggest a solution?

Andrew-Shay commented 6 years ago

@azmathmoosa Thanks for posting about this issue. I have only tested this on Windows 10.
What Linux distro and version are you using?

azmathmoosa commented 6 years ago

@Andrew-Shay Ubuntu 16.04 x64. The issue has to do with wxPython 4.0. I think.

kangvcar commented 3 years ago

@Andrew-Shay I also encountered the same problem.

image