Bug 74353 - Crash when dragging image and closing tab if more than 1 tab open
Summary: Crash when dragging image and closing tab if more than 1 tab open
Status: RESOLVED FIXED
Alias: None
Product: konqueror
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-02-06 15:18 UTC by Mathieu
Modified: 2004-02-18 14:33 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 Mathieu 2004-02-06 15:18:16 UTC
Version:           3.2.0 (using KDE KDE 3.2.0)
Installed from:    Gentoo Packages
Compiler:          gcc 3.3.2 
OS:          Linux

Konqueror crashes when the user drags a image and then close the tab while the "image icon" is under its cursor. (Konq 3.2.0)

Steps to reproduce (reproductability=100%):

- Start Konqueror
- Open at least 2 pages on 2 different tabs. One of those page should contain image(s).
- "Drag" an image by clicking on it and moving the mouse. This can be achieved with the left or middle button (and result will be the same)
- Press "Ctrl+W" (or your own Close Tab shortcut)

---> Konqueror will crash with a sigsev error

Could not have a backtrace, as I couldn't get debug information. Maybe someone cann add a comment with Backtrace information.
Comment 1 Tommi Tervo 2004-02-11 21:58:31 UTC
(gdb) #0  free (m=0x8c83d88) at malloc.c:3045
#1  0x410f95e6 in __builtin_delete (ptr=0x8c83d88) at ../../gcc/cp/new2.cc:-1
#2  0x40b2741a in QMimeSource::~QMimeSource ()
   from /opt/qt33f/lib/libqt-mt.so.3
#3  0x40814478 in QPtrList<QDragObject>::deleteItem (this=0x8421a00,
    d=0x8c83d60) at /opt/qt33f/include/qptrlist.h:150
#4  0x40d84050 in QGList::clear () from /opt/qt33f/lib/libqt-mt.so.3
#5  0x40810d44 in QPtrList<QDragObject>::clear (this=0x8421a00)
    at /opt/qt33f/include/qptrlist.h:93
#6  0x4080a297 in KMultipleDrag::~KMultipleDrag (this=0x84219c0, __in_chrg=3)
    at /opt/qt33f/include/qvaluelist.h:440
#7  0x40b5998a in QWidget::~QWidget () from /opt/qt33f/lib/libqt-mt.so.3
#8  0x40c233f4 in QClipperWidget::~QClipperWidget ()
   from /opt/qt33f/lib/libqt-mt.so.3
#9  0x40b5998a in QWidget::~QWidget () from /opt/qt33f/lib/libqt-mt.so.3
#10 0x40c232d4 in QViewportWidget::~QViewportWidget ()
   from /opt/qt33f/lib/libqt-mt.so.3
#11 0x40c1e87b in QScrollView::~QScrollView ()
   from /opt/qt33f/lib/libqt-mt.so.3
#12 0x413dde2e in KHTMLView::~KHTMLView (this=0x8fe0110, __in_chrg=3)
    at /opt/qt33f/include/qstring.h:846
#13 0x40157aab in KParts::Part::~Part (this=0x88e7748, __in_chrg=0)
    at /opt/qt33f/include/qguardedptr.h:117
#14 0x4015818a in KParts::ReadOnlyPart::~ReadOnlyPart (this=0x88e7748,
---Type <return> to continue, or q <return> to quit---    __in_chrg=0) at /opt/qt33f/include/qstring.h:846
#15 0x413ef687 in KHTMLPart::~KHTMLPart (this=0x88e7748, __in_chrg=3)
    at khtml_part.cpp:449
#16 0x4005b305 in KonqView::~KonqView (this=0x8fdf128, __in_chrg=3)
    at konq_view.cc:127
#17 0x40064534 in KonqViewManager::removeTab (this=0x80cc560, tab=0x0)
    at /opt/qt33f/include/qptrlist.h:174
#18 0x4009167c in KonqMainWindow::slotRemoveTab (this=0x80c5070)
    at konq_mainwindow.cc:2382
