[Kde-bindings] [Bug 219787] krosspython: crash when PyQt signal is connected to C++ method that calls a function in the script

Daniel Calviño Sánchez danxuliu at gmail.com
Tue Jan 19 22:46:11 UTC 2010


https://bugs.kde.org/show_bug.cgi?id=219787


Daniel Calviño Sánchez <danxuliu at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #39278|0                           |1
        is obsolete|                            |




--- Comment #5 from Daniel Calviño Sánchez <danxuliu gmail com>  2010-01-19 23:46:08 ---
Created an attachment (id=40062)
 --> (http://bugs.kde.org/attachment.cgi?id=40062)
Patch for pythonscript.cpp with a workaround to the bug

I have updated the workaround/fix shown in comment #2 to also handle when
exceptions are raised in the Python function.

For what I could see, all the statements (but the krosswarning and "QStringList
trace;") in the catch clause had to be locked, or the test crashed.

Also, the lock acquired in the try clause before calling the Python function
had to be released. I opted to wrap the call with another try/catch, release
the lock in the catch and throw again the exception, so it got caught again in
the outer catch.

As there are several other statements in the outer try clause, I assume that
the Py::Exception can be thrown by some of them (although I have no idea, I
suppose it based on that code).

That's why I have added the inner try/catch to release the lock. If the lock
was released in the outer catch, it could be executed by exceptions thrown when
no lock had to be released.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the Kde-bindings mailing list