Bug 57699 - Konqueror crash when dragging image from about:konqueror
Summary: Konqueror crash when dragging image from about:konqueror
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash (vote)
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-04-25 13:31 UTC by Rudo Thomas
Modified: 2003-05-26 01:23 UTC (History)
1 user (show)

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 Rudo Thomas 2003-04-25 13:31:31 UTC
Version:            (using KDE KDE 3.1.1a)
Installed from:    Gentoo Packages
Compiler:          gcc version 3.2.2 
OS:          Linux

Konqueror crashes when the "Konqueror" image from the about:konqueror page is dragged to the location bar.

To reproduce it, go to the about:konqueror page (e.g. Help -> Konqueror Introduction), unhide the location toolbar if it's hidden (Settings -> Toolbars), grab the Konqueror image (the one just above the "Introduction", "Tips", "Specifications" links) by the mouse and drag it onto the "Location" label in the location toolbar.

This bug is present in both KDE 3.1 and 3.0 trees, possibly in the 2.2 tree.
Comment 1 Maksim Orlovich 2003-04-25 15:28:42 UTC
Works fine for me in HEAD; any useful backtrace? 
 
Comment 2 Rudo Thomas 2003-04-25 15:46:11 UTC
My system does not seem to have debugging information compiled in, but here is 
what I got to on RedHat 7.3, konqueror 3.0.3-0.7.2 on kde 3.0.3-0.7.2, gcc 2.96-113. 
 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...(no debugging symbols found)... 
(no debugging symbols found)...[New Thread 1024 (LWP 32737)] 
0x420b48b9 in wait4 () from /lib/i686/libc.so.6 
#0  0x420b48b9 in wait4 () from /lib/i686/libc.so.6 
#1  0x4213030c in __DTOR_END__ () from /lib/i686/libc.so.6 
#2  0x40d97c33 in waitpid () from /lib/i686/libpthread.so.0 
#3  0x406045e2 in KCrash::defaultCrashHandler () 
   from /usr/lib/libkdecore-gcc2.96.so.4 
#4  0x40d95f05 in pthread_sighandler () from /lib/i686/libpthread.so.0 
#5  <signal handler called> 
#6  0x412b0b36 in KHTMLPart::khtmlMouseMoveEvent () 
   from /usr/lib/libkhtml-gcc2.96.so.4 
#7  0x412b0087 in KHTMLPart::customEvent () from /usr/lib/libkhtml-gcc2.96.so.4 
#8  0x408c12a7 in QObject::event () from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#9  0x40879803 in QApplication::internalNotify () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#10 0x4087969c in QApplication::notify () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#11 0x405a8a4b in KApplication::notify () from /usr/lib/libkdecore-gcc2.96.so.4 
#12 0x412981c5 in KHTMLView::viewportMouseMoveEvent () 
   from /usr/lib/libkhtml-gcc2.96.so.4 
#13 0x4099bc01 in QScrollView::eventFilter () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#14 0x408c137b in QObject::activate_filters () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#15 0x408c1231 in QObject::event () from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#16 0x408ef601 in QWidget::event () from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#17 0x40879803 in QApplication::internalNotify () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#18 0x40878f33 in QApplication::notify () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#19 0x405a8a4b in KApplication::notify () from /usr/lib/libkdecore-gcc2.96.so.4 
#20 0x40827511 in QETWidget::translateMouseEvent () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#21 0x40824623 in QApplication::x11ProcessEvent () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#22 0x408235de in QApplication::processNextEvent () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#23 0x4087acdc in QApplication::enter_loop () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#24 0x40823547 in QApplication::exec () 
   from /usr/lib/qt3-gcc2.96/lib/libqt-mt.so.3 
#25 0x40048f30 in main () from /usr/lib/konqueror-gcc2.96.so 
#26 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6 
 
Comment 3 George Staikos 2003-05-26 00:29:26 UTC
Valid bug. 
Comment 4 George Staikos 2003-05-26 01:23:48 UTC
Subject: kdebase/konqueror

CVS commit by staikos: 

Don't crash on drops:
- you can't call openURL from the slot since it will delete the part before
the drag is complete!  This delays the calling of openURL with a singleshot.

CCMAIL: 57699-done@bugs.kde.org


  M +10 -3     konq_misc.cc   1.48
  M +5 -0      konq_misc.h   1.17


--- kdebase/konqueror/konq_misc.cc  #1.47:1.48
@@ -228,7 +228,14 @@ void KonqDraggableLabel::dragEnterEvent(
 void KonqDraggableLabel::dropEvent( QDropEvent* ev )
 {
-  KURL::List lst;
-  if ( KURLDrag::decode( ev, lst ) ) {
-    m_mw->openURL( 0L, lst.first() );
+  _savedLst.clear();
+  if ( KURLDrag::decode( ev, _savedLst ) ) {
+    QTimer::singleShot(0, this, SLOT(delayedOpenURL()));
   }
 }
+
+void KonqDraggableLabel::delayedOpenURL()
+{
+    m_mw->openURL( 0L, _savedLst.first() );
+}
+
+#include "konq_misc.moc"

--- kdebase/konqueror/konq_misc.h  #1.16:1.17
@@ -92,4 +92,5 @@ public:
 class KonqDraggableLabel : public QLabel
 {
+    Q_OBJECT
 public:
     KonqDraggableLabel( KonqMainWindow * mw, const QString & text );
@@ -102,8 +103,12 @@ protected:
     void dropEvent( QDropEvent* ev );
 
+private slots:
+    void delayedOpenURL();
+
 private:
     QPoint startDragPos;
     bool validDrag;
     KonqMainWindow * m_mw;
+    KURL::List _savedLst;
 };