Review Request 114895: Guard against null QX11Info::connection()
David Edmundson
david at davidedmundson.co.uk
Tue Jan 7 14:22:03 UTC 2014
> On Jan. 7, 2014, 2:14 p.m., Martin Gräßlin wrote:
> > checking obviously makes sense, though it shouldn't be needed. There must be something else which is wrong here, too.
> >
> > Could you try what the value of WId is in these cases? I wouldn't be surprised if it were 0.
> >
> > Oh and that code has unit tests, so I would appreciate if you extend the tests for that case.
WId seems to be valid. If I check the dialog with xwininfo before closing plasmoidviewer it shows the same ID.
Here is a full backtrace of it being needed: http://pastebin.kde.org/pxjhgw95d
I can guard against it inside plasma with
if (!QApplication::closingDown()) around the KWindowEffects calls.
I changed to guarding in the library as I can imagine others hitting it in the future and in general library code shouldn't crash on reasonable inputs.
- David
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/114895/#review46967
-----------------------------------------------------------
On Jan. 7, 2014, 1:57 p.m., David Edmundson wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/114895/
> -----------------------------------------------------------
>
> (Updated Jan. 7, 2014, 1:57 p.m.)
>
>
> Review request for KDE Frameworks, Martin Gräßlin and Marco Martin.
>
>
> Repository: kwindowsystem
>
>
> Description
> -------
>
> Guard against null QX11Info::connection()
>
> This can fail if the application is currently shutting down,
> this is currently causing a crash on closing plasma with dialogs
> open.
>
>
> Diffs
> -----
>
> src/kwindoweffects_x11.cpp 72cbb71
>
> Diff: https://git.reviewboard.kde.org/r/114895/diff/
>
>
> Testing
> -------
>
> Opened plasmoidviewer -a org.kde.example.widgetgallery expanded the applet, then closed plasmoidviewer
> It used to crash, now it doesn't.
>
>
> Thanks,
>
> David Edmundson
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20140107/37c5620c/attachment.html>
More information about the Kde-frameworks-devel
mailing list