Collectives™ on Stack Overflow

Find centralized, trusted content and collaborate around the technologies you use most.

Learn more about Collectives

Teams

Q&A for work

Connect and share knowledge within a single location that is structured and easy to search.

Learn more about Teams

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

Ask Question

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 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".

The same error was encountered with the reason "Smart Pointer was destroyed twice".

class A
public:
    ~A() {};   // doThing() must be called before the destructor
    void doThing()
        m_edit->deleteLater();
private:
    std::unique_ptr<XTextWidget> m_edit;

Solution: just delete the line m_edit->deleteLater();

Thanks for contributing an answer to Stack Overflow!

  • Please be sure to answer the question. Provide details and share your research!

But avoid

  • Asking for help, clarification, or responding to other answers.
  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.