Bug 100348 - "Clear History" followed by "Clear" crashes Kcontrol's "History Sidebar" module
Summary: "Clear History" followed by "Clear" crashes Kcontrol's "History Sidebar" module
Status: RESOLVED FIXED
Alias: None
Product: kcontrol
Classification: Miscellaneous
Component: kcmkonq (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: Konqueror Developers
URL:
Keywords:
: 103835 111684 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-02-27 04:34 UTC by Hugo Rodrigues
Modified: 2005-08-29 08:33 UTC (History)
2 users (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 Hugo Rodrigues 2005-02-27 04:34:56 UTC
Version:           unknown (using KDE 3.4.0 Level "a" , SUSE 9.2 UNSUPPORTED)
Compiler:          gcc version 3.3.4 (pre 3.3.5 20040809)
OS:                Linux (i686) release 2.6.8-24.10-default

"Clear History" followed by "Clear" button crashes Kcontrol's "History Sidebar" module, but only if there's already history info collected.
Comment 1 Stephan Binner 2005-03-01 12:51:46 UTC
"Clear History" in the sidebar or in the configuration module? Backtrace at hand?
Comment 2 Hugo Rodrigues 2005-03-01 20:44:29 UTC
It crashes ONLY if I press "Clear History" followed by "Clear" in the "History Sidebar" kcmodule inside Kcontrol.
Both "Clear History" followed by "Clear" in Konqueror's sidebar or in "History Sidebar" configuration module called from Konqueror's "Settings" --> "Configure Konqueror" menu don't crash and work as expected.

Below is the backtrace of the crash, hope it helps:

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 1096002112 (LWP 9135)]
[KCrash handler]
#7  0x40f04242 in QGArray::QGArray () from /usr/lib/qt3/lib/libqt-mt.so.3
#8  0x4091710c in DCOPObject::objId () from /opt/kde3/lib/libDCOP.so.4
#9  0x415762e1 in KonqHistoryManager::emitClear ()
   from /opt/kde3/lib/libkonq.so.4
#10 0x41e66cb5 in HistorySidebarConfig::slotClearHistory ()
   from /opt/kde3/lib/kde3/kcm_history.so
#11 0x41e674b0 in HistorySidebarConfig::qt_invoke ()
   from /opt/kde3/lib/kde3/kcm_history.so
#12 0x40c4131e in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#13 0x40c41ac6 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#14 0x40f9af7c in QButton::clicked () from /usr/lib/qt3/lib/libqt-mt.so.3
#15 0x40cd9c34 in QButton::mouseReleaseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0x40c77905 in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#17 0x40bdebaf in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0x40be0f56 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#19 0x4086a5d1 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#20 0x40b7c25e in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0x40b7b116 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0x40b8bb08 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0x40bf6b41 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#24 0x40bf6986 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#25 0x40be063f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0x4167230d in kdemain () from /opt/kde3/lib/libkdeinit_kcontrol.so
#27 0x400187b4 in kdeinitmain () from /opt/kde3/lib/kde3/kcontrol.so
#28 0x0804e892 in launch ()
#29 0x0804ef9c in handle_launcher_request ()
#30 0x0804f559 in handle_requests ()
#31 0x0804fd2a in main ()
Comment 3 Hugo Rodrigues 2005-03-17 21:04:05 UTC
Just to let you know that unfortunatly this ocours exactly the same way in the new KDE 3.4 final.
Comment 4 Hugo Rodrigues 2005-03-17 21:06:42 UTC
Here's the debug backtrace on the new KDE 3.4:

Using host libthread_db library "/lib/tls/libthread_db.so.1".
[Thread debugging using libthread_db enabled]
[New Thread 1096002112 (LWP 6626)]
[KCrash handler]
#7  0x40f04242 in QGArray::QGArray () from /usr/lib/qt3/lib/libqt-mt.so.3
#8  0x4091710c in DCOPObject::objId () from /opt/kde3/lib/libDCOP.so.4
#9  0x415762a1 in KonqHistoryManager::emitClear ()
   from /opt/kde3/lib/libkonq.so.4
#10 0x41e20cb5 in HistorySidebarConfig::slotClearHistory ()
   from /opt/kde3/lib/kde3/kcm_history.so
#11 0x41e214b0 in HistorySidebarConfig::qt_invoke ()
   from /opt/kde3/lib/kde3/kcm_history.so
#12 0x40c4131e in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#13 0x40c41ac6 in QObject::activate_signal ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#14 0x40f9af7c in QButton::clicked () from /usr/lib/qt3/lib/libqt-mt.so.3
#15 0x40cd9c34 in QButton::mouseReleaseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#16 0x40c77905 in QWidget::event () from /usr/lib/qt3/lib/libqt-mt.so.3
#17 0x40bdebaf in QApplication::internalNotify ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#18 0x40be0f56 in QApplication::notify () from /usr/lib/qt3/lib/libqt-mt.so.3
#19 0x4086a631 in KApplication::notify () from /opt/kde3/lib/libkdecore.so.4
#20 0x40b7c25e in QETWidget::translateMouseEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#21 0x40b7b116 in QApplication::x11ProcessEvent ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#22 0x40b8bb08 in QEventLoop::processEvents ()
   from /usr/lib/qt3/lib/libqt-mt.so.3
#23 0x40bf6b41 in QEventLoop::enterLoop () from /usr/lib/qt3/lib/libqt-mt.so.3
#24 0x40bf6986 in QEventLoop::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#25 0x40be063f in QApplication::exec () from /usr/lib/qt3/lib/libqt-mt.so.3
#26 0x4167230d in kdemain () from /opt/kde3/lib/libkdeinit_kcontrol.so
#27 0x400187b4 in kdeinitmain () from /opt/kde3/lib/kde3/kcontrol.so
#28 0x0804e892 in launch ()
#29 0x0804ef9c in handle_launcher_request ()
#30 0x0804f559 in handle_requests ()
#31 0x0804fd2a in main ()
Comment 5 Tommi Tervo 2005-04-14 09:27:49 UTC
*** Bug 103835 has been marked as a duplicate of this bug. ***
Comment 6 David Faure 2005-04-14 10:59:45 UTC
CVS commit by faure: 

The KParts::HistoryManager/KonqHistoryManager singleton mechanism is quite broken...
KControl creates a KParts::HistoryManager on startup, and then the cast inside
KonqHistoryManager::kself() fails.
Better not use KonqHistoryManager at all from this code then.
BUG: 100348


  M +5 -4      kcmhistory.cpp   1.17


--- kdebase/konqueror/sidebar/trees/history_module/kcmhistory.cpp  #1.16:1.17
@@ -28,4 +28,5 @@
 
 #include <dcopclient.h>
+#include <dcopref.h>
 #include <kapplication.h>
 #include <kconfig.h>
@@ -106,6 +107,4 @@ HistorySidebarConfig::HistorySidebarConf
     topLayout->add(dialog);
     load();
-
-    (void) new KonqHistoryManager( kapp, "history mgr" );
 }
 
@@ -294,6 +293,8 @@ void HistorySidebarConfig::slotClearHist
                                           "the entire history?"),
                                      i18n("Clear History?"), guiitem )
-         == KMessageBox::Continue )
-        KonqHistoryManager::kself()->emitClear();
+         == KMessageBox::Continue ) {
+        DCOPRef dcopHistManager( "konqueror*", "KonqHistoryManager" );
+        dcopHistManager.send( "notifyClear", "KonqHistoryManager" );
+    }
 }
 
Comment 7 Tommi Tervo 2005-08-29 08:33:49 UTC
*** Bug 111684 has been marked as a duplicate of this bug. ***