Bug 143387 - Crash on middle click on close button of a tab
Summary: Crash on middle click on close button of a tab
Status: RESOLVED FIXED
Alias: None
Product: akregator
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: kdepim bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-23 13:18 UTC by e.bachmakov
Modified: 2007-03-26 20:34 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
backtrace (2.12 KB, text/plain)
2007-03-24 15:11 UTC, e.bachmakov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description e.bachmakov 2007-03-23 13:18:34 UTC
Version:            (using KDE KDE 3.5.6)
Installed from:    Gentoo Packages
Compiler:          g++ (GCC) 4.1.2 (Gentoo 4.1.2) 
OS:                Linux

If I click with the middle mouse button on the close button appearing on hover of a tab akregator crashes. Reproducable.
Comment 1 Philip Rodrigues 2007-03-24 14:44:58 UTC
Please paste the backtrace from the crash dialog
Comment 2 e.bachmakov 2007-03-24 15:11:24 UTC
Created attachment 20088 [details]
backtrace

Not a good one since akregator was compiled without debug options...
Comment 3 Frank Osterfeld 2007-03-24 22:16:05 UTC
This is a kdelibs problem with the hover icons and already reported I think. One needs to middle-click the icon and move the mouse then, leaving the mouse button pressed. Quite reproducible. If I just had my mouse near me... (Macbooks with one-button touchpads are a bad testing environment for that). However, this is a dupe of a bug that was rassigned to kdelibs a long time ago.
Comment 4 Frank Osterfeld 2007-03-26 13:40:53 UTC
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1245591888 (LWP 17395)]
[KCrash handler]
#6  0x00000000 in ?? ()
#7  0xb63c3b88 in QApplication::internalNotify ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#8  0xb63c59b7 in QApplication::notify ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#9  0xb6ac9c5e in KApplication::notify (this=0xbf85fde0, receiver=0x8d35848, 
    event=0xbf85f9ac) at kapplication.cpp:550
#10 0xb77209be in QApplication::sendEvent (receiver=0x8d35848, 
    event=0xbf85f9ac) at /usr/share/qt3/include/qapplication.h:520
#11 0xb63c42d8 in qt_dispatchEnterLeave ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#12 0xb63538a0 in QApplication::x11ProcessEvent ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#13 0xb636a320 in QEventLoop::processEvents ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#14 0xb63de25e in QEventLoop::enterLoop ()
   from /usr/share/qt3/lib/libqt-mt.so.3
#15 0xb63de06e in QEventLoop::exec () from /usr/share/qt3/lib/libqt-mt.so.3
#16 0xb63c5731 in QApplication::exec () from /usr/share/qt3/lib/libqt-mt.so.3
#17 0x0805174a in main (argc=134563144, argv=0xbf85ff74) at main.cpp:112
Comment 5 Frank Osterfeld 2007-03-26 13:53:53 UTC
My personal guess is that the hover button is destroyed when the mouse leaves the button in middle click mode, and the Qt event handling doesn't like that.
Comment 6 Frank Osterfeld 2007-03-26 13:54:36 UTC
That was it, will suggest the following patch to k-c-d later.

Index: ktabbar.cpp
===================================================================
--- ktabbar.cpp (revision 644948)
+++ ktabbar.cpp (working copy)
@@ -186,7 +186,8 @@
                     if ( mHoverCloseButtonTab == t )
                         return;
                     mEnableCloseButtonTimer->stop();
-                    delete mHoverCloseButton;
+                    mHoverCloseButton->deleteLater();
+                    mHoverCloseButton = 0;
                 }

                 mHoverCloseButton = new QPushButton( this );
@@ -206,7 +207,7 @@
         }
         if ( mHoverCloseButton ) {
             mEnableCloseButtonTimer->stop();
-            delete mHoverCloseButton;
+            mHoverCloseButton->deleteLater();
             mHoverCloseButton = 0;
         }
     }
Comment 7 Frank Osterfeld 2007-03-26 20:34:50 UTC
SVN commit 646812 by osterfeld:

Do not crash when pressing MMB on the hover icon and moving the mouse leaving MMB pressed.

BUG: 143387


 M  +3 -2      ktabbar.cpp  


--- branches/KDE/3.5/kdelibs/kdeui/ktabbar.cpp #646811:646812
@@ -186,7 +186,8 @@
                     if ( mHoverCloseButtonTab == t )
                         return;
                     mEnableCloseButtonTimer->stop();
-                    delete mHoverCloseButton;
+                    mHoverCloseButton->deleteLater();
+                    mHoverCloseButton = 0;
                 }
 
                 mHoverCloseButton = new QPushButton( this );
@@ -206,7 +207,7 @@
         }
         if ( mHoverCloseButton ) {
             mEnableCloseButtonTimer->stop();
-            delete mHoverCloseButton;
+            mHoverCloseButton->deleteLater();
             mHoverCloseButton = 0;
         }
     }