Review Request 120081: [OS X] prevent a crash after finishing a code difference review

René J.V. Bertin rjvbertin at gmail.com
Sat Sep 6 13:51:00 UTC 2014



> On Sept. 6, 2014, 2:26 p.m., Milian Wolff wrote:
> > Technically, it should not be a requirement. to delete every qobject via deletelater (and note that we do not do this acutally, most of the time).
> > 
> > Please rephrase the comment to something like:
> > 
> > // HACK: workaround a crash on OS X, see bug: ...
> > 
> > Then it's OK with me to push this patch. Also, did you test this bug on frameworks/qt5? Is it also occurring there or is the hack not required there?
> 
> Marko Käning wrote:
>     Sorry, Milian, I haven't KF5-kdevelop avtually RUNNING on the OSX/CI system yet (due to the QStandardsPath issue). The CI system currently only checks whether projects build successfully. So, I can't say whether this is still an issue for Qt5. Perhaps we shouldn't patch KF5's kdevelop for now.

I've preferred calling it a tweak rather than a hack as the patch *does* follow (official?) guidelines, even if they're apparently no technical requirement.

As Marko indicated, it is not currently feasible to test this on KF/Qt5. I planned to ask for more details on the Qt forums, but they're down (once again...)


- René J.V.


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


On Sept. 6, 2014, 3:50 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120081/
> -----------------------------------------------------------
> 
> (Updated Sept. 6, 2014, 3:50 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X and KDevelop.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> On OS X, kdevelop would crash after clicking on the "Finish Review" button, at least when the path review tool was started through a project's git->differences. This crash occurred with the current stable release (kdevplatform 1.6.0) through the 4.7ß up to and including kdevplatform git/kde4-legacy.
> 
> The crash would be deep inside Qt, seemingly mouse action/event related. Googling the actual function in which the crash occurred led to the hypothesis a QObject derived object might be disposed of via `delete m_obj` instead of `m_obj->deleteLate()` as appears to be the correct way of doing things (http://qt-project.org/forums/viewthread/38406/#162801).
> 
> More details, with referring links and backtraces are here: https://bugs.kde.org/show_bug.cgi?id=338829
> 
> A single line change in the PatchReviewPlugin destructor, following this knowledge, seems indeed to be the required fix to prevent the crash. I have not made this a platform-specific change as the online information I found doesn't say anything about whether or not the requirement is valid for OS X only.
> 
> I ignore to what extent Qt5 has relaxed the disposal requirements on QObjects but presume it will continue to be a good idea to use ->deleteAll() . I presume Qt has some kind of garbage collection, if so, one should leave object disposal to the GC and not do it the hard way.
> 
> 
> Diffs
> -----
> 
>   plugins/patchreview/patchreview.cpp 2977c40 
> 
> Diff: https://git.reviewboard.kde.org/r/120081/diff/
> 
> 
> Testing
> -------
> 
> Works (i.e. no more crashing) under OS X 10.6.8, with kdelibs git/4.14 and the other dependencies at KDE/MacPorts 4.12.5 . kdevplatform and kdevelop are built using gcc 4.8.3 from MacPorts (due to the C++11 requirement).
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop-devel/attachments/20140906/a58ce971/attachment.html>


More information about the KDevelop-devel mailing list