[Differential] [Commented On] D2545: Cleanup KSharedUiServerProxy before qApp exists

kfunk (Kevin Funk) noreply at phabricator.kde.org
Mon Dec 19 23:53:43 UTC 2016


kfunk added a comment.


  In https://phabricator.kde.org/D2545#69298, @thiago wrote:
  
  > In https://phabricator.kde.org/D2545#69187, @kfunk wrote:
  >
  > > In https://phabricator.kde.org/D2545#69091, @thiago wrote:
  > >
  > > > There doesn't seem to be a way of doing some clean up before the threads are forcibly killed.
  > > >
  > > > Maybe if I abuse qtmain().
  > >
  > >
  > > This would only fix it for non-console GUI applications if I understand correctly. That's what we have here, but we'd still keep console applications buggy. There's no way to inject code before ExitProcess() with a plain console application.
  >
  >
  > I was reading the ucrt source code yesterday and it does look like it processes atexit() registrations prior to ExitProcess(). So I'll go for that.
  
  
  It does not work with `atext()` -- I still get the same hang if I use that.
  
  So:
  
  - `std::atexit(...)` -> hang
  - `qAddPostRoutine(...)` -> no hang
  
  > There is a side-effect: I have to bring back the patch that makes QtDBus DLL non-unloadable, since otherwise it could crash during exit if had already been unloaded (was loaded by a plugin).
  > 
  > BTW, do you know if this problem happens with MinGW?
  
  According to this comment here https://bugs.kde.org/show_bug.cgi?id=366596#c5 it also happens when built with MinGW.

BRANCH
  master

REVISION DETAIL
  https://phabricator.kde.org/D2545

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: kfunk, vonreth, dfaure
Cc: thiago, albertvaka, mutlaqja, arrowdodger, #frameworks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20161219/f6253161/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list