title: The inferior stopped because it triggered an exception. Stopped in thread 0 by Exception...?
body: <p>Complete Error Message in Debugger: </p>
  
  <p><strong>"The inferior stopped because it triggered an exception. Stopped in thread 0 by Exception
  0xfbdeba, code: 0xc0000005: read access violation at 0x0, flags= 0x0."</strong></p>
  
  <p>I can compile my code without any error, but when I run it or debug, It crashes, </p>
  
  <p>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.</p>
  
  <p>I can't understand what is the reason for this error???</p>
  
  <p>Please guide me.
  I use <strong>QT 4.8.1 with msvc 2010 compiler.</strong></p>
  
  <p>And what I try to do: I try to change an open source application named Open-sankore (source-code <a href="http://dev.open-sankore.org/xwiki/bin/view/Community/SourceRepository" rel="noreferrer">here</a>... ) and try to check that if user completed the registration form? if not show a messagebox to user.</p>
  
  <p>I add a code part to UBApplication::exec(..)'s first line.</p>
  
  <pre><code>int UBApplication::exec(const QString&amp; pFileToImport)
  {
  
  if(CheckLock() == -1)
  {
     QMessageBox myBox;
     myBox.setText("Please Complete The Registration form to continue!");
     myBox.setWindowTitle("Warning!");
     myBox.exec();
  }
  </code></pre>
  
  <p>After the error occurs debug cursur goes to UBBoardController.h and function below</p>
  
  <pre><code>UBBoardView* controlView()
      {
          **return mControlView;**
      }
  </code></pre>