[Kst] [Bug 112762] kst consumes mucho CPU when idle

George Staikos staikos at kde.org
Tue Oct 11 07:04:06 CEST 2005

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.

------- Additional Comments From staikos kde org  2005-10-11 07:04 -------
The bug is due to SVN revision 458719:
r458719 | truch | 2005-09-08 18:51:31 -0400 (Thu, 08 Sep 2005) | 7 lines

Apply Don Wiebe's getdata modifications:

Adds a MULTIPLY derived field for multiplying two fields.

Adds the ability to LINCOM fields with different numbers of samples per frame.
Also applies to new MULTIPLY fields.

There were some changes like this:
+  if (n_read2 * spf1 < *n_read * spf2) {
+    *n_read = n_read2 * spf1 / spf2;
+  }

KstRVector expects that it can read one sample from a frame, however.  This means that n_read is 1 and n_read2 is 0, so n_read is adjusted to 0.  This is wrong.  n_read should be 1 still, and Kst keeps trying to read this sample over and over.

The obvious fix is to skip this if n_read2 is 0.  Any comments?

More information about the Kst mailing list