[Differential] [Commented On] D4301: [System Tray] SNI fallback to context menu on failing Activate
David Edmundson
noreply at phabricator.kde.org
Fri Jan 27 09:32:56 UTC 2017
davidedmundson added inline comments.
INLINE COMMENTS
> subdiff wrote in statusnotifieritemsource.cpp:472
> > This spins its own event loop which is dangerous when dealing with QML
>
> Since the event loop is part of the service, isn't the QML shielded from it anyway? The QML code connects only to the job finished signal in the end, which is emitted again by the job's/service's main thread.
> Since the event loop is part of the service, isn't the QML shielded from it anyway? The QML code connects only to the job finished signal in the end, which is emitted again by the job's/service's main thread.
If only :)
We spawn a new event loop here, from inside this event loop we continue processing animations, mouse, DBus whatever.
During this, we might end up deleting the SNI and implicitly this datasource.
We then finish this method, potentially 30 seconds after we started, and come out of this line.
"this" is now a danging pointer and the m_statusNotifierItemInterface->interface on the next line seg faults.
This is a nice simple explanation of a simpler version of the same problem:
https://blogs.kde.org/2009/03/26/how-crash-almost-every-qtkde-application-and-how-fix-it-0
only in QML it's even worse! Even if you did guard against it, QMLEngine then returns with the nicely wrapped JS value to a javascript context that doesn't exist - and there's no way to guard that.
REPOSITORY
R120 Plasma Workspace
REVISION DETAIL
https://phabricator.kde.org/D4301
EMAIL PREFERENCES
https://phabricator.kde.org/settings/panel/emailpreferences/
To: subdiff, #plasma, davidedmundson
Cc: broulik, plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170127/3b7f2d66/attachment.html>
More information about the Plasma-devel
mailing list