java.lang.ArrayIndexOutOfBoundsException

There are no available Samebug tips for this exception. Do you have an idea how to solve this issue? A short tip would help users who saw this issue last week.

  • Progress Bars update crash javaFX
    via Stack Overflow by Arthur Vaïsse
    ,
  • Progress Bars update crash javaFX
    via by 8d6f601d-6f52-4a4e-81db-fc4f3d16ec02,
  • FULL PRODUCT VERSION : java version "1.8.0_102" Java(TM) SE Runtime Environment (build 1.8.0_102-b14) Java HotSpot(TM) 64-Bit Server VM (build 25.102-b14, mixed mode) ADDITIONAL OS VERSION INFORMATION : Linux mintleaf 4.6.4-301.fc24.x86_64 #1 SMP Tue Jul 12 11:50:00 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux A DESCRIPTION OF THE PROBLEM : When removing a Node from the scene graph (in a specific situation), while there are change listeners for the bounds of some nodes, an ArrayIndexOutOfBounds is thrown in Parent.updateCachedBounds. The specific situation is reproduced by the example code below. STEPS TO FOLLOW TO REPRODUCE THE PROBLEM : Save the attached source code as App.java Run javac App.java java App EXPECTED VERSUS ACTUAL BEHAVIOR : EXPECTED - The program terminates without output (since the test code never makes the stage visible). ACTUAL - An ArrayIndexOutOfBounds exception is thrown. ERROR MESSAGES/STACK TRACES THAT OCCUR : Aug 01, 2016 3:41:27 PM javafx.beans.binding.Bindings$2 computeValue WARNING: Exception while evaluating binding java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at com.sun.javafx.collections.ObservableListWrapper.get(ObservableListWrapper.java:89) at com.sun.javafx.collections.VetoableListDecorator.get(VetoableListDecorator.java:306) at javafx.scene.Parent.updateCachedBounds(Parent.java:1591) at javafx.scene.Parent.recomputeBounds(Parent.java:1535) at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388) at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078) at javafx.scene.Node.updateGeomBounds(Node.java:3579) at javafx.scene.Node.getGeomBounds(Node.java:3532) at javafx.scene.Node.getLocalBounds(Node.java:3480) at javafx.scene.Node.updateTxBounds(Node.java:3643) at javafx.scene.Node.getTransformedBounds(Node.java:3426) at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732) at javafx.scene.Parent.recomputeBounds(Parent.java:1524) at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388) at javafx.scene.Node.updateGeomBounds(Node.java:3579) at javafx.scene.Node.getGeomBounds(Node.java:3532) at javafx.scene.Node.impl_computeLayoutBounds(Node.java:3376) at javafx.scene.Group.impl_computeLayoutBounds(Group.java:165) at javafx.scene.Node$12.computeBounds(Node.java:3225) at javafx.scene.Node$LazyBoundsProperty.get(Node.java:9308) at javafx.scene.Node$LazyBoundsProperty.get(Node.java:9278) at javafx.beans.binding.ObjectExpression.getValue(ObjectExpression.java:50) at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:178) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) at javafx.scene.Node$LazyBoundsProperty.invalidate(Node.java:9318) at javafx.scene.Node.impl_layoutBoundsChanged(Node.java:3403) at javafx.scene.Node.impl_notifyLayoutBoundsChanged(Node.java:3816) at javafx.scene.Node.impl_geomChanged(Node.java:3767) at javafx.scene.Parent.childBoundsChanged(Parent.java:1757) at javafx.scene.Node.notifyParentOfBoundsChange(Node.java:3838) at javafx.scene.Node.transformedBoundsChanged(Node.java:3800) at javafx.scene.Node.impl_geomChanged(Node.java:3761) at javafx.scene.Parent.childBoundsChanged(Parent.java:1757) at javafx.scene.Node.notifyParentOfBoundsChange(Node.java:3838) at javafx.scene.Node.transformedBoundsChanged(Node.java:3800) at javafx.scene.Node.impl_geomChanged(Node.java:3761) at javafx.scene.Parent.childBoundsChanged(Parent.java:1757) at javafx.scene.Node.notifyParentOfBoundsChange(Node.java:3838) at javafx.scene.Node.transformedBoundsChanged(Node.java:3800) at javafx.scene.Node.impl_geomChanged(Node.java:3761) at javafx.scene.layout.Region.widthChanged(Region.java:873) at javafx.scene.layout.Region.setWidth(Region.java:856) at javafx.scene.layout.Region.resize(Region.java:1364) at javafx.scene.Node.autosize(Node.java:2897) at javafx.scene.Parent.layoutChildren(Parent.java:1116) at javafx.scene.Group.layoutChildren(Group.java:226) at javafx.scene.Parent.layout(Parent.java:1087) at javafx.scene.Group.impl_computeLayoutBounds(Group.java:164) at javafx.scene.Node$12.computeBounds(Node.java:3225) at javafx.scene.Node$LazyBoundsProperty.get(Node.java:9308) at javafx.scene.Node$LazyBoundsProperty.get(Node.java:9278) at App.lambda$start$0(App.java:23) at javafx.beans.binding.Bindings$2.computeValue(Bindings.java:174) at javafx.beans.binding.DoubleBinding.get(DoubleBinding.java:203) at javafx.beans.property.DoublePropertyBase.get(DoublePropertyBase.java:133) at javafx.scene.shape.Line.getEndX(Line.java:195) at javafx.scene.shape.Line.impl_computeGeomBounds(Line.java:265) at javafx.scene.Node.updateGeomBounds(Node.java:3579) at javafx.scene.Node.getGeomBounds(Node.java:3532) at javafx.scene.Node.getLocalBounds(Node.java:3480) at javafx.scene.Node.updateTxBounds(Node.java:3643) at javafx.scene.Node.getTransformedBounds(Node.java:3426) at javafx.scene.Parent.getChildTransformedBounds(Parent.java:1732) at javafx.scene.Parent.updateCachedBounds(Parent.java:1596) at javafx.scene.Parent.recomputeBounds(Parent.java:1535) at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388) at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078) at javafx.scene.Node.updateGeomBounds(Node.java:3579) at javafx.scene.Node.getGeomBounds(Node.java:3532) at javafx.scene.Node.getLocalBounds(Node.java:3480) at javafx.scene.Node$MiscProperties$2.computeBounds(Node.java:6474) at javafx.scene.Node$LazyBoundsProperty.get(Node.java:9308) at javafx.scene.Node$LazyBoundsProperty.get(Node.java:9278) at javafx.beans.binding.ObjectExpression.getValue(ObjectExpression.java:50) at com.sun.javafx.binding.ExpressionHelper$SingleChange.fireValueChangedEvent(ExpressionHelper.java:178) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) at javafx.scene.Node$LazyBoundsProperty.invalidate(Node.java:9318) at javafx.scene.Node$MiscProperties.invalidateBoundsInLocal(Node.java:6502) at javafx.scene.Node.invalidateBoundsInLocal(Node.java:3188) at javafx.scene.Node.localBoundsChanged(Node.java:3781) at javafx.scene.Node.impl_geomChanged(Node.java:3768) at javafx.scene.Parent.childBoundsChanged(Parent.java:1757) at javafx.scene.Node.notifyParentOfBoundsChange(Node.java:3838) at javafx.scene.Node.transformedBoundsChanged(Node.java:3800) at javafx.scene.Node.localBoundsChanged(Node.java:3782) at javafx.scene.Node.impl_geomChanged(Node.java:3768) at javafx.scene.shape.Line.access$200(Line.java:58) at javafx.scene.shape.Line$3.invalidated(Line.java:174) at javafx.beans.property.DoublePropertyBase.markInvalid(DoublePropertyBase.java:112) at javafx.beans.property.DoublePropertyBase.access$000(DoublePropertyBase.java:52) at javafx.beans.property.DoublePropertyBase$Listener.invalidated(DoublePropertyBase.java:263) at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:137) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) at javafx.beans.binding.DoubleBinding.invalidate(DoubleBinding.java:222) at com.sun.javafx.binding.BindingHelperObserver.invalidated(BindingHelperObserver.java:51) at com.sun.javafx.binding.ExpressionHelper$SingleInvalidation.fireValueChangedEvent(ExpressionHelper.java:137) at com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81) at javafx.scene.Node$LazyBoundsProperty.invalidate(Node.java:9318) at javafx.scene.Node.impl_layoutBoundsChanged(Node.java:3403) at javafx.scene.Node.impl_notifyLayoutBoundsChanged(Node.java:3816) at javafx.scene.Node.impl_geomChanged(Node.java:3767) at javafx.scene.Parent.childBoundsChanged(Parent.java:1757) at javafx.scene.Node.notifyParentOfBoundsChange(Node.java:3838) at javafx.scene.Node.transformedBoundsChanged(Node.java:3800) at javafx.scene.Node.localBoundsChanged(Node.java:3782) at javafx.scene.Node.impl_geomChanged(Node.java:3768) at javafx.scene.Parent$1.onChanged(Parent.java:343) at com.sun.javafx.collections.TrackableObservableList.lambda$new$19(TrackableObservableList.java:45) at com.sun.javafx.collections.ListListenerHelper$Generic.fireValueChangedEvent(ListListenerHelper.java:329) at com.sun.javafx.collections.ListListenerHelper.fireValueChangedEvent(ListListenerHelper.java:73) at javafx.collections.ObservableListBase.fireChange(ObservableListBase.java:233) at javafx.collections.ListChangeBuilder.commit(ListChangeBuilder.java:482) at javafx.collections.ListChangeBuilder.endChange(ListChangeBuilder.java:541) at javafx.collections.ObservableListBase.endChange(ObservableListBase.java:205) at javafx.collections.ModifiableObservableListBase.remove(ModifiableObservableListBase.java:183) at com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:332) at com.sun.javafx.collections.VetoableListDecorator.remove(VetoableListDecorator.java:221) at App.start(App.java:33) at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$162(LauncherImpl.java:863) at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$175(PlatformImpl.java:326) at com.sun.javafx.application.PlatformImpl.lambda$null$173(PlatformImpl.java:295) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.application.PlatformImpl.lambda$runLater$174(PlatformImpl.java:294) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method) at com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139) at java.lang.Thread.run(Thread.java:745) REPRODUCIBILITY : This bug can be reproduced always. ---------- BEGIN SOURCE ---------- import javafx.application.Application; import javafx.application.Platform; import javafx.beans.binding.DoubleBinding; import javafx.scene.Group; import javafx.scene.layout.HBox; import javafx.scene.layout.VBox; import javafx.scene.shape.Line; import javafx.scene.text.Text; import javafx.stage.Stage; public class App extends Application { public static void main(String args[]) { launch(); } public void start(Stage primaryStage){ Text t = new Text("x"); HBox h = new HBox(t); Group g = new Group(h); Line l = new Line(); DoubleBinding innerWidth = javafx.beans.binding.Bindings.createDoubleBinding( () -> g.layoutBoundsProperty().get().getWidth(), g.layoutBoundsProperty()); l.endXProperty().bind(innerWidth); VBox v = new VBox(l, g); v.boundsInLocalProperty().addListener((a,b,c) -> {}); Group g2 = new Group(v); g2.layoutBoundsProperty().addListener((a,b,c) -> {}); h.getChildren().remove(t); Platform.exit(); } } ---------- END SOURCE ----------
    via by Webbug Group,
  • GitHub comment 952#165969743
    via GitHub by dariusf
    ,
    • java.lang.ArrayIndexOutOfBoundsException: -1 at java.util.ArrayList.elementData(ArrayList.java:418) at java.util.ArrayList.get(ArrayList.java:431) at com.sun.javafx.collections.ObservableListWrapper.get(ObservableListWrapper.java:89) at com.sun.javafx.collections.VetoableListDecorator.get(VetoableListDecorator.java:306) at javafx.scene.Parent.updateCachedBounds(Parent.java:1591) at javafx.scene.Parent.recomputeBounds(Parent.java:1535) at javafx.scene.Parent.impl_computeGeomBounds(Parent.java:1388) at javafx.scene.layout.Region.impl_computeGeomBounds(Region.java:3078) at javafx.scene.Node.updateGeomBounds(Node.java:3577) at javafx.scene.Node.getGeomBounds(Node.java:3530) at javafx.scene.Node.getLocalBounds(Node.java:3478) at javafx.scene.Node.updateTxBounds(Node.java:3641) at javafx.scene.Node.getTransformedBounds(Node.java:3424) at javafx.scene.Node.updateBounds(Node.java:559) at javafx.scene.Parent.updateBounds(Parent.java:1719) at javafx.scene.Parent.updateBounds(Parent.java:1717) at javafx.scene.Parent.updateBounds(Parent.java:1717) at javafx.scene.Parent.updateBounds(Parent.java:1717) at javafx.scene.Parent.updateBounds(Parent.java:1717) at javafx.scene.Parent.updateBounds(Parent.java:1717) at javafx.scene.Parent.updateBounds(Parent.java:1717) at javafx.scene.Scene$ScenePulseListener.pulse(Scene.java:2404) at com.sun.javafx.tk.Toolkit.lambda$runPulse$30(Toolkit.java:355) at java.security.AccessController.doPrivileged(Native Method) at com.sun.javafx.tk.Toolkit.runPulse(Toolkit.java:354) at com.sun.javafx.tk.Toolkit.firePulse(Toolkit.java:381) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:510) at com.sun.javafx.tk.quantum.QuantumToolkit.pulse(QuantumToolkit.java:490) at com.sun.javafx.tk.quantum.QuantumToolkit.lambda$runToolkit$404(QuantumToolkit.java:319) at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95) at com.sun.glass.ui.win.WinApplication._runLoop(Native Method) at com.sun.glass.ui.win.WinApplication.lambda$null$148(WinApplication.java:191) at java.lang.Thread.run(Thread.java:745)

    Users with the same issue

    Unknown visitor1 times, last one,
    Unknown visitor2 times, last one,
    Hronom
    12 times, last one,
    Unknown visitor1 times, last one,
    Unknown visitor1 times, last one,
    36 more bugmates