1

I get some internal error in the JDK (see below). Since there is no line from my own code referenced here, I want to check in the original code what is going on.

On my PC I have JDK1.8.0_121 installed. I could only find the version openjfx-78-backport 1.8.0-ea-b96.1 on grepcode.com which seem to differ at the relevant lines.

Question: (Where) is the source code of JDK1.8.0_121 publically available?

Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException
    at com.sun.javafx.scene.control.ReadOnlyUnbackedObservableList.subList(ReadOnlyUnbackedObservableList.java:136)
    at javafx.collections.ListChangeListener$Change.getAddedSubList(ListChangeListener.java:242)
    at javafx.scene.control.TreeTableView$TreeTableViewArrayListSelectionModel.handleSelectedCellsListChangeEvent(TreeTableView.java:3244)
    at javafx.scene.control.TreeTableView$TreeTableViewArrayListSelectionModel.clearAndSelect(TreeTableView.java:2690)
    at com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.simpleSelect(TableCellBehaviorBase.java:215)
    at com.sun.javafx.scene.control.behavior.TableCellBehaviorBase.doSelect(TableCellBehaviorBase.java:148)
    at com.sun.javafx.scene.control.behavior.CellBehaviorBase.mousePressed(CellBehaviorBase.java:150)
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:95)
    at com.sun.javafx.scene.control.skin.BehaviorSkinBase$1.handle(BehaviorSkinBase.java:89)
    at com.sun.javafx.event.CompositeEventHandler$NormalEventHandlerRecord.handleBubblingEvent(CompositeEventHandler.java:218)
    at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:80)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
    at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
    at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
    at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
    at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
    at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
    at javafx.event.Event.fireEvent(Event.java:198)
    at javafx.scene.Scene$MouseHandler.process(Scene.java:3757)
    at javafx.scene.Scene$MouseHandler.access$1500(Scene.java:3485)
    at javafx.scene.Scene.impl_processMouseEvent(Scene.java:1762)
    at javafx.scene.Scene$ScenePeerListener.mouseEvent(Scene.java:2494)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:381)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler$MouseEventNotification.run(GlassViewEventHandler.java:295)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleMouseEvent$354(GlassViewEventHandler.java:417)
    at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
    at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleMouseEvent(GlassViewEventHandler.java:416)
    at com.sun.glass.ui.View.handleMouseEvent(View.java:555)
    at com.sun.glass.ui.View.notifyMouse(View.java:937)
    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(Unknown Source)
BerndGit
  • 1,530
  • 3
  • 18
  • 47
  • 2
    Its distributed with the JDK - look in the JDK folder src.zip – 6ton Jan 19 '17 at 21:39
  • Thank you for your assesment Jacek Cz. - I'm not stating that there needs to be a bug in JRE. The mistake might be on my side too. Anyhow for finding it it might be helpfull to understand which list causes this error. The routines `ListChangeListener$Change.getAddedSubList` are not implemented or called by myself. But I want to understand which data they are handling. This might give me a hint which variable is initilized wrongly. – BerndGit Jan 19 '17 at 21:39
  • @6ton: Found it. Thanks! – BerndGit Jan 19 '17 at 21:47
  • Is your code multi-threaded? Are you modifying elements of the active scene graph off of the JavaFX application thread? If so, that can sometimes cause issues such as your stack trace (due to race conditions). – jewelsea Jan 19 '17 at 22:19
  • @jewelsea: I don't start threads on my own. Error occures, when changing selection in TreeTableView. Deactivating of some listener from myself helps, but I don't understand why this listener is critical. Problem has similarities to: https://stackoverflow.com/questions/27830075/javafx-exception-when-clicking-treetablecell-after-repopulating-treetableview/28716773 Anyhow I want to dig deeper to understand whats going on. – BerndGit Jan 20 '17 at 08:09
  • @Duplicate: Yes is is an duplicate. Seems that i used the wrong search words, when I was trying to find the answer on SO. – BerndGit Jan 20 '17 at 08:11
  • @jewelsa: Problem found: I was triggering an updating the datamodel `TreeItem.children` by a selection listener. This brought confusion into the SelectionModel. Could be fixed, thanks for your help. – BerndGit Jan 20 '17 at 12:26

1 Answers1

0

With the help of 6ton, i found it at C:\Program Files\Java\jdk1.8.0_121\javafx-src.zip\

BerndGit
  • 1,530
  • 3
  • 18
  • 47