<HTML><BODY style="word-wrap: break-word; -khtml-nbsp-mode: space; -khtml-line-break: after-white-space; "><DIV>Since I converted my application from PyQt3 to PyQt4, I've run into some issues with the threading.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I ran into the deadlock problems a while back and managed to avoid it by only sending signals from QThreads to the main thread. The main thread, instead of sending signals or events to the QThreads, would instead hand them work via a thread-safe queue I wrote. Doing that avoided the deadlock problem but appeared to uncover another issue. Consistent crashes.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm not going to claim this is a PyQt or Qt issue. It could very well be my failure to protect some resource with a mutex. However, after various attempts over the past month, I need to take some focused time and resolve this issue. I've attached a crash trace. We are running the application on both Mac and Linux and similar results (though I don't have a Linux trace available currently).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I'm looking for some ideas on how to approach debugging this problem (or web pages that can help). I'm hoping to create a small, scoped test case that demonstrates this problem and get that sent to the list. Until then, any ideas or thoughts on how to proceed would be greatly appreciated.</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>I am currently running Qt 4.2.2, and the sip and PyQT4 snapshots from 20070227 on both a Powerbook (PPC, 10.4.8) and a Mac Pro (Intel, 10.4.8).</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>--kev</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Date/Time: 2007-03-01 12:24:00.858 -0800</DIV><DIV>OS Version: 10.4.8 (Build 8N1430)</DIV><DIV>Report Version: 4</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Command: Python</DIV><DIV>Path: /Library/Frameworks/Python.framework/Versions/2.5/Resources/Python.app/Contents/MacOS/Python</DIV><DIV>Parent: tcsh [547]</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Version: 2.5a0 (2.5alpha0)</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>PID: 1862</DIV><DIV>Thread: 0</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Exception: EXC_BAD_ACCESS (0x0001)</DIV><DIV>Codes: KERN_PROTECTION_FAILURE (0x0002) at 0x0000001c</DIV><DIV><BR class="khtml-block-placeholder"></DIV><DIV>Thread 0 Crashed:</DIV><DIV>0 QtCore <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x013b17fb QObject::thread() const + 9</DIV><DIV>1 QtCore <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x013a7790 QCoreApplicationPrivate::checkReceiverThread(QObject*) + 22</DIV><DIV>2 QtGui <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x0284e4ef QApplication::notify(QObject*, QEvent*) + 151</DIV><DIV>3 QtGui.so <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x022fbc5b sipQApplication::notify(QObject*, QEvent*) + 97</DIV><DIV>4 QtGui <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x0288600c QApplicationPrivate::globalEventProcessor(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 1858</DIV><DIV>5 com.apple.HIToolbox <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x92dd986b DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1093</DIV><DIV>6 com.apple.HIToolbox <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x92dd8f10 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304</DIV><DIV>7 com.apple.HIToolbox <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x92dd8dd5 SendEventToEventTargetWithOptions + 55</DIV><DIV>8 com.apple.HIToolbox <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x92de0357 ToolboxEventDispatcherHandler(OpaqueEventHandlerCallRef*, OpaqueEventRef*, void*) + 357</DIV><DIV>9 com.apple.HIToolbox <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x92dd9c22 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 2044</DIV><DIV>10 com.apple.HIToolbox <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x92dd8f10 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 304</DIV><DIV>11 com.apple.HIToolbox <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x92de01f0 SendEventToEventTarget + 56</DIV><DIV>12 QtGui <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x0288027c qt_mac_send_event(QFlags<QEventLoop::ProcessEventsFlag>, OpaqueEventRef*, OpaqueWindowPtr*) + 122</DIV><DIV>13 QtGui <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x0288ca1e QEventDispatcherMac::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 594</DIV><DIV>14 QtCore <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x013a74a8 QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 54</DIV><DIV>15 QtCore <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x013a7686 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 132</DIV><DIV>16 QtCore <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x013aa385 QCoreApplication::exec() + 179</DIV><DIV>17 QtGui.so <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x022feeeb meth_QApplication_exec_ + 97</DIV><DIV>18 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x00297818 PyEval_EvalFrameEx + 18969 (ceval.c:3566)</DIV><DIV>19 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x0029967e PyEval_EvalCodeEx + 1819 (ceval.c:2833)</DIV><DIV>20 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x0022efd7 function_call + 320 (funcobject.c:517)</DIV><DIV>21 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x0020dec3 PyObject_Call + 45 (abstract.c:1860)</DIV><DIV>22 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x002159e4 instancemethod_call + 401 (classobject.c:2493)</DIV><DIV>23 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x0020dec3 PyObject_Call + 45 (abstract.c:1860)</DIV><DIV>24 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x00295b49 PyEval_EvalFrameEx + 11594 (ceval.c:3777)</DIV><DIV>25 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x002984e0 PyEval_EvalFrameEx + 22241 (ceval.c:3652)</DIV><DIV>26 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x002984e0 PyEval_EvalFrameEx + 22241 (ceval.c:3652)</DIV><DIV>27 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x0029967e PyEval_EvalCodeEx + 1819 (ceval.c:2833)</DIV><DIV>28 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x00299832 PyEval_EvalCode + 87 (ceval.c:500)</DIV><DIV>29 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x002bc7e8 PyRun_FileExFlags + 264 (pythonrun.c:1264)</DIV><DIV>30 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x002bcba9 PyRun_SimpleFileExFlags + 640 (pythonrun.c:870)</DIV><DIV>31 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x002ca1e4 Py_Main + 2915 (main.c:496)</DIV><DIV>32 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x00001f8e 0x1000 + 3982</DIV><DIV>33 org.python.python <SPAN class="Apple-tab-span" style="white-space:pre">        </SPAN>0x00001eb5 0x1000 + 3765</DIV><DIV><DIV><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><SPAN class="Apple-style-span" style="border-collapse: separate; border-spacing: 0px 0px; color: rgb(0, 0, 0); font-family: Helvetica; font-size: 11px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; text-align: auto; -khtml-text-decorations-in-effect: none; text-indent: 0px; -apple-text-size-adjust: auto; text-transform: none; orphans: 2; white-space: normal; widows: 2; word-spacing: 0px; "><DIV><BR class="khtml-block-placeholder"></DIV><DIV>--</DIV><DIV>Kevin Cureton</DIV><DIV>Co-Founder</DIV><DIV>Mind The Gap, Inc.</DIV><DIV><A href="mailto:kevin@animationpipeline.com">kevin@animationpipeline.com</A></DIV><A href="http://www.animationpipeline.com">http://www.animationpipeline.com</A><BR class="Apple-interchange-newline"></SPAN></SPAN></SPAN></SPAN> </DIV><BR></DIV></BODY></HTML>