I turn on the PC, the code compiles, the application runs. I close the application, and run again, but it crashes with error A I close and run again, it just hangs while trying to create MainWindow. I restart PC, and back to top, the application runs one time.
Even if I remove the members initialization list, it doesn't change.
The error might be something strange. I am using boost::interprocess
to create shared memory, but I tried commenting this out, and still the same.
I am compiling against Qt 4.8.6.
so from the point of constructor parameters, should be fine.
ideas?
main.cpp:
...
cout<< "something"; //this prints
MainWindow w(ce); //hangs when reaching this line
cout<< "whatever"; //this does NOT print
...
mainwindow.h:
explicit MainWindow(CreateEvents *ce, QWidget *parent = 0);
MainWindow.cpp:
//includes etc
...
//MainWindow constructor here:
MainWindow::MainWindow(CreateEvents *ce, QWidget *parent) :
QMainWindow(parent),
ui(new Ui::MainWindow),
shWriter() {
qDebug("MainWindow CONSTRUCTOR!"); //this does NOT print
...