#19 0x400a4345 in KonqMainWindow::qt_invoke (this=0x80c5070, _id=147,
    _o=0xbfffd830) at konq_mainwindow.moc:609
#20 0x40b31b92 in QObject::activate_signal () from /opt/qt33f/lib/libqt-mt.so.3
#21 0x40b31aa3 in QObject::activate_signal () from /opt/qt33f/lib/libqt-mt.so.3
#22 0x4052f5a9 in KAction::activated (this=0x81ab348)
    at /opt/qt33f/include/qmetaobject.h:261
#23 0x4052ece0 in KAction::slotActivated (this=0x81ab348) at kaction.cpp:1054
#24 0x4052f795 in KAction::qt_invoke (this=0x81ab348, _id=14, _o=0xbfffd940)
    at kaction.moc:181
#25 0x40b31b92 in QObject::activate_signal () from /opt/qt33f/lib/libqt-mt.so.3
#26 0x40b31aa3 in QObject::activate_signal () from /opt/qt33f/lib/libqt-mt.so.3
#27 0x40786565 in KAccelPrivate::menuItemActivated (this=0x80c5360)
    at /opt/qt33f/include/qmetaobject.h:261
#28 0x40784580 in KAccelPrivate::eventFilter (this=0x80c5360,
    pEvent=0xbfffddb0) at kaccel.cpp:319
---Type <return> to continue, or q <return> to quit---#29 0x40b2f7cb in QObject::activate_filters ()
   from /opt/qt33f/lib/libqt-mt.so.3
#30 0x40b2f681 in QObject::event () from /opt/qt33f/lib/libqt-mt.so.3
#31 0x40b5ebe1 in QWidget::event () from /opt/qt33f/lib/libqt-mt.so.3
#32 0x40c041ef in QMainWindow::event () from /opt/qt33f/lib/libqt-mt.so.3
#33 0x400a2ba6 in KonqMainWindow::event (this=0x80c5070, e=0xbfffddb0)
    at konq_mainwindow.cc:4944
#34 0x40ae2618 in QApplication::internalNotify ()
   from /opt/qt33f/lib/libqt-mt.so.3
#35 0x40ae1bec in QApplication::notify () from /opt/qt33f/lib/libqt-mt.so.3
#36 0x407108ec in KApplication::notify (this=0xbffff490, receiver=0x8fcdbc8,
    event=0xbfffddb0) at kapplication.cpp:506
#37 0x40782040 in KAccelEventHandler::x11Event (this=0x80cac98,
    pEvent=0xbfffe0d0) at /opt/qt33f/include/qapplication.h:491
#38 0x407146da in KApplication::x11EventFilter (this=0xbffff490,
    _event=0xbfffe0d0) at kapplication.cpp:1527
#39 0x40a7abf3 in qt_set_x11_event_filter () from /opt/qt33f/lib/libqt-mt.so.3
#40 0x40a838cc in QApplication::x11ProcessEvent ()
   from /opt/qt33f/lib/libqt-mt.so.3
#41 0x40a97d96 in QEventLoop::processEvents ()
   from /opt/qt33f/lib/libqt-mt.so.3
#42 0x40af118c in QEventLoop::enterLoop () from /opt/qt33f/lib/libqt-mt.so.3
#43 0x40ae2800 in QApplication::enter_loop () from /opt/qt33f/lib/libqt-mt.so.3
#44 0x40a95eba in QDragManager::drag () from /opt/qt33f/lib/libqt-mt.so.3
---Type <return> to continue, or q <return> to quit---#45 0x40aea67f in QDragObject::drag () from /opt/qt33f/lib/libqt-mt.so.3
#46 0x40aea5e2 in QDragObject::drag () from /opt/qt33f/lib/libqt-mt.so.3
#47 0x4140ad99 in KHTMLPart::khtmlMouseMoveEvent (this=0x88e7748,
    event=0xbfffe760) at khtml_part.cpp:5375
