[Qt-interest] QStackedWidget crash, but only when running in debugger

Andre Somers andre at familiesomers.nl
Wed Nov 4 14:21:03 CET 2009


Nobody?

Andre Somers wrote:
> Hi,
>
> I am running into an annoying problem using the debugger from Qt Creator 
> (from 2009.3 SDK for Windows XP). I am trying to debug a crash in my 
> application. The problem is, the application crashes at startup in the 
> debugger, while in the normal situation it runs perfectly fine using 
> exactly the same build (debug). The crash occurs at a moment a widget is 
> added to a QStackedWidget using addWidget(configuration).
>
> QWidget* configuration = ext->configurationWidget(0);
>
> if (configuration) {
>
> ui.propertyStack->addWidget(configuration);
>
> connect(ext, SIGNAL(closeConfiguration()), this, 
> SLOT(closePropertyConfiguration()));
>
> }
>
>
> The call is made at the third line of the code above. At the moment of 
> calling, both the QStackedWidget ui.propertyStack and the configuration 
> widget I am trying to add are perfectly valid pointers.
>
> This is the stacktrace I get. The call is made from the function at 
> level 6.
>
> 0    QObject::parent    qobject.h    243   
> 1    QWidget::parentWidget    qwidget.h    988   
> 2    QLayout::addChildWidget    qlayout.cpp    948   
> 3    QStackedLayout::insertWidget    qstackedlayout.cpp    213   
> 4    QStackedLayout::addWidget    qstackedlayout.cpp    193   
> 5    QStackedWidget::addWidget    qstackedwidget.cpp    166   
> 6    MatrixSetup::addPropertyExtension    matrixsetup.cpp    651   
> 7    MatrixSetup::initializePropertyExtensionTree    matrixsetup.cpp    
> 637   
> 8    MatrixSetup::MatrixSetup    matrixsetup.cpp    105   
> 9    Ui_MainUi::setupUi    ui_main.h    140   
> 10    MainUiMatrixCompiler::MainUiMatrixCompiler    mainui.cpp    15   
> 11    qMain    main.cpp    16   
> 12    WinMain    qtmain_win.cpp    136   
> 13    main        0   
>
> Can anyone please point me to an explanation on what's going on here, 
> and to get around it? It is very annoying that the debugger seems to 
> trigger bugs all by itself... That makes debugging *actual* problems 
> quite a bit harder and more time consuming than nessecairy.
>
> Thanks,
>
> André
>
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
>
>   




More information about the Qt-interest-old mailing list