Bug 355052 - kjobtrackerstest crashes on exit
Summary: kjobtrackerstest crashes on exit
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kjobwidgets
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: MacPorts macOS
: NOR crash
Target Milestone: ---
Assignee: kdelibs bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-11-08 19:50 UTC by RJVB
Modified: 2016-02-08 15:13 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description RJVB 2015-11-08 19:50:53 UTC
I built KJobWidgets 5.15.0 (its dependencies from the same release) and tested it by invoking kjobtrackerstest manually. It works, but crashes on exit.

Reproducible: Always

Steps to Reproduce:
1. build and install KJobWidgets
2. invoke tests/kjobtrackerstest.app/Contents/MacOS/kjobtrackerstest

Actual Results:  
SIGSEGV; backtrace:

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0   org.qt-project.QtCore         	0x00000001050f705a QMetaObject::invokeMethod(QObject*, char const*, Qt::ConnectionType, QGenericReturnArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument, QGenericArgument) + 1754
1   libKF5JobWidgets.5.dylib      	0x0000000103ee01e1 KDialogJobUiDelegate::Private::next() + 593 (qsharedpointer_impl.h:467)
2   org.qt-project.QtCore         	0x000000010511e8de QObject::event(QEvent*) + 414
3   org.qt-project.QtWidgets      	0x0000000103fff5ac QApplicationPrivate::notify_helper(QObject*, QEvent*) + 332
4   org.qt-project.QtWidgets      	0x0000000104002ec7 QApplication::notify(QObject*, QEvent*) + 9335
5   org.qt-project.QtCore         	0x00000001050ee819 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 1145
6   libqcocoa.dylib               	0x0000000109918c5e QCocoaEventDispatcherPrivate::processPostedEvents() + 190 (qcocoaeventdispatcher.mm:885)
7   libqcocoa.dylib               	0x00000001099194e1 QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 33 (qcocoaeventdispatcher.mm:938)
8   com.apple.CoreFoundation      	0x00007fff9101b5b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
9   com.apple.CoreFoundation      	0x00007fff9100cc62 __CFRunLoopDoSources0 + 242
10  com.apple.CoreFoundation      	0x00007fff9100c3ef __CFRunLoopRun + 831
11  com.apple.CoreFoundation      	0x00007fff9100be75 CFRunLoopRunSpecific + 309
12  com.apple.HIToolbox           	0x00007fff8dc52a0d RunCurrentEventLoopInMode + 226
13  com.apple.HIToolbox           	0x00007fff8dc52685 ReceiveNextEventCommon + 173
14  com.apple.HIToolbox           	0x00007fff8dc525bc _BlockUntilNextEventMatchingListInModeWithFilter + 65
15  com.apple.AppKit              	0x00007fff95ed624e _DPSNextEvent + 1434
16  com.apple.AppKit              	0x00007fff95ed589b -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 122
17  com.apple.AppKit              	0x00007fff95ec999c -[NSApplication run] + 553
18  libqcocoa.dylib               	0x00000001099183cd QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2189 (qobject_p.h:398)
19  org.qt-project.QtCore         	0x00000001050e87dd QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 429
20  org.qt-project.QtCore         	0x00000001050ede3a QCoreApplication::exec() + 410
21                                	0x0000000103e8a7ff main + 623 (kjobtrackerstest.cpp:181)
22  libdyld.dylib                 	0x00007fff8f4005fd start + 1


Expected Results:  
Clean exit.

This is on Mac OS X 10.9.5 using the system compiler from Xcode 6.2
Comment 1 David Edmundson 2016-02-08 15:13:12 UTC
Git commit e984dab0a6cd9541ae178c104f0228ae264284a6 by David Edmundson.
Committed on 08/02/2016 at 15:13.
Pushed by davidedmundson into branch 'master'.

Fix crash in KJob dialogs.

Guard "this" being deleted whilst running new eventloop

KMessageBox spawns a new event loop, during which the parent kjob can be
completed and deleted, deleting the UIDelegate with it.
Related: bug 356321, bug 356964, bug 355525, bug 353462, bug 358954, bug 346215
REVIEW: 126999

M  +9    -0    src/kdialogjobuidelegate.cpp

http://commits.kde.org/kjobwidgets/e984dab0a6cd9541ae178c104f0228ae264284a6