Hi guys

Have been using this code with no problem up until now.
Now its suddenly started crashing when it gets to aMB.exec();
with memory bad access.
Signal name :
EXC_BAD_ACCESS

Has anyone got any ideas what might be happening.
I have cleaned and rebuilt and even turned the machine off and back on again.
Am using Mac OS X Lion.

Thanks.
Jeff

Qt Code:
  1. void JB_Utilities::debugMB(const QString &text,
  2. QWidget* parent,
  3. Qt::WindowModality aWindowModality)
  4. {
  5. cout << "ERROR: " << qPrintable(text) << endl;
  6. QMessageBox aMB(QMessageBox::Warning,
  7. "ERROR",
  8. text,
  9. parent);
  10. aMB.setWindowModality(aWindowModality);
  11. aMB.setDefaultButton(QMessageBox::Ok);
  12. aMB.exec();
  13. }
To copy to clipboard, switch view to plain text mode