You are not logged in.

#1 2020-09-24 04:00:31

apastuszak
Member
From: Besalem, PA USA
Registered: 2014-10-18
Posts: 168
Website

[SOLVED] Segmentation fault with any PyQt5 application

I was having issues with MusidBrainz Picard causing segmentation faults.  I uninstalled and reinstalled the app and it still would say “Segmentation Fault (core dumped)” whenever I launched it.  Thinking it may be a problem with a plugin I uninstalled the app and theN did a rm -rf ~/.config/Musicbrainz and then reinstalled the app.  When that didn’t work, I uninstalled it, and installed it using pip3 -> pip3 install picard.  It still caused a segmentation fault.  I had a few other packages I had installed locally using pip3, so I tried those out.  Any package that used PyQt5 crashes with a segmentation fault.  Any package that doesn’t have a GUI worked fine.  One app, comictagger, will run just fine with command line arguments, but if I give it no arguments, it will then run a PyQt5 GUI and it immediately crashes with a segmentation fault.

I tried running Picard with the -d parameter to generate debug logging, but that doesn’t produce anything.  Picard crashes before it can even make the ~/.local/Musicbrainz directory.

There is something very simple I am overlooking here.

My Arch is up to date, as of 9:00 PM this evening.  I reinstalled PyQt5 and PyQt5-sip.  That didn’t help.  A lot of Googling shows that the “fix” seems to be to a force install of PyQt5 using pip3.  Since I installed PyQt5 using pacman, I really don’t want to force install it using pip3.  That’s just a bad idea.

Any help troubleshooting this would be greatly appreciated.

Last edited by apastuszak (2020-09-26 03:48:33)

Offline

#2 2020-09-24 07:15:57

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED] Segmentation fault with any PyQt5 application

Offline

#3 2020-09-26 01:20:42

apastuszak
Member
From: Besalem, PA USA
Registered: 2014-10-18
Posts: 168
Website

Re: [SOLVED] Segmentation fault with any PyQt5 application

