[Qt-interest] SIGSEGV with single-line gdb backtrace

Josiah Bryan jbryan at productiveconcepts.com
Mon Sep 28 03:51:34 CEST 2009


Bill King wrote:
> On 09/28/2009 11:38 AM, ext Josiah Bryan wrote:
>> Hey All -
>>
>> I'm working on a project that uses ffmpeg to decode video that plays in 
>> a QGraphicsItem in a QGraphicsView. The scene/items are reused in a 
>> custom QAbstractListView to paint thumnail snaphots of the scene as its 
>> being edited.
>>
>> Well, as the program is loading, it goes through the process of building 
>> the snapshots - then all of a sudden, throws a SIGSEGV. Being a good 
>> little programmer, I run it inside gdb, and when it dies, I ask gdb for 
>> a backtrace (bt). Much to my suprise, it gives a single line backtrace. 
>> Right before the SIGSEGV, I get a bunch of QThread destroyed errors:
>>
>> QThread: Destroyed while thread is still running
>> QThread: Destroyed while thread is still running
>>
>> Then the sigsegv:
>>
>> Program received signal SIGSEGV, Segmentation fault.
>> 0x0063ca47 in ?? ()
>> (gdb) bt
>> #0  0x0063ca47 in ?? ()
>>
>> Any ideas on how to figure this one out? I mean, this could be in any 
>> number of areas of the code - how can I isolate the crash with no stack 
>> trace?
>>
>> Thanks!
>> -josiah
>>
>>
>>
>> _______________________________________________
>> Qt-interest mailing list
>> Qt-interest at trolltech.com
>> http://lists.trolltech.com/mailman/listinfo/qt-interest
>>   
> Try using valgrind, --tool=memcheck or possibly also --tool=helgrind
> I'd have a look at what's destroying your thread, you may have some 
> race conditions going on.
Bill - thanks for the quick response.

helgrind isn't working (according to valgrind) in my current version of 
valgrind. memcheck reports various lost memory, but no help finding a 
SIGSEGV. In fact, the SIGSEGV didn't even occur during any valgrind 
sessions I just ran, but the program *did* run very very slow. Which 
leads me to believe that the SIGSEGV is being caused by some wierd 
thread interaction.

But how to you debug *that* beast?

Thanks,
-josiah




More information about the Qt-interest-old mailing list