Qt Simulator to Symbian Device Porting Problems
Hello, like my other post, I'm having a different problem with porting to my Nokia N8. Basically, I've gone through the code and replaced all my other draw calls and opengl stuff with shaders and gotten it to work in the Qt Simulator using what I believe to be just OpenGL ES calls (since the compiler isn't complaining about any of the code any more when I select Symbian Anna as the build target. So again, I'm able to play the game perfectly fine in the simulator, but when I use Symbian Anna as the build target, problems arise.
There are no compilation problems when I start to run it, then it'll do some stuff: Begin constructing QMainWindow, construct the QGLWidget entirely (seems to be ok), the continue through constructing the QMainWindow and when it's finished that (i.e. BEFORE it's gotten to the initializeGL() stuff, I get this error:
Thread has crashed: A data abort exception has occurred accessing 0x10.
I don't know what things are run between the completion of the constructors and the initializeGL(). Has anyone else had this problem before and know the remedy?
I removed about 99% of the code and am still getting the error...
Here's my main:
@int main(int argc, char *argv)
QApplication app(argc, argv);
MainWindow mainWindow; mainWindow.setOrientation(MainWindow::ScreenOrientationLockLandscape); mainWindow.showFullScreen(); return app.exec();
From main, mainWindow is called:
GLWidget * glwidget = new GLWidget(this);
//qDebug() << "Done constructing glwidget. setting layout.";
QGridLayout * layout = new QGridLayout(); layout->addWidget(glwidget); this->setLayout(layout); //qDebug() << "Constructing timer."; QTimer *timer = new QTimer(this); //qDebug() << "Connecting timer signal"; QObject::connect(timer, SIGNAL(timeout()), glwidget, SLOT(updateGL())); //qDebug() << "Starting timer."; timer->start(50);
Then from there, GLWidget is created:
@GLWidget::GLWidget(QWidget * parent)
: QGLWidget(QGLFormat(QGL::SampleBuffers), parent)
setAutoBufferSwap(false); setFixedSize(640,360); makeCurrent();
I've commented almost everything out, initializeGL(), paintGL(), and resizeGL() are now just empty methods. I don't know what else I can do to track down this error/bug. Any suggestions?
I've somehow gotten it to work by creating an entirely new project with just a symbian target and copying all my stuff over (unchanged). Is there a known issue regarding projects with both the qt simulator target and the symbian device target?