Bug 112751

Summary: kst freezes when clear is pressed in debug dialog
Product: [Applications] kst Reporter: Matthew Truch <matt>
Component: generalAssignee: kst
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: 1.x   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:

Description Matthew Truch 2005-09-16 19:05:08 UTC
Version:           1.2.0_svn_460893 (using KDE KDE 3.4.1)
Installed from:    Fedora RPMs
OS:                Linux

kst freezes when the clear button in the log tab of the debug kst dialog is pressed.

How to reproduce:  Open kst.  No need to plot any data.  Open the debug dialog, go to the log, press clear.

Expected behavior:  kst doesn't freeze.  I'd assume something like clearing the log would also happen, but I'm more concerned with kst not freezing.  ;-)

Note:  By freeze I do not mean crash (with a signal), nor do I mean some issue where kst is consuming all the CPU.
Comment 1 George Staikos 2005-09-16 19:15:04 UTC
SVN commit 461163 by staikos:

This lock isn't recursive, so acquire it only once

BUG: 112751


 M  +1 -1      kstdebug.cpp  


--- trunk/extragear/graphics/kst/kst/kstdebug.cpp #461162:461163
@@ -107,11 +107,11 @@
 
 
 void KstDebug::clear() {
+  clearHasNewError(); // has to be before the lock is acquired
   QMutexLocker ml(&_lock);
   _messages.clear(); 
   LogEvent *e = new LogEvent(LogEvent::LogCleared);
   QApplication::postEvent(_handler, e);
-  clearHasNewError();
 }