PDA

View Full Version : Problems with graphicsscene since update to maemo qt4.7 with qt creator and madde



jamie721
28th October 2010, 23:01
I have been developing a game for some time know and everything has been working fine. As i had updated my mobile to the latest update pr1.3 maemo with qt 4.7 i thought i should update my qtcreator and madde install with the same qt4.7. Since i have done this my application seg faults when trying to start the game with the start game button.

i have used gdb on the device to do a call stack back trace and the here was the out put,

Programe recived signal SIGSEGV, Segmentation fault.
0x408e2384 in QGraphicsScene::focusItem() const ()
from /usr/lib/libqtgui.so.4

0x408e2384 <_ZNK14QGraphicsScene9focusItemEv+8>;

ldrr4,[r0,#4]

(gdb) bt

#1 0x408e2384 in QGraphicsScene::focusItem( const () from /usr/lib/libqtGui.so.4

#2 0x4089c108 in ??() from /usr/lib/libqtGUI.so.4

#3 0x4089c108 in ?? from /usr/lib/libqtgui.so.4

Backtrace stopped: previous frame identical to this fram(currupt stack?)


The problem is i dont use the focusItem() method and i not sure what to do next to try and understand why this error is happening.

Just on a side note how come i cant see the two method names with question marks ?

cheers in advanced.


Edit: I forgot to mention the game still works on qtSimulator but not on qemu and not on my phone.

wysota
28th October 2010, 23:52
Did you rebuild the application after updating Qt to the version that comes with pr1.3?

jamie721
29th October 2010, 00:25
lol yep many times. I have had this issue for a few days now and have been trying to work out if its something in my code. But something is bothering me that it worked in the previous version and it works in qt simulator still.

cheers for the quick reply have brought this up on maemo.org comunity's talk page but no one seems to respond.

any other sugestions?

collidingmice example works.

I just had a thought maybe its something to do with the debian package. What i will try is delete it then recreate it from scratch maybe some left over information has broken it.

kinda along the lines of what you were saying.

Deleted all debian package stuff make cleaned it the qmake then make. No change :(

wysota
29th October 2010, 00:36
This backtrace is useless. Try retracing your steps - what exactly did you do to make the software break? Try cleaning the build completely and rebuild the project from scratch in debug mode. Run it under debugger and try to get some useful backtrace which can trace the problem from the crash up to main(). It could be that your update was incomplete (mine crashed the first time I ran it).

As for the simulator - this is a completely different platform than Maemo/ARM, in practice it does a desktop build so the recent SDK update probably didn't update the Simulator target at all.

jamie721
29th October 2010, 00:39
Deleted all debian package stuff make cleaned it then qmake then make. No change :(

This is the problem i havent changed a thing between the two builds.

all i have done is update my phone to qt4.7

and my madde to qt 4.7

Sorry if i didnt make my self clear before.

Yes i understand the diffence between the qemu and qt simulator. Should a seg fault apear on one and not the other. As i thought a seg fault was to do with trying to acces memmory that you are not aloud to.


Intrestingly enough the last qDebug() statement i get is befor the ui->stackedWidget->setCurrentIndex(GameScreenView);

wysota
29th October 2010, 00:49
Segfault can be a manifestation of many different kinds of errors. Try installing a clean copy of NokiaQtSDK and see if it helps anything. If it doesn't help, try pinpointing the problem with a smallest possible example of code.

jamie721
29th October 2010, 14:58
funny you should say reinstall nokiaqtsdk. when i updated to madde qt4.7 it failed because i had qtcreator open still wopps. Then when i tryed to re-update the update didnt show. so i uninsatlled the hole nokiaqtsdk redownloaded it then reinstalled it so i am working with a fresh copy.

Altho i did have a qt creator daily build installed in a seperate place which i left as i like that version.

ok gonna have to rip my game appart il let you know how i get on.

jamie721
31st October 2010, 12:21
Wooop Woop Wooop. I have finaly found the changes that have been made to the way in wich the graphics scene and graphics view work.

ok here we go I have a stacked widget which holds the diffrent windows in my gui.

Before qt4.6.

i could tell the stacked window to set its index to the the one with the graphics view before i had actualy associated the graphics view with a scene.

Now since qt4.7 nokia version at least.

I must associate a scene with the graphics view before i try and set the index for the stacked window.

The only issue now is that all my objects are placed in the incorect positions.

Im not sure why this is maybe its something to do with where the graphics view is positioned before my transition happens.

I dont know yet but i will report back as soon as i have worked it out.

If you would still like a simple peice of code to demonstarate the issue i will happily provide.

I would like to thank woysota for his intrest and love the borg TOO!!