Author |
Topic  |
|
jminer
3 Posts |
Posted - 13 Nov 2006 : 17:06:06
|
Using QCRTGraph for Java; semi-real-time application drawing 6-10 waveforms; display update 1000 mSecs, sample update 10 mSecs. Works great for about 1 hour or so. Thereafter, I get an ArrayIndexOutOfBoundsException: 262144 at com.quinncurtis.chart2djava.DoubleArray.arrayCopy(DoubleArray:44) ... ... traceback through quinn curtis drawing ... java.awt.EventDispatchThread.run
Eventually, I get a java out of memory crash.
Any suggestions?
|
|
quinncurtis
1586 Posts |
Posted - 13 Nov 2006 : 17:26:04
|
Can you supply us with a simple example program using simulated data that reproduces the problem?
Are you continuously truncating the datasets, or are you accumulating millions of data points (10 traces * 100 samples/sec * 3600 secs/hour) = 3.6 Million datapoints/hour = 30MB/hour. |
 |
|
jminer
3 Posts |
Posted - 14 Nov 2006 : 11:17:53
|
The code I'm using is rather involved. I'm not explicitly truncating the datasets; I guess I assumed that was done behind the scenes, newbie error. I'm doing a run now with dataset truncation turned on: autoTruncate=true autoTruncMin=1000 autoTruncMax=200000
I will let you know how it turns out.
Thanks...Jim
|
 |
|
quinncurtis
1586 Posts |
Posted - 14 Nov 2006 : 12:06:50
|
To keep the updates as fast as possible, keep the minimuim number of data points in the dataset only slightly larger than a screens worth of data. For efficiency, the maximum does not need to be more than 2x that, unless you want to be able to scroll back historically in the data. Your value 1000 for the minimum seems about right, the value of 200K for the maximum seems large unless you need access to all of the historical data values via the dataset.
|
 |
|
jminer
3 Posts |
Posted - 14 Nov 2006 : 17:33:57
|
Good advice, thanks. The value 200000 was merely to get under the index 262144 where I seemed to get into trouble. A more reasonable value is definintely in order.
Update on last run: Setting up the truncation did the trick, no more crashes.
You folks have a great product and excellent support. I am impressed.
...Jim |
 |
|
|
Topic  |
|