Tweetian icon indicating copy to clipboard operation
Tweetian copied to clipboard

Sometime the app process will stuck on background after exit

Open dicksonleong opened this issue 12 years ago • 0 comments

Sometimes, after exiting the app, the process will stuck on background although it appear as exited (not visible in task switcher). When try to launch again, the invoker will return status code "1" and the app is not launch. The process will need to kill first by typing "killall tweetian" in terminal before it can be launch again.

It seem this is cause by ListModel::sync(). When ListModel::sync() is called from WorkerScript, the WorkerScript's thread will be blocked by a QWaitCondition until the sync() is done on main thread. However, if the app is exit before the sync() is done, the main thread is destroyed and the thread in WorkerScript will be blocked forever by the QWaitCondition. This bug seem to be fixed in this commit but that is in Qt 5.

To reproduce:

  • Click on the Tweetian icon.
  • After the splash is finished and the main UI appear but before the tweets appear (when loading tweets from database), immediately close the app.
  • Click on the Tweetian icon again, nothing will happens.
  • Open terminal and type "ps | grep tweetian" and the Tweetian process is on background.

dicksonleong avatar Jan 28 '13 10:01 dicksonleong