OK, I tracked down as much as I could. My findings:
In some rare cases, ImageWindow.windows return a single ImageWindow object, instead of an array of ImageWindow. I am not able to reproduce it in a simple case, this happens only in PJSR 1.8RC1, when I call multiple process in the same script, and only on a function that was called 2 level deep (I know it sounds crazy). ImageWindow.windows returns the proper array just before and just after calling the method use ImageWindow internally.
This happens far less often if I call gc(true) between the execution of the processes, but still happens (after 6 to 8 calls to a process, instead of after the second one).
Also PI crashes quite often when I exit it after having that problem. Maybe some memory corruption somewhere?
There is not much I can do, I will pack the other small corrections (they impact only error handling and tests), and the use of isClose, as a new version. I added code to test the above condition and throw an exception in case it happens. This does not seem to be the case when using VaryParams interactively (in opposition of calling it via the test scripts).
I can give you indication to reproduce the problem, but it is somewhat lengthy.
-- bitli