[andy@archlinux bin]$ coredumpctl gdb 8867
           PID: 8867 (picard)
           UID: 1000 (andy)
           GID: 100 (users)
        Signal: 11 (SEGV)
     Timestamp: Wed 2020-09-23 23:01:42 EDT (1 day 22h ago)
  Command Line: /usr/bin/python ./picard
    Executable: /usr/bin/python3.8
 Control Group: /user.slice/user-1000.slice/session-7.scope
          Unit: session-7.scope
         Slice: user-1000.slice
       Session: 7
     Owner UID: 1000 (andy)
       Boot ID: 5795d38827a146f49c4a23237f855b32
    Machine ID: d6d6e88f788e44408744426586f711e6
      Hostname: archlinux
       Storage: /var/lib/systemd/coredump/core.picard.1000.5795d38827a146f49c4a23237f855b32.8867.1600916502000000.zst
       Message: Process 8867 (picard) of user 1000 dumped core.
                
                Stack trace of thread 8867:
                #0  0x00007ff9b31b60e2 _ZN10QXcbCursor12queryPointerEP14QXcbConnectionPP18QXcbVirtualDesktopP6QPointPi (libQt5XcbQpa.so.5 + 0x5c0e2)
                #1  0x00007ff9b31c627c _ZN8QXcbDrag4initEv (libQt5XcbQpa.so.5 + 0x6c27c)
                #2  0x00007ff9b31c6485 _ZN8QXcbDragC2EP14QXcbConnection (libQt5XcbQpa.so.5 + 0x6c485)
                #3  0x00007ff9b3196c63 _ZN14QXcbConnectionC1EP19QXcbNativeInterfacebjPKc (libQt5XcbQpa.so.5 + 0x3cc63)
                #4  0x00007ff9b319a99c _ZN15QXcbIntegrationC2ERK11QStringListRiPPc (libQt5XcbQpa.so.5 + 0x4099c)
                #5  0x00007ff9b34d461d _ZN21QXcbIntegrationPlugin6createERK7QStringRK11QStringListRiPPc (libqxcb.so + 0x161d)
                #6  0x00007ff9b6aab627 _ZN22QGuiApplicationPrivate25createPlatformIntegrationEv (libQt5Gui.so.5 + 0x130627)
                #7  0x00007ff9b6aacb01 _ZN22QGuiApplicationPrivate21createEventDispatcherEv (libQt5Gui.so.5 + 0x131b01)
                #8  0x00007ff9b9e30936 _ZN23QCoreApplicationPrivate4initEv (libQt5Core.so.5 + 0x2ba936)
                #9  0x00007ff9b6aafb40 _ZN22QGuiApplicationPrivate4initEv (libQt5Gui.so.5 + 0x134b40)
                #10 0x00007ff9b596a6aa _ZN19QApplicationPrivate4initEv (libQt5Widgets.so.5 + 0x15f6aa)
                #11 0x00007ff9b62704aa n/a (QtWidgets.abi3.so + 0x37d4aa)
                #12 0x00007ff9b627058a n/a (QtWidgets.abi3.so + 0x37d58a)
                #13 0x00007ff9ba10be70 n/a (sip.cpython-38-x86_64-linux-gnu.so + 0x16e70)
                #14 0x00007ff9bb061c5b n/a (libpython3.8.so.1.0 + 0x1e7c5b)
                #15 0x00007ff9bafa1b84 _PyObject_MakeTpCall (libpython3.8.so.1.0 + 0x127b84)
                #16 0x00007ff9baf9d458 _PyEval_EvalFrameDefault (libpython3.8.so.1.0 + 0x123458)
                #17 0x00007ff9baf9753a _PyEval_EvalCodeWithName (libpython3.8.so.1.0 + 0x11d53a)
                #18 0x00007ff9bafa121e _PyObject_FastCallDict (libpython3.8.so.1.0 + 0x12721e)
                #19 0x00007ff9bafb3d54 n/a (libpython3.8.so.1.0 + 0x139d54)
                #20 0x00007ff9bafa1c20 _PyObject_MakeTpCall (libpython3.8.so.1.0 + 0x127c20)
                #21 0x00007ff9baf9cf54 _PyEval_EvalFrameDefault (libpython3.8.so.1.0 + 0x122f54)
                #22 0x00007ff9baf97044 _PyEval_EvalCodeWithName (libpython3.8.so.1.0 + 0x11d044)
                #23 0x00007ff9bafa91cd _PyFunction_Vectorcall (libpython3.8.so.1.0 + 0x12f1cd)
                #24 0x00007ff9baf986fd _PyEval_EvalFrameDefault (libpython3.8.so.1.0 + 0x11e6fd)
                #25 0x00007ff9baf97044 _PyEval_EvalCodeWithName (libpython3.8.so.1.0 + 0x11d044)
                #26 0x00007ff9bb0483a3 PyEval_EvalCode (libpython3.8.so.1.0 + 0x1ce3a3)
                #27 0x00007ff9bb053c18 n/a (libpython3.8.so.1.0 + 0x1d9c18)
                #28 0x00007ff9bb04de33 n/a (libpython3.8.so.1.0 + 0x1d3e33)
                #29 0x00007ff9baf0c9a9 PyRun_FileExFlags (libpython3.8.so.1.0 + 0x929a9)
                #30 0x00007ff9baf0c420 PyRun_SimpleFileExFlags (libpython3.8.so.1.0 + 0x92420)
                #31 0x00007ff9bb060aea Py_RunMain (libpython3.8.so.1.0 + 0x1e6aea)
                #32 0x00007ff9bb03cc59 Py_BytesMain (libpython3.8.so.1.0 + 0x1c2c59)
                #33 0x00007ff9bacd9152 __libc_start_main (libc.so.6 + 0x28152)
                #34 0x000055f5274e404e _start (python3.8 + 0x104e)
                
                Stack trace of thread 8870:
                #0  0x00007ff9bada646f __poll (libc.so.6 + 0xf546f)
                #1  0x00007ff9b9216188 n/a (libglib-2.0.so.0 + 0xa4188)
                #2  0x00007ff9b91c3421 g_main_context_iteration (libglib-2.0.so.0 + 0x51421)
                #3  0x00007ff9b9e82941 _ZN20QEventDispatcherGlib13processEventsE6QFlagsIN10QEventLoop17ProcessEventsFlagEE (libQt5Core.so.5 + 0x30c941)
                #4  0x00007ff9b9e2865c _ZN10QEventLoop4execE6QFlagsINS_17ProcessEventsFlagEE (libQt5Core.so.5 + 0x2b265c)
                #5  0x00007ff9b9c42ca2 _ZN7QThread4execEv (libQt5Core.so.5 + 0xccca2)
                #6  0x00007ff9b3eee098 n/a (libQt5DBus.so.5 + 0x17098)
                #7  0x00007ff9b9c43e8f n/a (libQt5Core.so.5 + 0xcde8f)
                #8  0x00007ff9bac983e9 start_thread (libpthread.so.0 + 0x93e9)
                #9  0x00007ff9badb1293 __clone (libc.so.6 + 0x100293)
                
                Stack trace of thread 8871:
                #0  0x00007ff9bada646f __poll (libc.so.6 + 0xf546f)
                #1  0x00007ff9b64ad63b n/a (libxcb.so.1 + 0xc63b)
                #2  0x00007ff9b64af37b xcb_wait_for_event (libxcb.so.1 + 0xe37b)
                #3  0x00007ff9b31bd1b0 _ZN14QXcbEventQueue3runEv (libQt5XcbQpa.so.5 + 0x631b0)
                #4  0x00007ff9b9c43e8f n/a (libQt5Core.so.5 + 0xcde8f)
                #5  0x00007ff9bac983e9 start_thread (libpthread.so.0 + 0x93e9)
                #6  0x00007ff9badb1293 __clone (libc.so.6 + 0x100293)

