Re: Qt application crashes after 2 minutes if started from app grid
Hello Conny, AFAIK you don't need to bother with D-Bus at all if you're not actually using it. If your app is open source, I could take a look at the code to try help out. Cheers, Timur On 05/09/2011 04:04 PM, Cornelius Hald wrote: Hi all! I've got a bit a weird problem. I'd we happy if anyone could give me a hint. My Qt (QML/C++) app terminates after exactly 2 minutes if it was started via the graphical launcher. If I start it from the terminal it runs fine for hours. I think this could be connected with D-Bus, but I'm not sure how/where to look. In Gtk+ apps we had to register with D-Bus after start-up. If we didn't do so, the app was killed after some time. I thought with Qt that QApplication takes care of this. Is this true, or do I have to register manually? Thanks! Conny ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Qt application crashes after 2 minutes if started from app grid
Hi Timur, unfortunately I currently can't provide the complete sources. I don't think I have something special in there. My main() looks mostly like this: int main(int argc, char *argv[]) { #if defined(Q_OS_SYMBIAN) QApplication::setGraphicsSystem(openvg); #else QApplication::setGraphicsSystem(raster); #endif QApplication app(argc, argv); // Export types to QML qmlRegisterTypeGuideListModel(); qmlRegisterTypePoiListModel(); qmlRegisterTypeTourListModel(); qRegisterMetaTypeQMediaContent(QMediaContent); Configuration config(app.arguments()); if (config.hasErrors()) { config.printErrors(); return -1; } // Init QML view QmlApplicationViewer viewer; QDeclarativeContext *ctx = viewer.rootContext(); CoreManager coreManager(config, ctx); ctx-setContextProperty(coreManager, coreManager); viewer.setOrientation(QmlApplicationViewer::LockPortrait); viewer.setSource(QUrl(qrc:qml/MainWindow.qml)); viewer.setResizeMode(QDeclarativeView::SizeRootObjectToView); viewer.show(); return app.exec(); } Cheers, Conny On Mon, 2011-05-09 at 16:16 +0200, Kristóf Timur wrote: Hello Conny, AFAIK you don't need to bother with D-Bus at all if you're not actually using it. If your app is open source, I could take a look at the code to try help out. Cheers, Timur On 05/09/2011 04:04 PM, Cornelius Hald wrote: Hi all! I've got a bit a weird problem. I'd we happy if anyone could give me a hint. My Qt (QML/C++) app terminates after exactly 2 minutes if it was started via the graphical launcher. If I start it from the terminal it runs fine for hours. I think this could be connected with D-Bus, but I'm not sure how/where to look. In Gtk+ apps we had to register with D-Bus after start-up. If we didn't do so, the app was killed after some time. I thought with Qt that QApplication takes care of this. Is this true, or do I have to register manually? Thanks! Conny ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
RE: Qt application crashes after 2 minutes if started from app grid
Can it somehow be related to your desktop file? I can't see anything wrong with this code. -Original Message- From: maemo-developers-boun...@maemo.org [mailto:maemo-developers-boun...@maemo.org] On Behalf Of Cornelius Hald Sent: Monday, May 09, 2011 10:26 AM To: Kristóf Timur Cc: maemo-developers Subject: Re: Qt application crashes after 2 minutes if started from app grid Hi Timur, unfortunately I currently can't provide the complete sources. I don't think I have something special in there. My main() looks mostly like this: int main(int argc, char *argv[]) { #if defined(Q_OS_SYMBIAN) QApplication::setGraphicsSystem(openvg); #else QApplication::setGraphicsSystem(raster); #endif QApplication app(argc, argv); // Export types to QML qmlRegisterTypeGuideListModel(); qmlRegisterTypePoiListModel(); qmlRegisterTypeTourListModel(); qRegisterMetaTypeQMediaContent(QMediaContent); Configuration config(app.arguments()); if (config.hasErrors()) { config.printErrors(); return -1; } // Init QML view QmlApplicationViewer viewer; QDeclarativeContext *ctx = viewer.rootContext(); CoreManager coreManager(config, ctx); ctx-setContextProperty(coreManager, coreManager); viewer.setOrientation(QmlApplicationViewer::LockPortrait); viewer.setSource(QUrl(qrc:qml/MainWindow.qml)); viewer.setResizeMode(QDeclarativeView::SizeRootObjectToView); viewer.show(); return app.exec(); } Cheers, Conny On Mon, 2011-05-09 at 16:16 +0200, Kristóf Timur wrote: Hello Conny, AFAIK you don't need to bother with D-Bus at all if you're not actually using it. If your app is open source, I could take a look at the code to try help out. Cheers, Timur On 05/09/2011 04:04 PM, Cornelius Hald wrote: Hi all! I've got a bit a weird problem. I'd we happy if anyone could give me a hint. My Qt (QML/C++) app terminates after exactly 2 minutes if it was started via the graphical launcher. If I start it from the terminal it runs fine for hours. I think this could be connected with D-Bus, but I'm not sure how/where to look. In Gtk+ apps we had to register with D-Bus after start-up. If we didn't do so, the app was killed after some time. I thought with Qt that QApplication takes care of this. Is this true, or do I have to register manually? Thanks! Conny ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Qt application crashes after 2 minutes if started from app grid
On 05/09/2011 03:04 PM, Cornelius Hald wrote: Hi all! I've got a bit a weird problem. I'd we happy if anyone could give me a hint. My Qt (QML/C++) app terminates after exactly 2 minutes if it was started via the graphical launcher. If I start it from the terminal it runs fine for hours. I think this could be connected with D-Bus, but I'm not sure how/where to look. I remember this being talked about on IRC yesterday - maybe look at the logs? ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Qt application crashes after 2 minutes if started from app grid
Brilliant :) Already runs for 6:30 minutes without crashing. Do I still need the .service file or can I delete it as well? Thanks a lot! Conny P.S. Added the list again. On Mon, 2011-05-09 at 16:27 +0200, th.p...@gmail.com wrote: Hi, Have you tried removing the osso service line/d-bus information in the application's .desktop file? I think that fixed the problem. There should be something about that in the mailing list archives IIRC. HTH :) Thomas __ On May 9, 2011 4:05 PM, Cornelius Hald h...@icandy.de wrote: Hi all! I've got a bit a weird problem. I'd we happy if anyone could give me a hint. My Qt (QML/C++) app terminates after exactly 2 minutes if it was started via the graphical launcher. If I start it from the terminal it runs fine for hours. I think this could be connected with D-Bus, but I'm not sure how/where to look. In Gtk+ apps we had to register with D-Bus after start-up. If we didn't do so, the app was killed after some time. I thought with Qt that QApplication takes care of this. Is this true, or do I have to register manually? Thanks! Conny ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Qt application crashes after 2 minutes if started from app grid
So a short test shows that the .service file is not needed with Qt apps. Thanks everyone! This list is awesome :) Conny On Mon, 2011-05-09 at 16:37 +0200, Cornelius Hald wrote: Brilliant :) Already runs for 6:30 minutes without crashing. Do I still need the .service file or can I delete it as well? Thanks a lot! Conny P.S. Added the list again. On Mon, 2011-05-09 at 16:27 +0200, th.p...@gmail.com wrote: Hi, Have you tried removing the osso service line/d-bus information in the application's .desktop file? I think that fixed the problem. There should be something about that in the mailing list archives IIRC. HTH :) Thomas __ On May 9, 2011 4:05 PM, Cornelius Hald h...@icandy.de wrote: Hi all! I've got a bit a weird problem. I'd we happy if anyone could give me a hint. My Qt (QML/C++) app terminates after exactly 2 minutes if it was started via the graphical launcher. If I start it from the terminal it runs fine for hours. I think this could be connected with D-Bus, but I'm not sure how/where to look. In Gtk+ apps we had to register with D-Bus after start-up. If we didn't do so, the app was killed after some time. I thought with Qt that QApplication takes care of this. Is this true, or do I have to register manually? Thanks! Conny ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers
Re: Qt application crashes after 2 minutes if started from app grid
On 05/09/11 17:37, ext Cornelius Hald wrote: Brilliant :) Already runs for 6:30 minutes without crashing. Do I still need the .service file or can I delete it as well? There is a reason why all applications register a D-Bus service: that way we can guarantee that only one copy of the application is running (this is also used in MeeGo). Also, if the application is already running, it can receive the D-Bus message and raise its window. If you don't use D-Bus at all, you need to implement this single-instance and window raising yourself. -Kimmo Thanks a lot! Conny P.S. Added the list again. On Mon, 2011-05-09 at 16:27 +0200, th.p...@gmail.com wrote: Hi, Have you tried removing the osso service line/d-bus information in the application's .desktop file? I think that fixed the problem. There should be something about that in the mailing list archives IIRC. HTH :) Thomas __ On May 9, 2011 4:05 PM, Cornelius Haldh...@icandy.de wrote: Hi all! I've got a bit a weird problem. I'd we happy if anyone could give me a hint. My Qt (QML/C++) app terminates after exactly 2 minutes if it was started via the graphical launcher. If I start it from the terminal it runs fine for hours. I think this could be connected with D-Bus, but I'm not sure how/where to look. In Gtk+ apps we had to register with D-Bus after start-up. If we didn't do so, the app was killed after some time. I thought with Qt that QApplication takes care of this. Is this true, or do I have to register manually? Thanks! Conny ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://lists.maemo.org/mailman/listinfo/maemo-developers