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

Undo in Stride editor can cause exception

    Details

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

      Description

      Create a stride class "SomeClass". In the constructor, create a variable ('v'), type "int", name "t", value "345". Press enter to complete the declaration. Now hit undo (ctrl+Z) 4 times - once for the value, name, type, and the declaration itself. The following exception is recorded in the debug log:

      parentCanvas shouldn't be null; call stack:
        bluej.stride.framedjava.frames.VarFrame.isField(VarFrame.java:356)
        bluej.stride.framedjava.frames.VarFrame.getStaticFinalOperations(VarFrame.java:451)
        bluej.stride.framedjava.frames.VarFrame.getAvailableExtensions(VarFrame.java:440)
        bluej.stride.generic.FrameContentRow.getExtensions(FrameContentRow.java:440)
        bluej.stride.framedjava.slots.StructuredSlot.getExtensions(StructuredSlot.java:1477)
        bluej.stride.framedjava.slots.InfixStructured.lambda$makeNewField$8(InfixStructured.java:498)
        bluej.editor.stride.FrameEditorTab.lambda$setupFocusableSlotComponent$96(FrameEditorTab.java:2371)
        bluej.utility.javafx.JavaFXUtil.lambda$addFocusListener$6(JavaFXUtil.java:573)
        com.sun.javafx.binding.ExpressionHelper$Generic.fireValueChangedEvent(ExpressionHelper.java:361)
        com.sun.javafx.binding.ExpressionHelper.fireValueChangedEvent(ExpressionHelper.java:81)
        javafx.beans.property.ReadOnlyBooleanPropertyBase.fireValueChangedEvent(ReadOnlyBooleanPropertyBase.java:72)
        javafx.scene.Node$FocusedProperty.notifyListeners(Node.java:7720)
        javafx.scene.Scene$13.invalidated(Scene.java:2077)
        javafx.beans.property.ObjectPropertyBase.markInvalid(ObjectPropertyBase.java:111)
        javafx.beans.property.ObjectPropertyBase.set(ObjectPropertyBase.java:146)
        javafx.scene.Scene$KeyHandler.setFocusOwner(Scene.java:3924)
        javafx.scene.Scene$KeyHandler.requestFocus(Scene.java:3971)
        javafx.scene.Scene$KeyHandler.access$1900(Scene.java:3910)
        javafx.scene.Scene.requestFocus(Scene.java:2044)
        javafx.scene.Node.requestFocus(Node.java:7881)
        bluej.stride.generic.FrameCursor.requestFocus(FrameCursor.java:774)
        bluej.stride.generic.FrameCursor.recallFocus(FrameCursor.java:886)
        bluej.stride.generic.FrameState.recallFocus(FrameState.java:111)
        bluej.editor.stride.FrameEditorTab.updateClassContents(FrameEditorTab.java:1899)
        bluej.editor.stride.FrameEditorTab.undo(FrameEditorTab.java:1873)
        bluej.editor.stride.FrameEditorTab.lambda$initialiseFX$13(FrameEditorTab.java:711)
        com.sun.javafx.event.CompositeEventHandler$NormalEventFilterRecord.handleCapturingEvent(CompositeEventHandler.java:282)
        com.sun.javafx.event.CompositeEventHandler.dispatchCapturingEvent(CompositeEventHandler.java:98)
        com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:223)
        com.sun.javafx.event.EventHandlerManager.dispatchCapturingEvent(EventHandlerManager.java:180)
        com.sun.javafx.event.CompositeEventDispatcher.dispatchCapturingEvent(CompositeEventDispatcher.java:43)
        com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:52)
        com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
        com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
        com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
        com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:54)
        javafx.event.Event.fireEvent(Event.java:198)
        javafx.scene.Scene$KeyHandler.process(Scene.java:3964)
        javafx.scene.Scene$KeyHandler.access$1800(Scene.java:3910)
        javafx.scene.Scene.impl_processKeyEvent(Scene.java:2040)
        javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2501)
        com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:217)
        com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:149)
        java.security.AccessController.doPrivileged(Native Method)
        com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$353(GlassViewEventHandler.java:248)
        com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:389)
        com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:247)
        com.sun.glass.ui.View.handleKeyEvent(View.java:546)
        com.sun.glass.ui.View.notifyKey(View.java:966)
        com.sun.glass.ui.gtk.GtkApplication._runLoop(Native Method)
        com.sun.glass.ui.gtk.GtkApplication.lambda$null$49(GtkApplication.java:139)
        java.lang.Thread.run(Thread.java:748)
      

      Seen on Linux.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                amjad Amjad Altadmri
                Reporter:
                davmac Davin McCall
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: