Normalised / ProkDrumsEditor

Prok Drums Editor Site
11 stars 1 forks source link

Editor crashes while clicking around #25

Open dxlbnl opened 4 years ago

dxlbnl commented 4 years ago

Not sure what i precisely did to make it hang, but there's some improper bounds checking:

java.lang.IndexOutOfBoundsException: Index 0 out of bounds for length 0
        at java.base/jdk.internal.util.Preconditions.outOfBounds(Preconditions.java:64)
        at java.base/jdk.internal.util.Preconditions.outOfBoundsCheckIndex(Preconditions.java:70)
        at java.base/jdk.internal.util.Preconditions.checkIndex(Preconditions.java:248)
        at java.base/java.util.Objects.checkIndex(Objects.java:372)
        at java.base/java.util.ArrayList.get(ArrayList.java:458)
        at com.prokmodular.model.PresetManager.getFileAtIndex(PresetManager.java:45)
        at com.korisnamedia.thonk.ui.PresetManagerUI.lambda$createUI$1(PresetManagerUI.java:112)
        at controlP5.Controller.callListener(Controller.java:1127)
        at controlP5.Controller.setMousePressed(Controller.java:632)
        at controlP5.ControllerGroup.setMousePressed(ControllerGroup.java:568)
        at controlP5.ControlWindow.mouseReleasedEvent(ControlWindow.java:664)
        at controlP5.ControlWindow.mouseEvent(ControlWindow.java:449)
        at jdk.internal.reflect.GeneratedMethodAccessor6.invoke(Unknown Source)
        at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.base/java.lang.reflect.Method.invoke(Method.java:566)
        at processing.core.PApplet$RegisteredMethods.handle(PApplet.java:1408)
        at processing.core.PApplet.handleMethods(PApplet.java:1603)
        at processing.core.PApplet.handleMouseEvent(PApplet.java:2695)
        at processing.core.PApplet.dequeueEvents(PApplet.java:2618)
        at processing.core.PApplet.handleDraw(PApplet.java:2429)
        at processing.awt.PSurfaceAWT$12.callDraw(PSurfaceAWT.java:1540)
        at processing.core.PSurfaceNone$AnimationThread.run(PSurfaceNone.java:316)
13:16:48,105 DEBUG ThonkModularApp:132 - Shutdown
Normalised commented 4 years ago

Something with the patch list. I'll take a look. thanks.