[Qt-interest] Static destructors errors

marc at mferland.net marc at mferland.net
Fri Oct 16 19:08:48 CEST 2009


Quoting Brad Howes <howes at ll.mit.edu>:

> On Oct 16, 2009, at 11:04 AM, marc at mferland.net wrote:
>
>> If I place breakpoints inside the timerIdsDestructorFunction and add a
>> watch point for the iterator 'i', I get the following:
>>
>> (gdb) watch i
>> Watchpoint 9: i
>> (gdb) n
>> Watchpoint 9: i
>>
>> Old value = 1
>> New value = 399941192
>> 0x0000003b17a79977 in *__GI___libc_free (mem=0xcc2fd0) at malloc.c:
>> 3675
>> Current language:  auto; currently minimal
>> (gdb)
>
>
> Are you multithreaded? I had a similar (non-Qt) problem due to an
> initialization race condition in my code. These types of bugs are easy
> to create when you mix statics, DLLs and threads, and the order of
> initialization is not deterministic, which may be the case if multiple
> threads are running before DLLs get loaded.
>
> Brad

Yes we are, I'll take a look at this. Thanks for your suggestion!

Regards,
Marc




More information about the Qt-interest-old mailing list