Ticket #797 (closed defect: fixed)
Opened 2011-09-26T13:18:46-05:00
Last modified 2011-09-28T10:49:02-05:00
Exception bug when adding an axis to an image
Reported by: | bdezonia | Owned by: | bdezonia |
---|---|---|---|
Priority: | major | Milestone: |
|
Component: | Display API | Version: | |
Severity: | serious | Keywords: | |
Cc: | Blocked By: | ||
Blocking: |
Description
If you add an axis to an image it is possible to get an exception trace in SwingImageDisplay::makeLabel().
Change History
comment:1 Changed 2011-09-26T13:27:38-05:00 by bdezonia
comment:2 Changed 2011-09-26T13:49:23-05:00 by bdezonia
Removing the panReset() and setZoom() code from SwingImageDisplay fixes this bug but resurrects 605 & 627. Need to find a solution that works for all three!
comment:5 Changed 2011-09-28T10:39:20-05:00 by bdezonia
- Status changed from new to closed
- Resolution set to fixed
Fixed in 4d1d8f1f6b2cfcf70d0e197055e8e4c98019618f
This bug can be hard to duplicate. I tend to have luck adding an axis to the Boats sample image but it only fails occasionally.
Note - my earlier label of SwingImageDisplay is not right. It is SwingDisplayPanel.
I have debugged this far enough to see that there is a race condition between the SwingDisplayPanel::makeLabel() code and code elsewhere that updates the view that owns the Dataset that is changing.
Basically it is possible for the dataset dims and the view's plane position to be out of sync and incompatible. We can add innoculation code here to make sure data is always compatible but that is not the best fix.
Best would be to avoid the race condition altogether. The problem happens when SwingImageDisplay initiates a setZoom() call due to a DatasetRestructuredEvent. The ZoomEvent is handled in SwingDisplayPanel where it calls makeLabel(). The code from SwingImageDisplay is tagged with warnings about timing issues. Might be best to fix the call there.