PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 394 - Inelegant quit slot activation on Mac
: Inelegant quit slot activation on Mac
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: QtGui
: 0.4.1
: Macintosh Mac OS
: P3 critical
Assigned To: renato filho
:
:
:
  Show dependency treegraph
 
Reported: 2010-09-30 17:53 EEST by Christopher Bruns
Modified: 2010-11-25 17:48 EET (History)
13 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christopher Bruns 2010-09-30 17:53:40 EEST
I encountered a python crash with a standard Python 2.6 install on a Mac Pro
with Mac OS 10.6.4 (Snow Leopard).  The crash occurs when I run the following
simple example program from the PyQt tutorial at 
   http://zetcode.com/tutorials/pyqt4/firstprograms/

The example program closes gracefully when I use PyQt4 instead of PySide.

Run the program and click the "Close" button to experience the crash.

############## begin test program ########################

#! /usr/bin/python

import sys

# Using PySide rather than PyQt4 causes crash on Mac on Close
# from PyQt4 import QtCore
# from PyQt4 import QtGui
from PySide import QtCore
from PySide import QtGui

class QuitButton(QtGui.QWidget):
    def __init__(self, parent=None):
        QtGui.QWidget.__init__(self, parent)
        self.setGeometry(300, 300, 250, 150)
        self.setWindowTitle('Quit button')
        quit = QtGui.QPushButton('Close', self)
        # quit.setGeometry(10, 10, 60, 35)
        # quit.clicked.connect(QtGui.qApp.quit) # New way cmb
        self.connect(quit, QtCore.SIGNAL('clicked()'),
                     QtGui.qApp, QtCore.SLOT('quit()'))

if __name__ == "__main__":
    app = QtGui.QApplication(sys.argv)
    qb = QuitButton()
    qb.show()
    sys.exit(app.exec_())

############ end test program #######################


The OS produced the following crash report:
##################################################
Python quit unexpectedly while using the QtGui.so plugin.

Process:         Python [1751]
Path:           
/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
Identifier:      org.python.python.app
Version:         2.6 (2.6)
Build Info:      python-440100~6
Code Type:       X86-64 (Native)
Parent Process:  java [1471]

PlugIn Path:       /Library/Python/2.6/site-packages/PySide/QtGui.so
PlugIn Identifier: QtGui.so
PlugIn Version:    ??? (???)

Date/Time:       2010-09-30 16:41:02.017 -0400
OS Version:      Mac OS X 10.6.4 (10F569)
Report Version:  6

Interval Since Last Report:          1323 sec
Crashes Since Last Report:           2
Per-App Interval Since Last Report:  20 sec
Per-App Crashes Since Last Report:   2
Anonymous UUID:                      E45C4A79-A7F4-43AE-A524-1ABE2B878244

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Crashed Thread:  0  Dispatch queue: com.apple.main-thread

Application Specific Information:
abort() called

