[Qt-interest] crash in destructor of mainwindow?

Matthias Pospiech matthias.pospiech at gmx.de
Mon Jul 12 11:26:35 CEST 2010


I get this crash, which I do not understand:

Stack Trace:

0    QObjectPrivate::deleteChildren    qobject.cpp    1978    0x6a20f02b   
1    ~QWidget    qwidget.cpp    1469    0x006ac6f3   
2    ~QDialog    qdialog.cpp    328    0x00aeaeb4   
3    ~DialogCameraSMX    DialogCameraSMX.cpp    24    0x00401c9c   
4    QObjectPrivate::deleteChildren    qobject.cpp    1978    0x6a20f038   
5    ~QWidget    qwidget.cpp    1469    0x006ac6f3   
6    ~QMainWindow    qmainwindow.cpp    341    0x00a4149c   
7    ~MainWindow    mainwindow.cpp    22    0x0040175f   
8    main    main.cpp    9    0x00401419   


crash in last line of:

void QObjectPrivate::deleteChildren()
{
    const bool reallyWasDeleted = wasDeleted;
    wasDeleted = true;
    // delete children objects
    // don't use qDeleteAll as the destructor of the child might
    // delete siblings
    for (int i = 0; i < children.count(); ++i) {
        currentChildBeingDeleted = children.at(i);
        children[i] = 0;
        delete currentChildBeingDeleted;


Why does this happen?

Matthias



More information about the Qt-interest-old mailing list