Skip to content
Advertisement

Signal emitting in Python causes exit code 139

Im trying to make function, which passes 8 values to the progress bars in window app made with QtDesigner. That is there is a function which actually generates this values. I want to execute it every second in order to get theese values and update progress bars which displays values.

I combined tutorials about making a graphic app with Python and making an app with dynamically updating progess bars:

  1. Python Qt Development: https://www.youtube.com/watch?v=eD91nE8q8Nk
  2. PyQt Progress bar with Thread: https://www.youtube.com/watch?v=ivcxZSHL7jM

The problem is that values are passed correctly, but when it comes to send the signal, the whole app crashes with message:

Process finished with exit code 139 (interrupted by signal 11: SIGSEGV)

Here is my code:

Module which generates the values (probkowanie.py):

JavaScript

and here is main program code:

JavaScript

I think it may be caused by mixing libraries. I use QtCore from PySide even though tutorial number 2 is based on PyQt4. My decision is because tutorial number 1 is based on PySide. I tried changing:

JavaScript

to

JavaScript

but then I get another bunch of errors, which I don’t know what to do with:

JavaScript

@EDIT After providing changes proposed by @ekhumoro script doens’t crash, but now I’m getting another error:

QObject::connect: Cannot queue arguments of type ‘object’ (Make sure ‘object’ is registered using qRegisterMetaType().)

I tried to look for solution on my own, but I didn’t find the exact code which I need. I also tried transforming type of signal from (object) to (tuple) or (list), but it leads to another errors:

TypeError: Unknown type used to call meta function (that may be a signal): tuple

The most solutions I found are based on PyQT. Is there an easy way to rewrite it for PySide? Here is an example of solution, which seems to be correct but is made using PyQT: https://stackoverflow.com/a/2595607/2550466

Advertisement

Answer

You are right to think that mixing PySide and PyQt will cause problems, so you will need to remove one of them. However, the crash itself is probably caused by a bug in PySide. There is an SO question with a similar problem shown here:

So you also need to change the way you define and emit MYO_SIGNALS.

Below is a fixed version of your script (the changed lines are commented):

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement