c++ - Qt: MainWindow->show() crashes program on call -
i've been working on program using qt in c++ , far good. needed program moved machine. have subversion, committed every file in project folder , checked out on new machine. after jumping through hoops build , running, error:
assert: "dst.depth() == 32" in file qgl.cpp,. invalid parameter passed c runtime function qt i tried stepping through program find point crashes , found after had been initialized , show() called class inherits qmainwindow class. c->showview() line calls qmianwindow->show().
----------main.cpp------------ #include <qapplication> #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->showview(); <- error here return a.exec(); } the confusing part of problem program works fine on machine when show() called. don't know different between 2 machines make program behave differently. both use same version of qt (sdk 2010.05). both developing eclipse. difference can find compiler mingw 4.5.0 , other machine's mingw 4.5.2.
edit 1:
this controller::showview() looks like.
void controller::showview() { mview->show(); } and how mview initialized.
mview = new view(mmodel, this);
Comments
Post a Comment