Bug 94190 - Pressing the reload button rapidly repeatedly crashes kst
Summary: Pressing the reload button rapidly repeatedly crashes kst
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.0.0
Platform: unspecified Linux
: NOR crash
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-12-01 02:23 UTC by D. V. Wiebe
Modified: 2004-12-05 22:51 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description D. V. Wiebe 2004-12-01 02:23:34 UTC
Version:           1.0.0 (using KDE 3.3.1, compiled sources)
Compiler:          gcc version 3.3.4
OS:                Linux (i686) release 2.6.9

When looking at non-streaming dirfile data, rapidly and repeatedly pressing the reload button crashes kst.

I was unable to generate a backtrace for this.

(And, no, I don't know why you'd want to be doing this.)
Comment 1 George Staikos 2004-12-01 04:44:56 UTC
On Tuesday 30 November 2004 20:23, D.V.Wiebe wrote:
> When looking at non-streaming dirfile data, rapidly and repeatedly pressing
> the reload button crashes kst.
>
> I was unable to generate a backtrace for this.

  Can't reproduce this with non-streaming ASCII file.  Must be a dirfile bug?

Comment 2 Netterfield 2004-12-01 04:53:36 UTC
Don showed me: he had to hit it many many times, as fast as he could on a slow 
machine.  It also requires many frames... 

Comment 3 George Staikos 2004-12-01 05:01:05 UTC
On Tuesday 30 November 2004 22:53, netterfield@astro.utoronto.ca wrote:
> 04:53 ------- Don showed me: he had to hit it many many times, as fast as
> he could on a slow machine.  It also requires many frames...

  I hit it so many times that it's still updating and reloading 5 minutes 
later.  Can this be reproduced there with demo.kst?

Comment 4 George Staikos 2004-12-01 05:16:06 UTC
QMutex::unlock: unlock from different thread than locker
                was locked by 1024, unlock attempt from 1026

At least one bug lurking, though it's a freeze, not a crash.  I swear I had fixed all of these though.  

6  0x0eeec124 in QMutex::lock (this=0x10413314) at tools/qmutex_unix.cpp:464
#7  0x0fed2f68 in KstRWLock::writeLock (this=0x1041330c) at rwlock.cpp:62
#8  0x1012b918 in KstRVector::reload (this=0x104dce10) at kstrvector.cpp:591
#9  0x1016a81c in KstApp::reload (this=0x102a1d10) at kst.cpp:1514

Comment 5 George Staikos 2004-12-05 22:51:46 UTC
CVS commit by staikos: 

- lock the rvector when reloading (oops)
- disable debug again (oops^2)
BUG: 94190


  M +2 -0      kst.cpp   1.262
  M +1 -1      updatethread.cpp   1.34


--- kdeextragear-2/kst/kst/kst.cpp  #1.261:1.262
@@ -1513,5 +1513,7 @@ void KstApp::reload() {
     KstRVectorPtr r = kst_cast<KstRVector>(*i);
     if (r) {
+      r->writeLock();
       r->reload();
+      r->writeUnlock();
     }
   }

--- kdeextragear-2/kst/kst/updatethread.cpp  #1.33:1.34
@@ -29,5 +29,5 @@
 
 // 0 - none, 1 - some, 2 - lots, 3 - too much
-#define UPDATEDEBUG 2
+#define UPDATEDEBUG 0
 
 UpdateThread::UpdateThread(KstDoc *doc)