Uploaded image for project: 'BlueJ'
  1. BlueJ
  2. BLUEJ-972

Out of bounds exceptions in the Java editor

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Done
    • Affects Version/s: None
    • Fix Version/s: 4.1.0
    • Component/s: Java editor
    • Sprint:
      4.1.0

      Description

      Not 100% sure if the first one causes the second. Two stack traces:

      • Exception #1:
        Caused by: java.lang.RuntimeException: java.lang.IndexOutOfBoundsException: Position 1251 is out of bounds
        at bluej.compiler.EventqueueCompileObserverAdapter.runOnEventQueue(EventqueueCompileObserverAdapter.java:74)
        at bluej.compiler.EventqueueCompileObserverAdapter.compilerMessage(EventqueueCompileObserverAdapter.java:87)
        at bluej.compiler.CompilerAPICompiler$1.report(CompilerAPICompiler.java:180)
        at com.sun.tools.javac.api.ClientCodeWrapper$WrappedDiagnosticListener.report(ClientCodeWrapper.java:593)
        Caused by: java.lang.IndexOutOfBoundsException: Position 1251 is out of bounds
        at org.reactfx.util.FingerTree$NonEmptyFingerTree.locate(FingerTree.java:42)
        at org.fxmisc.richtext.model.ReadOnlyStyledDocument.split(ReadOnlyStyledDocument.java:211)
        at org.fxmisc.richtext.model.ReadOnlyStyledDocument.subSequence(ReadOnlyStyledDocument.java:248)
        at org.fxmisc.richtext.model.GenericEditableStyledDocumentBase.subSequence(GenericEditableStyledDocumentBase.java:189)
        at org.fxmisc.richtext.model.SimpleEditableStyledDocument.subSequence(SimpleEditableStyledDocument.java:7)
        at org.fxmisc.richtext.model.StyledDocument.getText(StyledDocument.java:28)
        at bluej.editor.moe.MoeSyntaxDocument.getText(MoeSyntaxDocument.java:798)
        at bluej.editor.moe.MoeEditor.getPosFromColumn(MoeEditor.java:839)
        at bluej.editor.moe.MoeEditor.displayDiagnostic(MoeEditor.java:769)
        at bluej.pkgmgr.Package.showEditorDiagnostic(Package.java:2262)
        at bluej.pkgmgr.Package.access$700(Package.java:118)
        at bluej.pkgmgr.Package$PackageCompileObserver.errorMessage(Package.java:2827)
        at bluej.pkgmgr.Package$PackageCompileObserver.compilerMessage(Package.java:2795)
        at bluej.collect.DataCollectionCompileObserverWrapper.compilerMessage(DataCollectionCompileObserverWrapper.java:73)
      • Exception #2:
        Exception in thread "JavaFX Application Thread" java.lang.IndexOutOfBoundsException: 1326 not in [0, 1321]
        at org.reactfx.util.Lists.checkPosition(Lists.java:110)
        at org.reactfx.util.Lists.checkPosition(Lists.java:105)
        at org.reactfx.util.FingerTree$NonEmptyFingerTree.locateProgressively(FingerTree.java:51)
        at org.fxmisc.richtext.model.ReadOnlyStyledDocument$Pos.offsetBy(ReadOnlyStyledDocument.java:378)
        at org.fxmisc.richtext.model.ReadOnlyStyledDocument.offsetToPosition(ReadOnlyStyledDocument.java:207)
        at org.fxmisc.richtext.model.GenericEditableStyledDocumentBase.offsetToPosition(GenericEditableStyledDocumentBase.java:119)
        at org.fxmisc.richtext.model.SimpleEditableStyledDocument.offsetToPosition(SimpleEditableStyledDocument.java:7)
        at org.fxmisc.richtext.GenericStyledArea.lambda$new$7(GenericStyledArea.java:664)
        at org.reactfx.value.Val$2.computeValue(Val.java:705)
        at org.reactfx.value.ValBase.getValue(ValBase.java:17)
        at org.reactfx.value.MappedVal.computeValue(MappedVal.java:22)
        at org.reactfx.value.ValBase.getValue(ValBase.java:17)
        at org.reactfx.value.SuspendableValWrapper.getValue(SuspendableValWrapper.java:23)
        at org.reactfx.value.Val.lambda$combine$7(Val.java:584)
        at org.reactfx.value.Val$2.computeValue(Val.java:705)
        at org.reactfx.value.ValBase.getValue(ValBase.java:17)
        at org.reactfx.value.ValBase.newObserver(ValBase.java:40)
        at org.reactfx.value.ValBase.newObserver(ValBase.java:8)
        at org.reactfx.ObservableBase.addObserver(ObservableBase.java:110)
        at org.reactfx.value.Val.addInvalidationObserver(Val.java:52)
        at org.reactfx.value.Val.addListener(Val.java:80)
        at org.reactfx.EventStreams$3.observeInputs(EventStreams.java:106)
        at org.reactfx.ObservableBase.addObserver(ObservableBase.java:108)
        at org.reactfx.ObservableBase.observe(ObservableBase.java:100)
        at org.reactfx.EventStream.subscribe(EventStream.java:53)
        at org.fxmisc.richtext.GenericStyledArea.createCell(GenericStyledArea.java:1375)
        at org.fxmisc.richtext.GenericStyledArea.lambda$new$13(GenericStyledArea.java:760)
        at org.fxmisc.flowless.CellPool.getCell(CellPool.java:20)
        at org.fxmisc.flowless.CellListManager.cellForItem(CellListManager.java:75)
        at org.reactfx.collection.MappedList.get(MappedList.java:27)
        at org.reactfx.collection.MemoizationListImpl.get(MemoizationList.java:99)
        at org.fxmisc.flowless.CellListManager.getCell(CellListManager.java:64)
        at org.fxmisc.flowless.CellPositioner.getSizedCell(CellPositioner.java:129)
        at org.fxmisc.flowless.CellPositioner.placeStartAt(CellPositioner.java:95)
        at org.fxmisc.flowless.Navigator.fillForwardFrom0(Navigator.java:235)
        at org.fxmisc.flowless.Navigator.fillForwardFrom0(Navigator.java:217)
        at org.fxmisc.flowless.Navigator.fillTowardsSkyFrom0(Navigator.java:323)
        at org.fxmisc.flowless.Navigator.fillViewportFrom(Navigator.java:284)
        at org.fxmisc.flowless.Navigator.visit(Navigator.java:112)
        at org.fxmisc.flowless.StartOffStart.accept(TargetPosition.java:49)
        at org.fxmisc.flowless.Navigator.layoutChildren(Navigator.java:67)
        at javafx.scene.Parent.layout(Parent.java:1087)
        at org.fxmisc.flowless.VirtualFlow.layoutChildren(VirtualFlow.java:165)
        at javafx.scene.Parent.layout(Parent.java:1087)
        at org.fxmisc.flowless.VirtualFlow.getCellIfVisible(VirtualFlow.java:128)
        at org.fxmisc.richtext.GenericStyledArea.getRangeBoundsOnScreen(GenericStyledArea.java:1484)
        at org.fxmisc.richtext.GenericStyledArea.getCharacterBoundsOnScreen(GenericStyledArea.java:1006)
        at bluej.editor.moe.BlueJSyntaxView.getLeftEdge(BlueJSyntaxView.java:712)
        at bluej.editor.moe.BlueJSyntaxView.reassessIndentsRemove(BlueJSyntaxView.java:1289)
        at bluej.editor.moe.BlueJSyntaxView.updateDamage(BlueJSyntaxView.java:1533)
        at bluej.editor.moe.MoeSyntaxDocument.fireChangedUpdate(MoeSyntaxDocument.java:393)
        at bluej.editor.moe.MoeSyntaxDocument.fireRemoveUpdate(MoeSyntaxDocument.java:753)
        at bluej.editor.moe.MoeSyntaxDocument.lambda$new$4(MoeSyntaxDocument.java:208)

        Attachments

          Activity

            People

            • Assignee:
              nccb Neil Brown
              Reporter:
              nccb Neil Brown
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: