Bug 92676 - Crashes when deleting files
Summary: Crashes when deleting files
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: Debian testing Linux
: NOR crash
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-04 13:09 UTC by Michael Durrer
Modified: 2004-11-13 21:38 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 Michael Durrer 2004-11-04 13:09:02 UTC
Version:            (using KDE KDE 3.3.0)
Installed from:    Debian testing/unstable Packages
OS:                Linux

When I right click on the file tab below of the editor area and choose to delete a file, it crashes (after I agreed to delete file in the dialog box).
This is the backtrace of Quanta after it crashed:

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread -1238753152 (LWP 13328)]
[KCrash handler]
#3  0x00000000 in ?? ()
#4  0x080a6068 in QMemArray<char>::detach ()
#5  0x080d716e in QString::~QString ()
#6  0x080f1d2d in QMapIterator<QString, bool>::dec ()
#7  0x080f23fc in QMapIterator<QString, bool>::dec ()
#8  0xb69bd52c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#9  0xb6cfb08a in QSignal::signal () from /usr/lib/libqt-mt.so.3
#10 0xb69d76ed in QSignal::activate () from /usr/lib/libqt-mt.so.3
#11 0xb6ac47a9 in QPopupMenu::mouseReleaseEvent () from /usr/lib/libqt-mt.so.3
#12 0xb69f3697 in QWidget::event () from /usr/lib/libqt-mt.so.3
#13 0xb6960bcf in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#14 0xb69602c4 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#15 0xb6f99da3 in KApplication::notify () from /usr/lib/libkdecore.so.4
#16 0xb68f5231 in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#17 0xb68f32ce in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#18 0xb690a1a4 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#19 0xb6972f28 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#20 0xb6960e81 in QApplication::enter_loop () from /usr/lib/libqt-mt.so.3
#21 0xb6ac7619 in QPopupMenu::exec () from /usr/lib/libqt-mt.so.3
#22 0x080f238c in QMapIterator<QString, bool>::dec ()
#23 0xb69bd52c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#24 0xb73984c7 in KTabWidget::contextMenu () from /usr/lib/libkdeui.so.4
#25 0xb739793c in KTabWidget::contextMenu () from /usr/lib/libkdeui.so.4
#26 0xb73989c6 in KTabWidget::qt_invoke () from /usr/lib/libkdeui.so.4
#27 0xb7f3e871 in KMdiDocumentViewTabWidget::qt_invoke ()
   from /usr/lib/libkmdi.so.1
#28 0xb69bd52c in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#29 0xb7396814 in KTabBar::contextMenu () from /usr/lib/libkdeui.so.4
#30 0xb73953a9 in KTabBar::mousePressEvent () from /usr/lib/libkdeui.so.4
#31 0xb69f3686 in QWidget::event () from /usr/lib/libqt-mt.so.3
#32 0xb6ae6172 in QTabBar::event () from /usr/lib/libqt-mt.so.3
#33 0xb6960bcf in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#34 0xb69602c4 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#35 0xb6f99da3 in KApplication::notify () from /usr/lib/libkdecore.so.4
#36 0xb68f5640 in QETWidget::translateMouseEvent ()
   from /usr/lib/libqt-mt.so.3
#37 0xb68f32ce in QApplication::x11ProcessEvent () from /usr/lib/libqt-mt.so.3
#38 0xb690a1a4 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#39 0xb6972f28 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#40 0xb6972dd8 in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#41 0xb6960e21 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#42 0x080a274f in QPtrList<char>::deleteItem ()
#43 0xb63f67f8 in __libc_start_main () from /lib/tls/libc.so.6
#44 0xb6518fcc in ?? () from /lib/tls/libc.so.6
Comment 1 András Manţia 2004-11-13 21:38:31 UTC
CVS commit by amantia: 

Backport: Don't crash when deleting a file using the context menu [#92676].

BUG: 92676


  M +1 -0      ChangeLog   1.295.2.12
  M +4 -13     src/quanta.cpp   1.619.2.8


--- kdewebdev/quanta/ChangeLog  #1.295.2.11:1.295.2.12
@@ -10,4 +10,5 @@
           (for example HTML tables inside XHTML)
         - fix node tree corruption while parsing scripts inside a tag [#91508]
+        - don't crash when deleting a file using the context menu [#92676]
  
         

--- kdewebdev/quanta/src/quanta.cpp  #1.619.2.7:1.619.2.8
@@ -3664,19 +3664,10 @@ void QuantaApp::slotDeleteFile(QuantaVie
   Document *w = view->document();
   KURL url = w->url();
-/*  if (KMessageBox::questionYesNo(this,
-                   i18n("<qt>Do you really want to delete the file <b>%1</b>?</qt>")
-                   .arg(url.prettyURL(0, KURL::StripFileProtocol)),
-                   i18n("Delete File")) == KMessageBox::Yes)
-  {
-    if (KIO::NetAccess::del(url, this))
-    {
-      if (Project::ref()->hasProject())
-        Project::ref()->slotRemove(url);
-    }*/
-  if ( QuantaNetAccess::del(url, this, true) )
-  {
     w->setModified(false); //don't ask for save
+  if (QuantaNetAccess::del(url, this, true))
+  {
     slotFileClose();
-  }
+  } else
+    w->setModified(modified);
 }