[Konsole-devel] Review Request 127626: Fix crash when KDBusService exits

David Faure faure at kde.org
Sun Apr 10 17:35:36 UTC 2016



> On April 10, 2016, 4:29 p.m., David Faure wrote:
> > 1) is this fixed by applying the QPixmapCache fix in Qt itself? (git cherry-pick be926e412c9c4ec9ee77b49dbe370fbb5451f0e1). It's in Qt 5.6.0 though.
> > 2) do you feel like writing a test app for kdbusservice (or even an autotest) that reproduces the issue? I wonder why the existing autotest doesn't hit this. I tried linking to Qt5::Widgets, didn't make a difference. But well, I have Qt 5.6, so if it's the above commit, no wonder.
> 
> Martin Tobias Holmedahl Sandsmark wrote:
>     This is with 5.6.0. It doesn't crash 100% of the time, it is a bit spurious (it is a race condition as far as I can tell), and maybe it depends on some other part of the system or something.
>     
>     I'll try to write a proper autotest.
> 
> Martin Tobias Holmedahl Sandsmark wrote:
>     I tried switching the existing kdbusservice autotest to use QApplication like you, but I'm unable to reproduce it as well. I also can't reproduce it in konsole when running under valgrind or gdb which is very annoying.
>     
>     Maybe it is some other library or framework that doesn't handle an exit() before the QApplication is deleted (maybe for some reason it gets called from the event loop after some static data is unallocated)? I'll try to link in all the frameworks konsole uses.

Actually the testcase in the QTBUG still crashes for me with 5.6, but not in the pixmapcache, in the QSurface dtor: http://www.davidfaure.fr/2016/crash.txt
I'll add this info to the QTBUG when I can log into it again (seems broken right now).

But yeah, a unittest that exhibits the problem would be a good way to ensure no future regression (or at least catch them quicker, when they come from Qt).


- David


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/127626/#review94496
-----------------------------------------------------------


On April 10, 2016, 3:29 p.m., Martin Tobias Holmedahl Sandsmark wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/127626/
> -----------------------------------------------------------
> 
> (Updated April 10, 2016, 3:29 p.m.)
> 
> 
> Review request for Konsole, David Faure and Kurt Hindenburg.
> 
> 
> Repository: konsole
> 
> 
> Description
> -------
> 
> Fix crash when KDBusService exits.
> 
> This is a bit of an ugly workaround, but it seems to work.
> 
> I'll paste in my comment from https://git.reviewboard.kde.org/r/127625/ here:
> 
>     It seems like it is this that it happening: https://bugreports.qt.io/browse/QTBUG-48709
> 
>     From my understanding it can't really be fixed, short of somehow getting KDBusService to delete the QApplication before calling exit(), which might get nasty with QApplications allocated on the stack?
> 
>     In any case it seems to be a general bug with KDBusService and how it is supposed to be used, not something that we can easily fix in konsole.
> 
> 
> Diffs
> -----
> 
>   src/main.cpp 5e1420e37363454cf5e7886a82381cb9eb4447d8 
> 
> Diff: https://git.reviewboard.kde.org/r/127626/diff/
> 
> 
> Testing
> -------
> 
> Tested by forcing it to open a new window in an existing session (commenting out line 237 in main.cpp), and running under valgrind to verify the deletion.
> 
> 
> Thanks,
> 
> Martin Tobias Holmedahl Sandsmark
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/konsole-devel/attachments/20160410/ed7f8683/attachment-0001.html>


More information about the konsole-devel mailing list