[PyQt] Segfault using PyQt5 with Raspbian

Xenoshell valentin at ramonat.de
Thu Nov 30 12:01:22 GMT 2017


Hello,
i want to use my Raspberry Pi with a USB Camera in a GUI. I am working with
Qt5 and python3.5. The problem is when the code is at /self.camvfind.show()
/ or /self.cam.setViewfinder(self.camvfind)/ it sometimes results in a
segmentation fault or it actually shows the camera feed. So it can work but
not always. I am really confused by this. Here is  my complete code
<https://github.com/Xenoshell/raspberry/blob/master/qt.py>  . Its just a
little bit too long to show everything here but the most interesting
function is this:
    def startVid(self):
        self.camvfind.show()
        
        self.cam.setViewfinder(self.camvfind)

        self.cam.setCaptureMode(self.cammode)
        self.cam.start()

I already tried to debug with gdb and the outout was:
(gdb) bt
#0  0x733d4620 in platform_get_handle () from /opt/vc/lib/libEGL.so
#1  0x733c9f2c in eglCreateWindowSurface () from /opt/vc/lib/libEGL.so
#2  0x722e7004 in ?? ()
  from
/usr/lib/arm-linux-gnueabihf/qt5/plugins/xcbglintegrations/libqxcb-egl-integration.so
Backtrace stopped: previous frame identical to this frame (corrupt stack?)


Feel free to ask me questions. 
Greets,
Xenoshell



--
Sent from: http://python.6.x6.nabble.com/PyQt-f1792048.html


More information about the PyQt mailing list