GNU gdb (GDB) 9.2
Copyright (C) 2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Type "show copying" and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
    <http://www.gnu.org/software/gdb/documentation/>.

For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from /usr/bin/python3.8...
(No debugging symbols found in /usr/bin/python3.8)
[New LWP 8867]
[New LWP 8870]
[New LWP 8871]
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
Core was generated by `/usr/bin/python ./picard'.
Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007ff9b31b60e2 in QXcbCursor::queryPointer(QXcbConnection*, QXcbVirtualDesktop**, QPoint*, int*) ()
   from /usr/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5
[Current thread is 1 (Thread 0x7ff9bab39740 (LWP 8867))]
(gdb) 

Offline

#4 2020-09-26 01:43:20

apastuszak
Member
From: Besalem, PA USA
Registered: 2014-10-18
Posts: 168
Website

Re: [SOLVED] Segmentation fault with any PyQt5 application

Backtrace

#0  0x00007f151415e0e2 in QXcbCursor::queryPointer(QXcbConnection*, QXcbVirtualDesktop**, QPoint*, int*) ()
   from /usr/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#1  0x00007f151416e27c in QXcbDrag::init() () from /usr/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#2  0x00007f151416e485 in QXcbDrag::QXcbDrag(QXcbConnection*) () from /usr/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#3  0x00007f151413ec63 in QXcbConnection::QXcbConnection(QXcbNativeInterface*, bool, unsigned int, char const*) ()
   from /usr/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#4  0x00007f151414299c in QXcbIntegration::QXcbIntegration(QStringList const&, int&, char**) ()
   from /usr/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/../../lib/libQt5XcbQpa.so.5
#5  0x00007f151447c61d in QXcbIntegrationPlugin::create(QString const&, QStringList const&, int&, char**) ()
   from /usr/lib/python3.8/site-packages/PyQt5/Qt/plugins/platforms/libqxcb.so
#6  0x00007f1517a58627 in QGuiApplicationPrivate::createPlatformIntegration() () from /usr/lib/libQt5Gui.so.5
#7  0x00007f1517a59b01 in QGuiApplicationPrivate::createEventDispatcher() () from /usr/lib/libQt5Gui.so.5
#8  0x00007f151addb936 in QCoreApplicationPrivate::init() () from /usr/lib/libQt5Core.so.5
#9  0x00007f1517a5cb40 in QGuiApplicationPrivate::init() () from /usr/lib/libQt5Gui.so.5
#10 0x00007f15169196aa in QApplicationPrivate::init() () from /usr/lib/libQt5Widgets.so.5
#11 0x00007f151721d4aa in ?? () from /usr/lib/python3.8/site-packages/PyQt5/QtWidgets.abi3.so
#12 0x00007f151721d58a in ?? () from /usr/lib/python3.8/site-packages/PyQt5/QtWidgets.abi3.so
#13 0x00007f151b0b4e70 in ?? () from /usr/lib/python3.8/site-packages/PyQt5/sip.cpython-38-x86_64-linux-gnu.so
#14 0x00007f151c010c5b in ?? () from /usr/lib/libpython3.8.so.1.0
#15 0x00007f151bf50b84 in _PyObject_MakeTpCall () from /usr/lib/libpython3.8.so.1.0
#16 0x00007f151bf4c458 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.8.so.1.0
#17 0x00007f151bf4653a in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.8.so.1.0
#18 0x00007f151bf5021e in _PyObject_FastCallDict () from /usr/lib/libpython3.8.so.1.0
#19 0x00007f151bf62d54 in ?? () from /usr/lib/libpython3.8.so.1.0
#20 0x00007f151bf50c20 in _PyObject_MakeTpCall () from /usr/lib/libpython3.8.so.1.0
#21 0x00007f151bf4bf54 in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.8.so.1.0
#22 0x00007f151bf46044 in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.8.so.1.0
#23 0x00007f151bf581cd in _PyFunction_Vectorcall () from /usr/lib/libpython3.8.so.1.0
#24 0x00007f151bf476fd in _PyEval_EvalFrameDefault () from /usr/lib/libpython3.8.so.1.0
#25 0x00007f151bf46044 in _PyEval_EvalCodeWithName () from /usr/lib/libpython3.8.so.1.0
#26 0x00007f151bff73a3 in PyEval_EvalCode () from /usr/lib/libpython3.8.so.1.0
#27 0x00007f151c002c18 in ?? () from /usr/lib/libpython3.8.so.1.0
#28 0x00007f151bffce33 in ?? () from /usr/lib/libpython3.8.so.1.0
#29 0x00007f151bebb9a9 in PyRun_FileExFlags () from /usr/lib/libpython3.8.so.1.0
#30 0x00007f151bebb420 in PyRun_SimpleFileExFlags () from /usr/lib/libpython3.8.so.1.0
#31 0x00007f151c00faea in Py_RunMain () from /usr/lib/libpython3.8.so.1.0
#32 0x00007f151bfebc59 in Py_BytesMain () from /usr/lib/libpython3.8.so.1.0
#33 0x00007f151bc88152 in __libc_start_main () from /usr/lib/libc.so.6
#34 0x000055d7dcd2104e in _start ()

Offline

#5 2020-09-26 03:48:15

apastuszak
Member
From: Besalem, PA USA
Registered: 2014-10-18
Posts: 168
Website

Re: [SOLVED] Segmentation fault with any PyQt5 application

Ok, I figured it out.

I needed to uninstall pyqt5 and everything that depended on it.  Then I went into site-packages and deleted the pyqt5 directory and two other .info directories that has pyqt5 in them.  I then ran pip install picard and it pulled down pyqt5 and a bunch of other packages it needed and now it works.

I think I may have installed pyqt5 using sudo pip and then intalled it via pacman, which is a REALLY BAD idea.

Offline

#6 2020-09-26 12:21:09

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,645

Re: [SOLVED] Segmentation fault with any PyQt5 application

Both picard and pyqt5 exist in the repos, why do you do such a roundabout anyway?

Offline

#7 2020-09-26 13:00:41

apastuszak
Member
From: Besalem, PA USA
Registered: 2014-10-18
Posts: 168
Website

Re: [SOLVED] Segmentation fault with any PyQt5 application

They do.  And I installed them from the repos initially, and they didn't work.  I was getting the segmentation fault.  That's why uninstalled them and installed them using pip.  I wanted to see if it was the package or the application.

What I think happened was that, at some point in the past I installed comictagger via pip and used the command 'sudo pip install comictagger.' This brought PyQt5 with it.  Then I installed Picard from extra, which also brought PyQt5. PyQt5 failed because pip had installed it, so I used the force option.

I read another thread on the bbs that said pip packages should not be installed using sudo because they can conflict with packages in the repos.  So I think I tried to "clean things up" by removing things I installed via sudo pip and then reinstalling them using pacman.  It looks like it left some stuff behind that broke PyQt5 after it reinstalled.

Offline

Board footer

Powered by FluxBB