Comment 40 for bug 408719

Revision history for this message
In , DA (adawit) wrote :

(In reply to comment #0)
> Version: (using KDE 4.4.2)
> Compiler: GCC
> OS: Linux
> Installed from: Ubuntu Packages
>
> The Kfile plugin for Qt4 triggers registration of the destructor for the global
> static KIOScheduler, if the Qt4 open dialog is invoked (from a Qt4 but non-KDE
> application).
>
> This causes a crash at exit, while glibc runs the exit handlers. Apparently,
> ~KIOScheduler tries to use QDBus (which is already deinitialized).

You got that backwards. It is not KIO::Scheduler that attemtps to use QDBus, it is QDBus that attempts to access an already destroyed object which should not happen at all.

Besides the backtraces that show otherwise, if you simply defer the deletion of the scheduler object using "q->deleteLater()" instead "delete q" in ~SchedulerPrivate, you would see that the crash goes away. As such the problem is upstream in QtDBus and friends. So long as a class register itself with QDBus, it will crash when accessed in the same manner as one that happens through VLC.

For those interested in testing the workaround patch for this crash can be found at https://git.reviewboard.kde.org/r/100577.

The reason that workaround is not committed is because Thiago said stated that he wanted to look into the cause of this problem. See http://lists.kde.org/?l=kde-core-devel&m=129693527318658&w=2