#48 0x41409a22 in KHTMLPart::customEvent (this=0x88e7748, event=0xbfffe760)
    at khtml_part.cpp:5038
#49 0x40b2f6f7 in QObject::event () from /opt/qt33f/lib/libqt-mt.so.3
#50 0x40ae2618 in QApplication::internalNotify ()
   from /opt/qt33f/lib/libqt-mt.so.3
#51 0x40ae2264 in QApplication::notify () from /opt/qt33f/lib/libqt-mt.so.3
#52 0x407108ec in KApplication::notify (this=0xbffff490, receiver=0x88e7748,
    event=0xbfffe760) at kapplication.cpp:506
#53 0x413e0085 in KHTMLView::viewportMouseMoveEvent (this=0x8fcdbc8,
    _mouse=0xbfffed30) at /opt/qt33f/include/qapplication.h:491
#54 0x40c20818 in QScrollView::eventFilter () from /opt/qt33f/lib/libqt-mt.so.3
#55 0x413e17af in KHTMLView::eventFilter (this=0x8fcdbc8, o=0x8fe0248,
    e=0xbfffed30) at khtmlview.cpp:1399
#56 0x40b2f7cb in QObject::activate_filters ()
   from /opt/qt33f/lib/libqt-mt.so.3
#57 0x40b2f681 in QObject::event () from /opt/qt33f/lib/libqt-mt.so.3
#58 0x40b5ebe1 in QWidget::event () from /opt/qt33f/lib/libqt-mt.so.3
#59 0x40ae2618 in QApplication::internalNotify ()
   from /opt/qt33f/lib/libqt-mt.so.3
#60 0x40ae1d57 in QApplication::notify () from /opt/qt33f/lib/libqt-mt.so.3
---Type <return> to continue, or q <return> to quit---#61 0x407108ec in KApplication::notify (this=0xbffff490, receiver=0x8fe0248,
    event=0xbfffed30) at kapplication.cpp:506
#62 0x40a85e31 in QETWidget::translateMouseEvent ()
   from /opt/qt33f/lib/libqt-mt.so.3
#63 0x40a83c98 in QApplication::x11ProcessEvent ()
   from /opt/qt33f/lib/libqt-mt.so.3
#64 0x40a97d96 in QEventLoop::processEvents ()
   from /opt/qt33f/lib/libqt-mt.so.3
#65 0x40af118c in QEventLoop::enterLoop () from /opt/qt33f/lib/libqt-mt.so.3
#66 0x40af10d5 in QEventLoop::exec () from /opt/qt33f/lib/libqt-mt.so.3
#67 0x40ae27a0 in QApplication::exec () from /opt/qt33f/lib/libqt-mt.so.3
#68 0x40054b3d in kdemain (argc=1, argv=0xbffff5f4) at konq_main.cc:184
#69 0x42017589 in __libc_start_main () from /lib/i686/libc.so.6
Comment 2 Dawit Alemayehu 2004-02-18 14:33:28 UTC
CVS commit by adawit: 

- Do not cause a crash when dragging image and closing tab (BR# 74353). 
  A QDragObject added to a KMultiDrag using ::addDragSource should not
  have a drag source. There is still another crash that occurs as a 
  result of closing the tab, but that is a different issue...

CCMAIL: 74353-done@bugs.kde.org


  M +1 -1      khtml_part.cpp   1.966


--- kdelibs/khtml/khtml_part.cpp  #1.965:1.966
@@ -5356,5 +5356,5 @@ void KHTMLPart::khtmlMouseMoveEvent( kht
     }
 
-    KURLDrag* urlDrag = new KURLDrag( u, d->m_view->viewport() );
+    KURLDrag* urlDrag = new KURLDrag( u, 0 );
     if ( !d->m_referrer.isEmpty() )
       urlDrag->metaData()["referrer"] = d->m_referrer;