title: Qt: MainWindow->show() crashes program on call
body: <p>I've been working on this program using Qt in c++ and so far so good. However I then needed to get this program moved to another machine. I have subversion, so I committed every file in the project folder and checked it out on the new machine. After jumping through some hoops to get it to successfully build and running, I get this error:</p>
  
  <pre><code> ASSERT: "dst.depth() == 32" in file qgl.cpp,.
   invalid parameter passed to c runtime function qt
  </code></pre>
  
  <p>I tried stepping through the program to find the point where it crashes and found that it was after everything had been initialized and show() is called for the class that inherits the QMainWindow class. The <em>c->showView()</em> line calls QMianWindow->show().</p>
  
  <pre><code> ----------main.cpp------------
   #include &lt;QApplication&gt;
  
   #include "ModelI.h"
   #include "ControllerI.h"
   #include "Model.h"
   #include "Controller.h"
  
  
   int main(int argc, char *argv[])
   {
        QApplication a(argc, argv);
        ModelI *m = new Model();
        ControllerI *c = new Controller(m);
        c-&gt;showView();                         &lt;- ERROR HERE
        return a.exec();
   }
  </code></pre>
  
  <p>The confusing part of the problem is that the program works perfectly fine on my machine when show() is called. I don't know what could be different between the two machines to make the program behave so differently. Both use the same version of Qt (SDK 2010.05). Both are developing with Eclipse. The only difference I can find is that my compiler is MinGW 4.5.0 and the other machine's is MinGW 4.5.2.</p>
  
  <p><strong>EDIT 1:</strong></p>
  
  <p>This is what Controller::showView() looks like.</p>
  
  <pre><code> void Controller::showView()
   {
       mView-&gt;show();
   }
  </code></pre>
  
  <p>And this is how mView is initialized.</p>
  
  <pre><code> mView = new View(mModel, this);
  </code></pre>