[Qt-interest] SIGSEGV with single-line gdb backtrace
Thiago Macieira
thiago at kde.org
Mon Sep 28 07:51:26 CEST 2009
Em Segunda-feira 28. Setembro 2009, às 03.38.33, Josiah Bryan escreveu:
> QThread: Destroyed while thread is still running
Put a breakpoint in this warning in qthread.cpp. (line 407 in Qt 4.5.2)
Your program will stop when it detects you destroyed a QThread that is still
running. Fix these warnings first, because they indicate that there's a
threading issue.
In another email, you said:
> Alright, I narrowed it down using the good old-fashioned
> "comment-out-lines-until-it-stops-crashing" method - and narrowed it
> down to an obscure place in the destructor of my video decoder QThread:
> At one point, I free all the libav stuff allocated, and one of the lines
> does this:
>
> av_free(m_av_frame);
You're probably freeing a pointer that is in-flight. This is a threading issue.
I really recommend you use helgrind (which means upgrading valgrind).
Note that you said you're freeing in the destructor. And note that QThread
warned you that the thread is *still* running. Therefore, it's probably still
changing its data.
Conclusion: do not leave Qt warnings unfixed. Fix them all.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
Senior Product Manager - Nokia, Qt Development Frameworks
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
Qt Developer Days 2009 | Registration Now Open!
Munich, Germany: Oct 12 - 14 San Francisco, California: Nov 2 - 4
http://qt.nokia.com/qtdevdays2009
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
Url : http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090928/5d97d539/attachment.bin
More information about the Qt-interest-old
mailing list