[Kst] [Bug 122927] Kst freezes when creating plot

George Staikos staikos at kde.org
Wed Mar 1 22:26:59 CET 2006


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
         
http://bugs.kde.org/show_bug.cgi?id=122927         
staikos kde org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From staikos kde org  2006-03-01 22:26 -------
SVN commit 514906 by staikos:

Remove unnecessary and incorrect lock on the input vector to avoid a deadlock
BUG: 122927


 M  +3 -5      ksthsdialog_i.cpp  


--- trunk/extragear/graphics/kst/src/libkstapp/ksthsdialog_i.cpp #514905:514906
 @ -211,15 +211,14  @
   KstHistogramPtr hs;
 
   KST::vectorList.lock().readLock();
-  KstVectorList::Iterator i = KST::vectorList.findTag(_w->_vector->selectedVector());
+  KstVectorPtr vp = *KST::vectorList.findTag(_w->_vector->selectedVector());
   KST::vectorList.lock().readUnlock();
-  if (i == KST::vectorList.end()) {
+  if (!vp) {
     kstdFatal() << "Bug in kst: the Vector field in plotDialog (Hs) refers to "
                 << " a non existant vector..." << endl;
   }
 
-  (*i)->readLock();
-  hs = new KstHistogram(tag_name, *i, new_min, new_max,
+  hs = new KstHistogram(tag_name, vp, new_min, new_max,
                         new_n_bins, new_norm_mode);
   hs->setRealTimeAutoBin(_w->_realTimeAutoBin->isChecked());
 
 @ -271,7 +270,6  @
       }
     }
   }
-  (*i)->readUnlock();
 
   KST::dataObjectList.lock().writeLock();
   KST::dataObjectList.append(hs.data());


More information about the Kst mailing list