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

René J.V. Bertin rjvbertin at gmail.com
Fri Sep 12 17:31:48 UTC 2014


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


So, if I activate malloc/free guarding too early (in PatchReviewPlugin::setPatch, when called with a "real" patch, not at plugin load time), I get this:

### starting malloc guarding 
### PatchReviewPlugin::setPatch() deleting previous patch LocalPatchSource(0x1237b3830) "Custom Patch" with file KUrl("") basedir KUrl("") 
setting new patch "VCS Diff" with file KUrl("file:///private/var/folders/W2/W27-dhO62RWW-U+BYnQ9i++++TY/-Tmp-/kde-bertin/kdevelopC890942.patch") basedir KUrl("file:///Volumes/Debian/Users/bertin/work/src/new/KDE/kdevelop/kdevplatform-git-1.7.60/") 
kdevelop.bin(89094,0x7fff70affcc0) malloc: *** error for object 0x138a80f10: Non-aligned pointer being freed (2)
*** set a breakpoint in malloc_error_break to debug

Program received signal SIGABRT, Aborted.
0x00007fff85f470b6 in __kill ()
(gdb) bt
#0  0x00007fff85f470b6 in __kill ()
#1  0x00007fff85fe79f6 in abort ()
#2  0x00007fff85fd662d in szone_error ()
#3  0x00007fff827358d4 in -[NSViewHierarchyLock dealloc] ()
#4  0x00007fff8273443c in -[NSWindow dealloc] ()
#5  0x0000000101ed6be2 in -[QCocoaPanel dealloc] ()
#6  0x0000000101ed12e0 in QWidget::destroy ()
#7  0x0000000101f89222 in QWidget::~QWidget ()
#8  0x000000012926f985 in ProjectTreeView::popupContextMenu (this=<value temporarily unavailable, due to optimizations>, pos=<value temporarily unavailable, due to optimizations>) at /Volumes/Debian/MP6/var/macports/build/_Volumes_Debian_MP6_site-ports_kde_kdevplatform-git/kdevplatform-git/work/kdevplatform-git-1.7.60/plugins/projectmanagerview/projecttreeview.cpp:316
Previous frame inner to this frame (gdb could not unwind past this frame)


In other words, I expose a situation that either doesn't occur or is handled silently without malloc guarding, and it gets triggered because apparently the popup menu's breakdown happens concurrently with the patchreview toolview's initialisation.

Is there a place in patchreview.cpp where I can assume that the popup menu through which I get to the toolview is completely gone (and any malloc/free errors exposed are in the plugin code)?

- René J.V. Bertin


On Sept. 12, 2014, 1:28 p.m., René J.V. Bertin wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/120150/
> -----------------------------------------------------------
> 
> (Updated Sept. 12, 2014, 1:28 p.m.)
> 
> 
> Review request for KDE Software on Mac OS X, KDevelop and Olivier Goffart.
> 
> 
> Repository: kdevplatform
> 
> 
> Description
> -------
> 
> In https://reviewboard.kde.org/r/120081/ I proposed an (accepted) approach to prevent kdevelop from crashing after closing the patch review ("git/show differences") toolview. I had another of those crashes after heavier-than-usual perusal of the toolview, despite the previous patch. The attached patch replaces all `delete`s of `QObject` derived class instances with `deleteLater()`.
> 
> 
> Diffs
> -----
> 
>   language/CMakeLists.txt 3c790a4 
>   plugins/patchreview/patchreview.cpp 18b63db 
> 
> Diff: https://git.reviewboard.kde.org/r/120150/diff/
> 
> 
> Testing
> -------
> 
> kdevplatform git/kde4-legacy on KDE/MacPorts OS X 10.6.8 . 
> 
> 
> Thanks,
> 
> René J.V. Bertin
> 
>

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


More information about the KDevelop-devel mailing list