Because of extra icons appearing the the Windows OS, it is convenient for most users of Pet Ct viewer to hide the original ImageJ image windows. In the Pet Ct viewer, View menu, there is a check box for Show source where the user can display or hide the original data. Most users hide the data, but he is free to change his choice at any time.
If he chooses to hide the source data, when he closes the study, the source data windows are closed as well. So the Pet Ct window first gives commands to close the source data and then it closes itself.
In the ImageJ Window menu there is a list of open windows. The source windows appear in this list irrespective if they are hidden or not (good idea, don’t change).
The problem is there seems to be a race such that 20-30% of the time ImageJ will report an inconsistency between the actual open windows and the windows listed in the Window menu. I put a short sleep in my program after giving the command to close the windows such that ImageJ would have time to sort out things. The sleep helps nothing, probably because of the thread where it is running.
In any case you can see from the error list that the problem is not connected to my program, most likely because my program is already closed. All the errors are at the ImageJ level. If there are any ideas what might be causing the problem I would be happy to test the daily build to see if anything has improved.
It isn’t a show stopper problem, but it is still annoying.
java.lang.ArrayIndexOutOfBoundsException: 1 >= 1