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!");
myBox.setWindowTitle("Warning!");
myBox.exec();
}
After the error occurs debug cursur goes to UBBoardController.h and function below
UBBoardView* controlView()
{
**return mControlView;**
}
I found that this error mostly happens when trying to use a variable that is not initialized.
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;
t=NULL;
Just make the pointer a "NULL".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With