The inferior stopped because it triggered an exception. Stopped in thread 0 by Exception...?


Complete Error Message in Debugger:

"The inferior stopped because it triggered an exception. Stopped in thread 0 by Exception 0xfbdeba, code: 0xc0000005: read access violation at 0x0, flags= 0x0."

I can compile my code without any error, but when I run it or debug, It crashes,

this error thrown when I used A QMessagebox to show a message, if I comment out this message program runs normally. I try to place QMessagebox in main.cpp just after Initializing of the QApplication the same error exist.

I can't understand what is the reason for this error???

Please guide me. I use QT 4.8.1 with msvc 2010 compiler.

And what I try to do: I try to change an open source application named Open-sankore (source-code here... ) and try to check that if user completed the registration form? if not show a messagebox to user.

I add a code part to UBApplication::exec(..)'s first line.

int UBApplication::exec(const QString& pFileToImport)

if(CheckLock() == -1)
   QMessageBox myBox;
   myBox.setText("Please Complete The Registration form to continue!");

After the error occurs debug cursur goes to UBBoardController.h and function below

UBBoardView* controlView()
        **return mControlView;**
asked on Stack Overflow Jul 5, 2013 by mesut • edited Jul 7, 2013 by mesut

3 Answers


I found that this error mostly happens when trying to use a variable that is not initialized.

answered on Stack Overflow Jul 18, 2013 by mesut • edited Aug 4, 2017 by Cody Gray

This error occurs when the unused object is deleted in the destructor.

answered on Stack Overflow Aug 4, 2017 by Fangzhi Huang • edited Aug 4, 2017 by Cody Gray

I have found one answer: this error occurs mostly happens when one pointer is not initialized. You should check UR code to find it. For example:

T* t;

Just make the pointer a "NULL".

answered on Stack Overflow Nov 29, 2019 by 钱承军 • edited Nov 29, 2019 by Vadim Kotov

User contributions licensed under CC BY-SA 3.0