[PyKDE] Crashing problems, suggestions?
Matt Newell
newellm at blur.com
Thu Mar 1 22:12:46 GMT 2007
On Thursday 01 March 2007 12:36, Kevin Cureton wrote:
> Since I converted my application from PyQt3 to PyQt4, I've run into
> some issues with the threading.
>
> 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.
>
> 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).
>
> 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.
>
> 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).
>
> --kev
>
What kind of data structures are you using in your worker thread? I was
having some stability issues with implicitly shared( via reference counting )
database classes that were being loaded in a worker thread. I was able to
fix them by using QBasicAtomic instead of an int for reference counting. May
not be at all relevant to your situation, but something to think about.
Matt
More information about the PyQt
mailing list