Bug 130495 - Crash on exit in ~KHTMLPart
Summary: Crash on exit in ~KHTMLPart
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: general (show other bugs)
Version: 1.4.1
Platform: Compiled Sources Linux
: NOR crash
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-07-09 03:16 UTC by Ilya Konstantinov
Modified: 2006-07-09 15:48 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
Patch to work around the issue (1.24 KB, patch)
2006-07-09 03:16 UTC, Ilya Konstantinov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ilya Konstantinov 2006-07-09 03:16:13 UTC
Version:           1.4.1 (using KDE KDE 3.5.3)
Installed from:    Compiled From Sources

Due to the KHTMLPart deficiency described in bug 130494, Amarok crashes on exit within the ~KHTMLPart dtor.

This can be worked around by deleting all our KHTMLParts before the widget hierarchy is destroyed.
Comment 1 Ilya Konstantinov 2006-07-09 03:16:57 UTC
Created attachment 16927 [details]
Patch to work around the issue
Comment 2 Alexandre Oliveira 2006-07-09 15:48:42 UTC
SVN commit 560186 by aoliveira:

KHTMLPart dtor relies on its KHTMLView still being alive, and crashes otherwise, so let's workaround this.
Patch by Ilya Konstantinov <kde-bug-report (at) future shiny co il>
BUG: 130495


 M  +6 -0      contextbrowser.cpp  
 M  +8 -0      playlistbrowser.cpp  
 M  +1 -0      playlistbrowser.h  


--- trunk/extragear/multimedia/amarok/src/contextbrowser.cpp #560185:560186
@@ -319,6 +319,12 @@
 
 ContextBrowser::~ContextBrowser()
 {
+    // Ensure the KHTMLPart dies before its KHTMLView dies,
+    // because KHTMLPart's dtoring relies on its KHTMLView still being alive
+    // (see bug 130494).
+    delete m_currentTrackPage;
+    delete m_lyricsPage;
+    delete m_wikiPage;
     m_cuefile->clear();
 }
 
--- trunk/extragear/multimedia/amarok/src/playlistbrowser.cpp #560185:560186
@@ -3456,6 +3456,14 @@
     setFixedHeight( m_pushButton->sizeHint().height() );
 }
 
+InfoPane::~InfoPane()
+{
+    // Ensure the KHTMLPart dies before its KHTMLView dies,
+    // because KHTMLPart's dtoring relies on its KHTMLView still being alive
+    // (see bug 130494).
+    delete m_infoBrowser;
+}
+
 const int
 InfoPane::getHeight()
 {
--- trunk/extragear/multimedia/amarok/src/playlistbrowser.h #560185:560186
@@ -367,6 +367,7 @@
 
 public:
     InfoPane( QWidget *parent );
+    ~InfoPane();
     const int getHeight();
     void setStoredHeight( const int newHeight );