PuffinPlot issue tracker

Bug: a88/9d0

ID : 9d065ef8-7317-4c42-947a-8205cacfa88a
Short name : a88/9d0
Status : fixed
Severity : minor
Assigned :
Reporter : Pontus Lurcock <pont@talvi.net>
Creator : Pontus Lurcock <pont@talvi.net>
Created : Wed, 23 Sep 2009 07:32:10 +0000
Target : 1.0
Summary : Puffin crashes on `close file' [127]

Comment: --------- Comment ---------
ID: b7e11a9e-e650-46ef-8503-d48aa9b459fa
Short name: a88/9d0/b7e
From: Pontus Lurcock <pont@talvi.net>
Date: Wed, 23 Sep 2009 07:32:10 +0000

Build date: UNKNOWN
Crash date: 2009-09-23 19:27:56
java.version    1.5.0_16
java.vendor     Sun Microsystems Inc.
os.name         Linux
os.arch         i386
os.version      2.6.24-19-generic
user.name       pont
java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
at java.util.ArrayList.RangeCheck(ArrayList.java:546)
at java.util.ArrayList.get(ArrayList.java:321)
at net.talvi.puffinplot.PuffinApp.getSuite(PuffinApp.java:299)
at net.talvi.puffinplot.PuffinApp.getSample(PuffinApp.java:303)
at net.talvi.puffinplot.window.MainGraphDisplay$1.getSample(MainGraphDisplay.java:30)
at net.talvi.puffinplot.plots.SampleEqAreaPlot.draw(SampleEqAreaPlot.java:37)
at net.talvi.puffinplot.window.GraphDisplay.paint(GraphDisplay.java:99)
...

Looks as though it's just not resetting the current suite index, so
it falls off the end of the list if you're looking at the last suite and
close it.

Comment: --------- Comment ---------
ID: 346da303-75d2-48d6-9ad8-4588812e2d28
Short name: a88/9d0/346
From: Pontus Lurcock <pont@talvi.net>
Date: Wed, 23 Sep 2009 22:11:04 +0000

On closing a suite, Puffin now sets the current suit to the previous
one (if any), otherwise the next one (if any), otherwise none. Replaced
PuffinApp's currentSuiteIndex with a pointer to the suite itself which
should make this kind of bug less likely.