![]() |
Really strange bug, app closing itself
Today I finaly suceeded to get the icon to work when installing the .deb file. But when having the program open for ~5min without doing anything it closes itself without giving any errors. When I run the same code though qt creator it doesn't close at all, making it very hard to understand what the problem is. Anyone have ideas on how to fix this or what is making this?
Yours, |
Re: Really strange bug, app closing itself
Wasn't this covered in some other thread here recently?
Don't mark your application as a service. If you do, the desktop will try to talk to it using DBUS and when it fails, it kills your application. Supply your .desktop file here and people will help you. |
Re: Really strange bug, app closing itself
I'm sorry if it have, I searched but I got to many results when searching on "app closing itself". I guess you mean I have to remove install += services in the .pro file?
|
Re: Really strange bug, app closing itself
Having a services file is not enough: Your program must register a service.
Maemo comes with the libosso library which'll do this in GLib applications, but http://wiki.forum.nokia.com/index.ph...h_DBus_support should do the same for a Qt app. |
Re: Really strange bug, app closing itself
same problem here
|
Re: Really strange bug, app closing itself
I got it working by removing the service file + remove in the .pro file. Thanks :)
Since this thread got to be about dbus I have a question about sending a method to lock the screen my code is: lock = QDBusMessage::createMethodCall("com.nokia.mce", "/com/nokia/mce/request", "com.nokia.mce.request", "req_tklock_mode_change"); QList<QVariant> args; args.append("locked"); lock.setArguments(args); QDBusConnection::sessionBus().send(lock); and nothing happends. In wiki I found this but it is for the terminal dbus-send --system --type=method_call --dest=com.nokia.mce /com/nokia/mce/request com.nokia.mce.request.req_tklock_mode_change string:"locked" Thanks again! |
Re: Really strange bug, app closing itself
Quote:
P.S. The mce-dev package provides headers defining the service name et al. if you don't want to hardcode anything: maemo.org/api_refs/5.0/5.0-final/mce-dev/ |
Re: Really strange bug, app closing itself
I recently had the same problem and posted my question in this thread: http://talk.maemo.org/showthread.php?t=55844
I was referred to this tutorial: http://wiki.forum.nokia.com/index.ph...h_DBus_support It seemed to solve my problem, but I had to make a couple of small changes to the instructions in the tutorial. My changes are:
Everything seems to work fine now, except that I still have to reboot my phone before the correct app icon is displayed. I'm sure there are instructions on how to fix that somewhere, but rebooting just seems like the easier option for me at the moment :) I hope all the messing about with DBus will be hidden from the developer in future releases of Qt-creator/madde. |
All times are GMT. The time now is 01:12. |
vBulletin® Version 3.8.8