Hi, Now that PySide 1.0.0 has been released I've started porting the examples from my PyQt book to Python 2.6/PySide 1.0.
Unfortunately I've hit a weird problem. I've reduced it to the attached
40 line example.
When I run it and click the Open... button I get a file dialog pop up as
expected. But when I choose a file and click the file dialog's Open
button the application freezes.
I've run it under gdb and also attach a backrace if that's any help.
Thanks!
--
Mark Summerfield, Qtrac Ltd, www.qtrac.eu
C++, Python, Qt, PyQt - training and consultancy
"Programming in Python 3" - ISBN 0321680561
http://www.qtrac.eu/py3book.html
Script started on Wed 09 Mar 2011 06:54:08 PM GMT ]0;mark:/tmp : gdb python GNU gdb (GDB) 7.0.1-debian Copyright (C) 2009 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-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /usr/bin/python...(no debugging symbols found)...done. (gdb) set args test.pyw (gdb) run Starting program: /usr/bin/python test.pyw [Thread debugging using libthread_db enabled] [New Thread 0x7fffecc2a700 (LWP 2902)] [New Thread 0x7fffe7fff700 (LWP 2903)] [Thread 0x7fffecc2a700 (LWP 2902) exited] ^C Program received signal SIGINT, Interrupt. 0x00007ffff7bce16c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 (gdb) bt #0 0x00007ffff7bce16c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib/libpthread.so.0 #1 0x00007ffff5298e6b in QWaitConditionPrivate::wait (this=<value optimized out>, mutex=0x10ab580, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:87 #2 QWaitCondition::wait (this=<value optimized out>, mutex=0x10ab580, time=18446744073709551615) at thread/qwaitcondition_unix.cpp:159 #3 0x00007ffff5297eac in QThread::wait (this=<value optimized out>, time=18446744073709551615) at thread/qthread_unix.cpp:619 #4 0x00007ffff5359030 in ~QFileSystemWatcher (this=0x10c6c10, __in_chrg=<value optimized out>) at io/qfilesystemwatcher.cpp:435 #5 0x00007ffff5395b3c in QObjectPrivate::deleteChildren (this=0x10b9300) at kernel/qobject.cpp:1986 #6 0x00007ffff539cc1f in ~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:975 #7 0x00007ffff5295a39 in ~QThread (this=0x1098918, __in_chrg=<value optimized out>) at thread/qthread.cpp:411 #8 0x00007ffff2e7659f in ~QFileInfoGatherer (this=0x1098918, __in_chrg=<value optimized out>) at dialogs/qfileinfogatherer.cpp:94 #9 0x00007ffff2e75971 in QFileSystemModelPrivate::~QFileSystemModelPrivate() () from /usr/lib/libQtGui.so.4 #10 0x00007ffff539cc61 in QScopedPointerDeleter<QObjectData>::cleanup (this=<value optimized out>, __in_chrg=<value optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:62 #11 ~QScopedPointer (this=<value optimized out>, __in_chrg=<value optimized out>) at ../../include/QtCore/../../src/corelib/tools/qscopedpointer.h:100 #12 ~QObject (this=<value optimized out>, __in_chrg=<value optimized out>) at kernel/qobject.cpp:992 #13 0x00007ffff537a375 in ~QAbstractItemModel (this=0x1062db0, __in_chrg=<value optimized out>) at kernel/qabstractitemmodel.cpp:1373 #14 0x00007ffff2e67417 in ~QFileSystemModel (this=0x10ab22c, __in_chrg=<value optimized out>) at dialogs/qfilesystemmodel.cpp:220 #15 0x00007ffff5395b3c in QObjectPrivate::deleteChildren (this=0x10ca890) at kernel/qobject.cpp:1986 #16 0x00007ffff29ce32d in ~QWidget (this=0x7fffffffbce0, __in_chrg=<value optimized out>) at kernel/qwidget.cpp:1476 #17 0x00007ffff2e4e360 in ~QFileDialog (this=0x7fffffffbce0, __in_chrg=<value optimized out>) at dialogs/qfiledialog.cpp:366 #18 0x00007ffff2e502b0 in QFileDialog::getOpenFileName (parent=<value optimized out>, caption=<value optimized out>, dir=<value optimized out>, filter=<value optimized out>, selectedFilter=0x7fffffffbd10, options=...) at dialogs/qfiledialog.cpp:1688 #19 0x00007ffff37938ec in Sbk_QFileDialogFunc_getOpenFileName () from /usr/local/lib/python2.6/dist-packages/PySide/QtGui.so #20 0x00000000004a7ba5 in PyEval_EvalFrameEx () #21 0x00000000004a95c1 in PyEval_EvalCodeEx () #22 0x0000000000538a10 in ?? () #23 0x000000000041ef47 in PyObject_Call () #24 0x0000000000427c1f in ?? () #25 0x000000000041ef47 in PyObject_Call () #26 0x00000000004a1a53 in PyEval_CallObjectWithKeywords () #27 0x00007ffff5d8d1b1 in PySide::callMethod(QObject*, int, void**) () from /usr/local/lib/libpyside-python2.6.so.1.0 #28 0x00007ffff5d8cd15 in PySide::SignalManager::qt_metacall(QObject*, QMetaObject::Call, int, void**) () from /usr/local/lib/libpyside-python2.6.so.1.0 #29 0x00007ffff374d5bc in QDialogWrapper::qt_metacall(QMetaObject::Call, int, void**) () from /usr/local/lib/python2.6/dist-packages/PySide/QtGui.so #30 0x00007ffff539a2e6 in QMetaObject::activate (sender=0x1080820, m=<value optimized out>, local_signal_index=<value optimized out>, argv=0xffffffffffffffff) at kernel/qobject.cpp:3295 #31 0x00007ffff300e422 in QAbstractButton::clicked (this=0x10ab22c, _t1=false) at .moc/release-shared/moc_qabstractbutton.cpp:206 #32 0x00007ffff2d267db in QAbstractButtonPrivate::emitClicked (this=0x1064ac0) at widgets/qabstractbutton.cpp:546 #33 0x00007ffff2d2767b in QAbstractButtonPrivate::click (this=0x1064ac0) at widgets/qabstractbutton.cpp:539 #34 0x00007ffff3abad08 in QPushButtonWrapper::keyReleaseEvent(QKeyEvent*) () from /usr/local/lib/python2.6/dist-packages/PySide/QtGui.so #35 0x00007ffff29c73f7 in QWidget::event (this=0x1080820, event=0x7fffffffd0b0) at kernel/qwidget.cpp:8116 #36 0x00007ffff3ab9350 in QPushButtonWrapper::event(QEvent*) () from /usr/local/lib/python2.6/dist-packages/PySide/QtGui.so #37 0x00007ffff297132c in QApplicationPrivate::notify_helper (this=0xb74ee0, receiver=0x1080820, e=0x7fffffffd0b0) at kernel/qapplication.cpp:4302 #38 0x00007ffff2978fc5 in QApplication::notify (this=<value optimized out>, receiver=0x1080820, e=0x7fffffffd0b0) at kernel/qapplication.cpp:3765 #39 0x00007ffff3682f0e in QApplicationWrapper::notify(QObject*, QEvent*) () from /usr/local/lib/python2.6/dist-packages/PySide/QtGui.so #40 0x00007ffff538709c in QCoreApplication::notifyInternal (this=0xb74ec0, receiver=0x1080820, event=0x7fffffffd0b0) at kernel/qcoreapplication.cpp:726 #41 0x00007ffff2a1bd6a in QKeyMapper::sendKeyEvent (keyWidget=0x1080820, grab=<value optimized out>, type=QEvent::KeyRelease, code=32, modifiers=<value optimized out>, text=..., autorepeat=false, count=1, nativeScanCode=65, nativeVirtualKey=32, nativeModifiers=0) at kernel/qkeymapper_x11.cpp:1875 ---Type <return> to continue, or q <return> to quit--- #42 0x00007ffff2a1e2e1 in QKeyMapperPrivate::translateKeyEvent (this=0x1046710, keyWidget=0x1080820, event=<value optimized out>, grab=128) at kernel/qkeymapper_x11.cpp:1845 #43 0x00007ffff29f5a34 in QApplication::x11ProcessEvent (this=<value optimized out>, event=0x7fffffffdc60) at kernel/qapplication_x11.cpp:3406 #44 0x00007ffff2a215a2 in x11EventSourceDispatch (s=0x1002f60, callback=<value optimized out>, user_data=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:146 #45 0x00007ffff463a6f2 in g_main_context_dispatch () from /lib/libglib-2.0.so.0 #46 0x00007ffff463e568 in ?? () from /lib/libglib-2.0.so.0 #47 0x00007ffff463e71c in g_main_context_iteration () from /lib/libglib-2.0.so.0 #48 0x00007ffff53b06b3 in QEventDispatcherGlib::processEvents (this=0xb752e0, flags=<value optimized out>) at kernel/qeventdispatcher_glib.cpp:412 #49 0x00007ffff2a2119e in QGuiEventDispatcherGlib::processEvents (this=0x10ab22c, flags=<value optimized out>) at kernel/qguieventdispatcher_glib.cpp:204 #50 0x00007ffff53859c2 in QEventLoop::processEvents (this=<value optimized out>, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece. ) at kernel/qeventloop.cpp:149 #51 0x00007ffff5385d9c in QEventLoop::exec (this=0x7fffffffdf80, flags=DWARF-2 expression error: DW_OP_reg operations must be used either alone or in conjuction with DW_OP_piece. ) at kernel/qeventloop.cpp:201 #52 0x00007ffff538aa2b in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1003 #53 0x00007ffff3684968 in Sbk_QApplicationFunc_exec_ () from /usr/local/lib/python2.6/dist-packages/PySide/QtGui.so #54 0x00000000004a7cdf in PyEval_EvalFrameEx () #55 0x00000000004a95c1 in PyEval_EvalCodeEx () #56 0x00000000004a7752 in PyEval_EvalFrameEx () #57 0x00000000004a95c1 in PyEval_EvalCodeEx () #58 0x00000000004a9692 in PyEval_EvalCode () #59 0x00000000004c98be in PyRun_FileExFlags () #60 0x00000000004c9ad4 in PyRun_SimpleFileExFlags () #61 0x000000000041a6bd in Py_Main () #62 0x00007ffff69eac4d in __libc_start_main () from /lib/libc.so.6 #63 0x00000000004198d9 in _start () (gdb) q A debugging session is active. Inferior 1 [process 2899] will be killed. Quit anyway? (y or n) y ]0;mark:/tmp : exit exit Script done on Wed 09 Mar 2011 06:54:42 PM GMT
test.pyw
Description: Binary data
_______________________________________________ PySide mailing list [email protected] http://lists.pyside.org/listinfo/pyside
