开发者

qt crash, invalid parameter passed to C runtime function + exit code 3

I did an application using Qt (4.7.3). It runs perfectly on Linux (no errors, at least that's what valgrind says). When I compile it and run it on Windows (7 x64 w/ mingw + gcc 4.6.1) it always crashes (if I use the mingw that comes with the Qt SDK the same happens). I attached a debugger to the process to try to get some information, and this is what I got: invalid parameter passed to C runtime function and exit code 3

Any ideas?

EDIT: main m开发者_Python百科ethod code:

int main(int argc, char ** argv) {
   QApplication application(argc, argv);
   MainWindow main_window;
   main_window.show();
   return application.exec();
}

MainWindow::MainWindow(QWidget * parent) : QMainWindow(parent) {
   create_actions();
   create_menus();
   board_ = new Board(this); //QGraphicsScene subclass
   view_ = new QGraphicsView(board_, this);
   QGridLayout * main_layout = new QGridLayout();
   main_layout->addWidget(view_, 0, 0, 2, 1, Qt::AlignLeft | Qt::AlignTop);
   QWidget * main_widget = new QWidget(this);
   main_widget->setLayout(main_layout);
   setCentralWidget(main_widget);
}


The solution I found was a bug on another program caused by Qt's built in assert. If you follow the error line you could figure it out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