![]() |
App that runs on emulator segfaults on device?
Hi, I spent most of today setting up the maemo sdk/dev environment and managed to get an existing Qt app to build and run nicely in the emulator on Xephyr. However, when I transfer the executable onto my n900, it segfaults. Just that - "segmentation fault", with no additional details.
I'm somewhat baffled :( I tried again with a simple "Hello world" qt app and that one works flawlessly, so I must be doing at least most of the building/deploying procedures right. And the offending application works nicely on the emulator so the code should be mostly alright too(?). Any idea what might be the cause of the segfault? How different is the emulator environment from the one in the actual n900? |
Re: App that runs on emulator segfaults on device?
Are you compiling for the right target?
What is the command you are using to compile? |
Re: App that runs on emulator segfaults on device?
Thanks for the reply. I compile for X86 when testing on the emulator, then compile for Armel to transfer onto my device. I've done this for a 'hello world' qt app and it seems to work, so I think that's the correct way to do it?
I'm using the standard qt commands qmake, then make. I left out qmake -project because the app already had a .pro file. Could this be a problem? |
Re: App that runs on emulator segfaults on device?
Quote:
I'm experiencing the same problem. I'm using the latest Maemo SDK and qthelloworld runs fine on the emulator, but segfaults on my N900. Any pointers are really appreciated! _steve. |
Re: App that runs on emulator segfaults on device?
obvyst: I didn't have a problem with a hello world app. As above noted you need to make sure you compile for the right target. There should be two possible targets - X86, which runs on the emulator but not the n900, and Armel which works on the n900 but not the emulator. So after testing on the emulator, you need to compile the same code for Armel and transfer that result to the n900.
|
Re: App that runs on emulator segfaults on device?
Do you "make distclean" before changing targets?
Do you have right Qt on your device? SDK uses 4.6.2, but there is only 4.5.3 in repos. Try libqt4-maemo5 and qmake from its directory (somewhere in /opt) for Armel target. Do you have any odd things in your program? For example: Code:
char Buff[3]; |
Re: App that runs on emulator segfaults on device?
SDK is not an emulator.
SDK is not an emulator. SDK is not an emulator. SDK is not an emulator. SDK is not an emulator. Thanks. |
Re: App that runs on emulator segfaults on device?
Quote:
@slobodsky: Thanks. I'm a newbie, so forgive the ignorance: 1. How do I determine which version of QT is on my device? 2. Which is the standard version of QT that's distributed with the latest Fremantle image? 3. Is there a compatibility flag on qmake that I can use to generate binaries that link with earlier versions of QT? Thanks in advance! @andre: I thought the meaning of what I said was implied, but thanks for pointing it out anyways. _steve. |
Re: App that runs on emulator segfaults on device?
Quote:
1) Installed Qt4.6 libraries on the device. 2) In the scratchbox, switched to ARMEL target and then used these commands to link the correct version of libaries. Code:
[sbox-FREMANTLE_ARMEL: ~] > /opt/qt4-maemo5/bin/qmake AFAIK "qmake" will use Qt4.5 libraries and "/opt/qt4-maemo5/bin/qmake" will use Qt4.6.2. P.S: For segmentation fault issues, using GDB debugger on your device will help alot in identifying the actual problem. |
Re: App that runs on emulator segfaults on device?
PR 1.2 solves this - woohoo! Hopefully Qt 4.6 will be (binary) backward compatible with 4.5.x in all cases, as promised.
_steve. |
All times are GMT. The time now is 15:19. |
vBulletin® Version 3.8.8