Login  Register

Re: GenericDialog limited to 25 sliders

Posted by Wayne Rasband-2 on Apr 25, 2017; 2:39am
URL: http://imagej.273.s1.nabble.com/GenericDialog-limited-to-25-sliders-tp5018594p5018603.html

> On Apr 24, 2017, at 2:08 AM, [hidden email] <[hidden email]> wrote:
>
> Hi,
>
> I ran into a confusing bug that ImageJ crashes with an outofbounds exceptions when using >= 25 sliders:
>
> Exception in thread "Thread-3" java.lang.ArrayIndexOutOfBoundsException: 25
> at ij.gui.GenericDialog.addSlider(GenericDialog.java:646)
>
> This behaviour is wanted since there is a "public static final int MAX_SLIDERS = 25;”, which defines the array size.
>
> Would it be ok to remove this limitation? It seems rather random and from my point of view it seems to make not much sense. But even if, it should not crash but throw a defined exception.

This bug is fixed in the latest ImageJ daily build (1.51m29).

-wayne

--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html