![]() |
2010-06-10
, 23:36
|
|
Posts: 1,296 |
Thanked: 1,773 times |
Joined on Aug 2009
@ Budapest, Hungary
|
#2
|
![]() |
2010-06-10
, 23:37
|
Posts: 35 |
Thanked: 64 times |
Joined on Aug 2006
@ Somerville, MA
|
#3
|
![]() |
2010-06-10
, 23:44
|
Posts: 5 |
Thanked: 1 time |
Joined on Jun 2010
@ UK
|
#4
|
This usually happens when there is a segmentation fault happening in the application.
#include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton hello("Hello world!"); hello.show(); return app.exec(); }
![]() |
2010-06-10
, 23:46
|
Posts: 5 |
Thanked: 1 time |
Joined on Jun 2010
@ UK
|
#5
|
Sounds like you need to implement support for D-Bus communication with the app; I suspect you have it configured to advertise itself as supporting D-Bus, but haven't yet added the code to actually do so. A few of us have run afoul of this, as discussed in this thread. As mentioned there, this article outlines what's needed.
![]() |
2010-06-10
, 23:52
|
|
Posts: 1,296 |
Thanked: 1,773 times |
Joined on Aug 2009
@ Budapest, Hungary
|
#6
|
I can't see much room for error there !!
Anyone else care to try to compile the example and leave it running on the device for a few minutes and see what happens?
![]() |
2010-06-11
, 00:17
|
Posts: 35 |
Thanked: 64 times |
Joined on Aug 2006
@ Somerville, MA
|
#7
|
![]() |
2010-06-11
, 05:21
|
Posts: 726 |
Thanked: 345 times |
Joined on Apr 2010
@ Sweden
|
#8
|
The upshot is that if you haven't actually added the few lines of C++ code needed to handle those D-Bus messages, the application will crash when the first message gets delivered to it because the code that's expected to be there isn't. As in erwi's experience, I typically noticed this occurring after the app had been open for a couple of minutes, even if it was idle; that's just when the next D-Bus communication from the system happened. The exact same binary launched from the command line would run fine for days, because launching it that way doesn't register it as a D-Bus service, and Maemo doesn't try sending any messages to it.
Has anyone encountered spontaneous program termination problems of Qt apps?
I followed the MADDE hello world example (http://wiki.maemo.org/MADDE/Qt_Example), which compiles fine and creates a (seemingly) correct debian package that installs fine on the n900. I can post the code, project file and generated makefile if requested, but they are all generated by the “mad pscreate -t qt_simple qthello” command, as given in the MADDE tutorial.
The program is compiled on a Ubuntu 9.04 AMD64, and the package is copied over using the USB cable.
The hello world application starts as expected, but when left running on the device, it always terminates after about 2 minutes +- a couple of seconds. I have timed this. The window closes, but no error messages are displayed. The program works fine in Qt Simulator or when launched on the n900 from PC over the USB cable.
I have already tried flashing with latest FIASCO & eMMC, as that seems to be the default suggestion to fix problems, but the problem persists. I don't seem to have this problem with other applications, only the ones compiled by me
Any suggestions?