[Qt-interest] My program keeps crashing in qt 4.5

rfl brak at brak.pl
Wed Mar 4 21:03:31 CET 2009


środa, 4 marca 2009 11:36 - Srdjan Todorovic

> Hi,
> 
> 2009/3/4 rfl <>:
>> Hi
>> My program keeps crashing in qt 4.5 (worked well with qt 4.4).
>>
>> When I run my program in debugger it works ok, so I cannot find out
>> where the problem is.
>>
>> Does Anyone know what could be the problem?
> 
> No, don't have my crystal ball with me. ;)
> 
>> PS
>>
>> I am using latest SDK package for
>> windows(qt-sdk-win-opensource-2009.01).
> 
> I assume you can do a Windows equivalent to the Unix coredump? Run
> your program, collect a core dump, run that through a debugger and see
> if that helps you.
> 

I don't know how to generate coredump on windows so I have tested it on
Linux and using gdb I was able to find out where the problem was. 

The problem was that I was trying to delete action in slot connected to
QAction::triggered(). My slot worked proprely but same of QMenu internal
functions (probably QMenu::findIdForAction()) crashed (how this could work
in qt 4.4?).

I have changed "delete action" to "action->deleteLater()" and now it is
working as expected.

Thank you for your help.

Regards




More information about the Qt-interest-old mailing list