GenericDialog limited to 25 sliders

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

GenericDialog limited to 25 sliders

Stephan.Preibisch@mdc-berlin.de
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.

Thanks a lot,
Stephan
---

Dr. Stephan Preibisch
Group Leader

Berlin Institute for Medical Systems Biology (BIMSB), Max Delbrück Center for Molecular Medicine (MDC)
Building 89, 1.08b

email: [hidden email]<mailto:[hidden email]>
web: http://preibischlab.mdc-berlin.de


--
ImageJ mailing list: http://imagej.nih.gov/ij/list.html
Reply | Threaded
Open this post in threaded view
|

Re: GenericDialog limited to 25 sliders

Wayne Rasband-2
> 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
Reply | Threaded
Open this post in threaded view
|

Re: GenericDialog limited to 25 sliders

Rainer M. Engel
Am 25.04.2017 um 04:39 schrieb Wayne Rasband:

>> 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
>


When there ever was a movie from Disney:
The Pirates of beyond the 25 sliders...

Wayne would be "Captain White Hair of the Bug Bounty".. a fast sailing
ship known to each guy around these waters and java tides..

Ahoi there and all the best to everyone..
Rainer


--
Rainer M. Engel, Dipl. Digital Artist

endime|ENGEL DIGITAL MEDIA
Pichelsdorferstr. 143
D-13595 Berlin

Tel: +49 (0)30-922 52 0 96
Mob: +49 (0)174-3355549

Web:    www.endime.de
E-Mail: [hidden email]

USt.Id: DE254256305

BANK:   Triodos Bank Deutschland
Kto:    1037 0110 09
BLZ:    5003 1000
IBAN:   DE15 5003 1000 1037 0110 09
BIC:    TRODDEF1XXX


Hinweis / Notice:
Der Inhalt dieser E-Mail ist vertraulich und ausschließlich fuer den
bezeichneten Adressaten bestimmt.
Wenn Sie nicht der vorgesehene Adressat dieser E-Mail oder dessen
Vertreter sein sollten, so beachten
Sie bitte, dass jede Form der Kenntnisnahme, Veroeffentlichung,
Vervielfaeltigung oder Weitergabe des
Inhalts dieser E-Mail unzulaessig ist. Wir bitten Sie, sich in diesem
Fall mit dem Absender der E-Mail in
Verbindung zu setzen.

The information contained in this email is confidential and intended
solely for the addressee. Access to
this email by anyone else is unauthorized. If you are not the intended
recipient, any form of disclosure,
reproduction, distribution or any action taken or refrained from in
reliance on it, is prohibited and may
be unlawful. Please notify the sender immediately.

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