title: "Internal error: pc 0x0 in read in psymtab, but not in symtab." error in QT while trying to implement simple MVC
body: <p>I'm trying to implement a simple MVC in QT. The goal is to have a single rendering widget, a model, and a controller. The controller will be an abstract base class with a &quot;render&quot; method, so each controller knows how to draw its model given something to paint on. I've built a very simple sample of what I'm trying to accomplish, but when debugging, the following error is displayed almost immediately:</p>
  <p><strong>Internal error: pc 0x0 in read in psymtab, but not in symtab.</strong></p>
  <p>I've stripped away as much as I could to reproduce the error. Although the code will run and exit with what's displayed below, attempting to create the RenderWidget will lead to several errors, including a Segmentation Fault crash (in debug mode).</p>
  <p>Any help would be appreciated. I've included the minimum code required to reproduce this error below. This was made in an empty QT Widget project <strong>without</strong> forms.</p>
  <h1>Update 1</h1>
  <p>I've spent some more time fighting with this error and I've narrowed it down further. I've trimmed the code down even further and moved it all into a single Main.cpp file, as per Mitch's suggestion. The error appears if you place a breakpoint in the Main method and step into the MainWindow constructor.</p>
  <h2>Main.cpp</h2>
  <pre><code>#include &lt;QApplication&gt;
  #include &lt;QWidget&gt;
  #include &lt;QMainWindow&gt;
  
  class RenderWidget : public QWidget
  {
      Q_OBJECT
  public:
      explicit RenderWidget(QWidget *parent = 0);
  };
  
  RenderWidget::RenderWidget(QWidget *parent) :
      QWidget(parent)
  {
  }
  
  class MainWindow : public QMainWindow
  {
      Q_OBJECT
  
  public:
      MainWindow(QWidget *parent = 0);
      ~MainWindow();
  
  private:
      RenderWidget* m_renderArea;
  };
  
  MainWindow::MainWindow(QWidget *parent)
      : QMainWindow(parent)
  {
      m_renderArea = new RenderWidget(this);
  }
  
  MainWindow::~MainWindow()
  {
  
  }
  
  int main(int argc, char *argv[])
  {
      QApplication a(argc, argv);
      MainWindow w;
      w.show();
  
      return a.exec();
  }
  
  #include &quot;main.moc&quot;
  </code></pre>