Thread 0 Crashed:  Dispatch queue: com.apple.main-thread
0   libSystem.B.dylib                 0x00007fff855b33d6 __kill + 10
1   libSystem.B.dylib                 0x00007fff85653972 abort + 83
2   org.python.python                 0x00000001000a1dd7 Py_FatalError + 36
3   org.python.python                 0x0000000100084b1e PyEval_SaveThread + 36
4   libshiboken.0.5.dylib             0x00000001004f3415
Shiboken::ThreadStateSaver::save() + 31
5   QtGui.so                          0x0000000102885582
QApplicationWrapper::notify(QObject*, QEvent*) + 114
6   QtCore                            0x00000001014f8dec
QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
7   QtGui                             0x0000000103b4eaec
QWidget::event(QEvent*) + 3772
8   QtGui                             0x0000000103af7ddd
QApplicationPrivate::notify_helper(QObject*, QEvent*) + 189
9   QtGui                             0x0000000103afe72d
QApplication::notify(QObject*, QEvent*) + 349
10  QtGui.so                          0x0000000102885593
QApplicationWrapper::notify(QObject*, QEvent*) + 131
11  QtCore                            0x00000001014f8dec
QCoreApplication::notifyInternal(QObject*, QEvent*) + 124
12  QtGui                             0x0000000103afdf57
QApplication::setActiveWindow(QWidget*) + 823
13  QtGui                             0x0000000103b3e39e
QWidgetPrivate::deactivateWidgetCleanup() + 78
14  QtGui                             0x0000000103a9974b
QWidgetPrivate::hide_sys() + 203
15  QtGui                             0x0000000103b4b2e7
QWidgetPrivate::hide_helper() + 167
16  QtGui                             0x0000000103b52b09
QWidget::setVisible(bool) + 1145
17  QtGui                             0x0000000103b4a348
QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) + 440
18  QtGui                             0x0000000103b4aec0 QWidget::~QWidget() +
896
19  QtGui.so                          0x0000000102ef8ba2
QWidgetWrapper::~QWidgetWrapper() + 76
20  QtGui.so                          0x0000000102efea58 void
Shiboken::callCppDestructor<QWidget>(void*) + 41
21  libshiboken.0.5.dylib             0x00000001004ea2c0
Shiboken::deallocWrapper(_object*) + 151
22  org.python.python                 0x0000000100037b8e PyLong_FromUnicode +
6315
23  org.python.python                 0x0000000100039e39 PyDict_SetItem + 147
24  org.python.python                 0x000000010003b47c _PyModule_Clear + 287
25  org.python.python                 0x000000010009801b PyImport_Cleanup + 476
26  org.python.python                 0x00000001000a30cf Py_Finalize + 200
27  org.python.python                 0x00000001000a3198 Py_Exit + 16
28  org.python.python                 0x00000001000a32ca Py_Exit + 322
29  org.python.python                 0x00000001000a330a PyErr_PrintEx + 55
30  org.python.python                 0x00000001000a424f
PyRun_SimpleFileExFlags + 722
31  org.python.python                 0x00000001000b0286 Py_Main + 2718
32  org.python.python.app             0x0000000100000e6c start + 52

Thread 1:  Dispatch queue: com.apple.libdispatch-manager
0   libSystem.B.dylib                 0x00007fff8557e08a kevent + 10
1   libSystem.B.dylib                 0x00007fff8557ff5d _dispatch_mgr_invoke +
154
2   libSystem.B.dylib                 0x00007fff8557fc34 _dispatch_queue_invoke
+ 185
3   libSystem.B.dylib                 0x00007fff8557f75e
_dispatch_worker_thread2 + 252
4   libSystem.B.dylib                 0x00007fff8557f088 _pthread_wqthread +
353
5   libSystem.B.dylib                 0x00007fff8557ef25 start_wqthread + 13

Thread 2:
0   libSystem.B.dylib                 0x00007fff8557eeaa __workq_kernreturn +
10
1   libSystem.B.dylib                 0x00007fff8557f2bc _pthread_wqthread +
917
2   libSystem.B.dylib                 0x00007fff8557ef25 start_wqthread + 13

Thread 3:
0   libSystem.B.dylib                 0x00007fff8557eeaa __workq_kernreturn +
10
1   libSystem.B.dylib                 0x00007fff8557f2bc _pthread_wqthread +
917
2   libSystem.B.dylib                 0x00007fff8557ef25 start_wqthread + 13

Thread 0 crashed with X86 Thread State (64-bit):
  rax: 0x0000000000000000  rbx: 0x0000000000000000  rcx: 0x00007fff5fbfde88 
rdx: 0x0000000000000000
  rdi: 0x00000000000006d7  rsi: 0x0000000000000006  rbp: 0x00007fff5fbfdea0 
rsp: 0x00007fff5fbfde88
   r8: 0x00007fff70abda40   r9: 0x0000000104a228d0  r10: 0x00007fff855af412 
r11: 0xffffff80002e1680
  r12: 0x00000001002b4020  r13: 0x00007fff5fbfe750  r14: 0x0000000104894700 
