https://bugs.kde.org/show_bug.cgi?id=376595

--- Comment #20 from Ian Haber <master.ha...@gmail.com> ---
I have created a simple test program that causes the crash. 
//main.cpp
int main(int argc, char* argv[])
{
    QApplication applicationInstance(argc, argv);
    testGDBCrash crasher;
    if (crasher.exec() != QDialog::Accepted)
        return 0;
    return applicationInstance.exec();
}
//testGDBCrash.h
#ifndef TESTGDBCRASH_H
#define TESTGDBCRASH_H
#include <QDialog>
#include <QObject>
class testGDBCrash : public QDialog
{
    Q_OBJECT
public: 
    testGDBCrash(QWidget * parent=0);
    Q_SLOT void TestCrash();
    bool m_bInUpdate; 
};
#endif // TESTGDBCRASH_H
//testGDBCrash.cpp
#include "testGDBCrash.h"
#include <QPushButton>
#include <QHBoxLayout>
testGDBCrash::testGDBCrash(QWidget* parent):QDialog(parent)
{
    resize(200,100);
    QHBoxLayout * layout=new QHBoxLayout(this);
    QPushButton * pb=new QPushButton("crash",this);
    layout->addWidget(pb);
    setLayout(layout);
    show();
    m_bInUpdate=false;

    connect(pb,SIGNAL(clicked()),this,SLOT(TestCrash()));
}
void testGDBCrash::TestCrash()
{
    if(m_bInUpdate)
        return;
    m_bInUpdate=false;
    m_bInUpdate=true;
    m_bInUpdate=false;
}

Steps to crash:
1. Run
2. put a breakpoint on line 18 of testGDBCrash.cpp (the if statement)
3. break on change for m_bInUpdate
4. Continue
5. Watch crash.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to