projecthorus / horus-gui

Project Horus Telemetry Decoder
GNU General Public License v3.0
35 stars 9 forks source link

Coredump after update to Python 3.12.3 #41

Open Dieter9 opened 5 months ago

Dieter9 commented 5 months ago

My Arch-Linux System was updated to Python 3.12.3. After that, I made full upgrades to horuslib and horus-gui. But when starting horusgui the following Error occurs:

"QWidget: Must construct a QApplication before a QWidget" followed by a coredump.

darksidelemm commented 5 months ago

I don't currently have a Python 3.12 install to test with... Can you paste the full error please?

Also, on most distros it should be possible to have different versions of python installed at the same time, so hopefully you can install python 3.11 as well.

Dieter9 commented 5 months ago

There are not much more error messages:

python3 -m horusgui.gui QWidget: Must construct a QApplication before a QWidget /home/user/Program/ProjectHorus/run-Horus-GUI.sh: Zeile 17: 3194 Abgebrochen (Speicherabzug geschrieben) python3 -m horusgui.gui

in journal:

Mai 01 23:45:23 LINUX systemd[1214]: Started VTE child process 3161 launched by gnome-terminal-server process 2091. Mai 01 23:45:23 LINUX systemd[1]: Started Process Core Dump (PID 3205/UID 0). Mai 01 23:45:24 LINUX systemd-coredump[3206]: [🡕] Process 3194 (python3) of user 1000 dumped core.

                                        Stack trace of thread 3194:
                                        #0  0x0000721beceab32c n/a (libc.so.6 + 0x8d32c)
                                        #1  0x0000721bece5a6c8 raise (libc.so.6 + 0x3c6c8)
                                        #2  0x0000721bece424b8 abort (libc.so.6 + 0x244b8)
                                        #3  0x0000721be14980c2 _ZNK14QMessageLogger5fatalEPKcz (libQt5Core.so.5 + 0x980c2)
                                        #4  0x0000721be2345505 n/a (libQt5Widgets.so.5 + 0x145505)
                                        #5  0x0000721be24a25f0 _ZN11QMainWindowC1EP7QWidget6QFlagsIN2Qt10WindowTypeEE (libQt5Widgets.so.5 + 0x2a25f0)
                                       #6  0x0000721be2b98a9e n/a (QtWidgets.abi3.so + 0x198a9e)
                                       #7  0x0000721be404ecc0 n/a (sip.cpython-312-x86_64-linux-gnu.so + 0x19cc0)
                                       #8  0x0000721bed1854d3 _PyObject_MakeTpCall (libpython3.12.so.1.0 + 0x1854d3)
                                       #9  0x0000721bed08bdfa n/a (libpython3.12.so.1.0 + 0x8bdfa)
                                       #10 0x0000721bed23d767 PyEval_EvalCode (libpython3.12.so.1.0 + 0x23d767)
                                       #11 0x0000721bed257a15 n/a (libpython3.12.so.1.0 + 0x257a15)
                                       #12 0x0000721bed19a98e n/a (libpython3.12.so.1.0 + 0x19a98e)
                                       #13 0x0000721bed19a844 PyObject_Vectorcall (libpython3.12.so.1.0 + 0x19a844)
                                       #14 0x0000721bed08bdfa n/a (libpython3.12.so.1.0 + 0x8bdfa)
                                       #15 0x0000721bed26d2fe n/a (libpython3.12.so.1.0 + 0x26d2fe)
                                       #16 0x0000721bed26cd45 Py_RunMain (libpython3.12.so.1.0 + 0x26cd45)
                                       #17 0x0000721bed228fab Py_BytesMain (libpython3.12.so.1.0 + 0x228fab)
                                       #18 0x0000721bece43cd0 n/a (libc.so.6 + 0x25cd0)
                                       #19 0x0000721bece43d8a __libc_start_main (libc.so.6 + 0x25d8a)
                                       #20 0x00006162779f1045 _start (python3.12 + 0x1045)
    <snip>

But I also have some good news. I had a look around on github - HourusGUI and found that there is a branch “pyqt6”. I tried it out and as far as I could see, it works perfectly under python 3.12.3.

darksidelemm commented 5 months ago

Be warned - the pyqt6 branch is: a) experimental (I was trying to switch to pyqt6, but had various issues with cross-platform support) b) now out of date, and not being maintained.

Dieter9 commented 5 months ago

I got the master brunch working now. I am using a python environment (venv) for all this requirements. It was generated with the parameter "--system-site-packages" to reduce the the quantity of packages. This works quite well until the last python 312 update. I just made a test without this parameter and now Horus-GUI is running without errors, but with a venv of 304 MByte. Such different behavior should really not occur.

73 de Dieter, DK6OV