r15: 0x00007fff5fbfe750
  rip: 0x00007fff855b33d6  rfl: 0x0000000000000206  cr2: 0x0000000103add2a0

Binary Images:
       0x100000000 -        0x100000ff7  org.python.python.app 2.6 (2.6)
<8E155B33-1B6D-C503-392E-5CA72851E61E>
/System/Library/Frameworks/Python.framework/Versions/2.6/Resources/Python.app/Contents/MacOS/Python
       0x100004000 -        0x100114ff7  org.python.python 2.6.1 (2.6.1)
<A07FF07F-4DA8-CBF7-A075-7464786DD7BB>
/System/Library/Frameworks/Python.framework/Versions/2.6/Python
       0x1004b0000 -        0x1004c9fff  libpyside.0.4.dylib 0.4.1
(compatibility 0.4.0) <741FCD2B-B32C-A878-369A-5D4C155BDC09>
/usr/lib/libpyside.0.4.dylib
       0x1004e6000 -        0x1004ffff7  libshiboken.0.5.dylib 0.5.0
(compatibility 0.5.0) <DFB5D1C9-3194-57D0-3F5C-5BF3BE22404F>
/usr/lib/libshiboken.0.5.dylib
       0x101000000 -        0x1012c1fff +QtCore.so ??? (???)
<CD542ACF-B42B-1F81-7A68-BE90F55125B9>
/Library/Python/2.6/site-packages/PySide/QtCore.so
       0x1014a7000 -        0x10172cfef +QtCore 4.7.0 (compatibility 4.7.0)
<AEA4A1B9-46B8-7621-8D00-555040D89C56>
/Library/Frameworks/QtCore.framework/Versions/4/QtCore
       0x102800000 -        0x103338fff +QtGui.so ??? (???)
<1DAE2700-EEDB-2769-839C-69E64B1494E2>
/Library/Python/2.6/site-packages/PySide/QtGui.so
       0x103a76000 -        0x104449fef +QtGui 4.7.0 (compatibility 4.7.0)
<BD43BAAD-873D-45E8-3605-1E344992BB51>
/Library/Frameworks/QtGui.framework/Versions/4/QtGui
[snip]
Comment 1 Hugo Parente Lima 2010-09-30 18:34:55 EEST
Maybe this bug is a duplicate of bug#388

Unfortunately we don't have a Mac to test it right now.
Comment 2 Christopher Bruns 2010-10-01 09:36:48 EEST
Perhaps this is not exactly the same bug as bug#388, because on my Mac the
example program from bug#388 runs just fine, but my example program here
crashes, only when the "Close" QButton widged is clicked.
Comment 3 renato filho 2010-10-01 11:32:35 EEST
The bug #388 does not fail in all linux distribution, I do not know what is the
exactly the reason but this happen when you are using KDE and PySide, then the
test can runs fine on your computer, I think the best way is apply the patch
used to fix bug and run against your test.
Comment 4 renato filho 2010-10-18 15:48:46 EEST
*** Bug 412 has been marked as a duplicate of this bug. ***
Comment 5 Hugo Parente Lima 2010-10-22 18:21:53 EEST
*** Bug 426 has been marked as a duplicate of this bug. ***
Comment 6 Hugo Parente Lima 2010-10-22 18:22:46 EEST
*** Bug 429 has been marked as a duplicate of this bug. ***
Comment 7 Hugo Parente Lima 2010-10-22 18:22:54 EEST
*** Bug 433 has been marked as a duplicate of this bug. ***
Comment 8 Hugo Parente Lima 2010-10-22 19:18:53 EEST
*** Bug 430 has been marked as a duplicate of this bug. ***
Comment 9 Hugo Parente Lima 2010-10-22 19:19:07 EEST
Fixed in commits:

shiboken/7368a0a533c12ba09e7713695415e1f247763883
pyside/77a1654ad587241d3c14bafa2c0deae53e1599ee
Comment 10 renato filho 2010-11-25 17:48:10 EET
released on 1.0.0~beta1