Bug 283753 - [OS X] Crash in BookmarkTriangle::leaveEvent()
Summary: [OS X] Crash in BookmarkTriangle::leaveEvent()
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Tools/Bookmark Manager (show other bugs)
Version: 2.4-GIT
Platform: Compiled Sources macOS
: NOR crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-11 05:52 UTC by Charles Reiss
Modified: 2012-01-17 15:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 2.6
Sentry Crash Report:


Attachments
Patch to be more paranoid about deleting BookmarkTriangles (1.99 KB, patch)
2011-10-11 05:52 UTC, Charles Reiss
Details
backtrace (8.27 KB, text/plain)
2011-10-11 16:22 UTC, Charles Reiss
Details
last 200 lines of debug output before crash (14.14 KB, text/plain)
2011-10-11 16:22 UTC, Charles Reiss
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Reiss 2011-10-11 05:52:12 UTC
Created attachment 64402 [details]
Patch to be more paranoid about deleting BookmarkTriangles

Version:           2.4-GIT (using Devel) 
OS:                OS X

I experienced a crash in BookmarkTriangle::leaveEvent. From the debugger it looked like the 'this' pointer was bogus when it was called from the Qt's event loop. It looked like this was due to EngineController::slotTrackLengthChanged triggering clearTriangles() (followed by making some new ones) while a leaveEvent() from the triangle was pending. Patch attached assuming it's that problem, and also not trying to dereference a potentially null m_tooltip in the destructor or leaveEvent().

Reproducible: Didn't try

Steps to Reproduce:
Hover over triangles for last stop location while playing track

Actual Results:  
Segfault.

Expected Results:  
No crash.
Comment 1 Myriam Schweingruber 2011-10-11 13:50:00 UTC
Could you please also give us the backtrace? Else it is pretty impossible for the devs to check your patch.
Comment 2 Charles Reiss 2011-10-11 16:22:34 UTC
Created attachment 64416 [details]
backtrace

Attach backtrace.
Comment 3 Charles Reiss 2011-10-11 16:22:58 UTC
Created attachment 64417 [details]
last 200 lines of debug output before crash
Comment 4 Myriam Schweingruber 2011-10-11 16:54:10 UTC
Backtrace from comment #2:

Thread 1 (process 6172):
#0  0x0000000100b73c98 in BookmarkTriangle::leaveEvent (this=<value temporarily unavailable, due to optimizations>, event=0x7fff5fbfbb70) at /Users/charles/software/amarok/src/widgets/BookmarkTriangle.cpp:123
#1  0x000000010326175d in QWidget::event ()
#2  0x0000000103207a2d in QApplicationPrivate::notify_helper ()
#3  0x000000010320d88d in QApplication::notify ()
#4  0x00000001026f220e in KApplication::notify ()
#5  0x00000001022d9e7c in QCoreApplication::notifyInternal ()
#6  0x00000001031b03fa in -[QCocoaView mouseExited:] ()
#7  0x00007fff834139de in -[NSApplication sendEvent:] ()
#8  0x00000001031b92e8 in -[QNSApplication sendEvent:] ()
#9  0x00007fff833aa6de in -[NSApplication run] ()
#10 0x00000001031c2e65 in QEventDispatcherMac::processEvents ()
#11 0x00000001023c6244 in QEventLoop::processEvents ()
#12 0x00000001023c6564 in QEventLoop::exec ()
#13 0x00000001023c7b6c in QCoreApplication::exec ()
#14 0x0000000100013912 in main (argc=3, argv=0x7fff5fbfe7c0) at /Users/charles/software/amarok/src/main.cpp:294
Comment 5 Ralf Engels 2012-01-16 21:08:48 UTC
Git commit ae275bdce34dd2f71165c774aeb31b5bcacc19ea by Ralf Engels.
Committed on 16/01/2012 at 21:50.
Pushed by rengels into branch 'master'.

Avoid using deleted BookmarkTriangles or null BookmarkPopups
FIXED-IN: 2.5

M  +5    -2    src/widgets/BookmarkTriangle.cpp
M  +5    -4    src/widgets/SliderWidget.cpp

http://commits.kde.org/amarok/ae275bdce34dd2f71165c774aeb31b5bcacc19ea