Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

null pointer exception undoing and redoing in node editor with shift-space #57

Closed
lexaay opened this issue Nov 23, 2015 · 3 comments
Closed
Milestone

Comments

@lexaay
Copy link
Member

lexaay commented Nov 23, 2015

Originally reported by: Alex Mitchell (Bitbucket: lexaay, GitHub: lexaay)


  1. create a new story
  2. create a new node
  3. edit the node
  4. enter text "testtest"
  5. add fragment to the first "test"
  6. add fragment to the second "test"
  7. put selection point between the two fragments
  8. type shift-space, space, space
  9. undo, redo

Exception in thread "JavaFX Application Thread" java.lang.IllegalArgumentException: Unexpected change received.
Expected:
org.fxmisc.richtext.RichTextChange@2ee3d643
Received:
org.fxmisc.richtext.RichTextChange@792caa8c
at org.fxmisc.undo.impl.UndoManagerImpl.changeObserved(UndoManagerImpl.java:185)
at org.fxmisc.undo.impl.UndoManagerImpl$$Lambda$55/2073383433.accept(Unknown Source)
at org.reactfx.util.QueuingStreamNotifications.lambda$head$274(NotificationAccumulator.java:217)
at org.reactfx.util.QueuingStreamNotifications$$Lambda$768/1217928667.run(Unknown Source)
at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68)
at org.reactfx.SuspendableBase.resume(SuspendableBase.java:64)
at org.reactfx.SuspendableBase$$Lambda$342/300167554.close(Unknown Source)
at org.reactfx.CloseableOnceGuard.close(Guard.java:49)
at org.reactfx.MultiGuard.close(Guard.java:83)
at org.fxmisc.richtext.StyledTextArea.replace(StyledTextArea.java:731)
at org.fxmisc.richtext.StyledTextArea.lambda$createRichUndoManager$11(StyledTextArea.java:793)
at org.fxmisc.richtext.StyledTextArea$$Lambda$311/41505765.accept(Unknown Source)
at org.fxmisc.undo.impl.UndoManagerImpl.lambda$performChange$5(UndoManagerImpl.java:176)
at org.fxmisc.undo.impl.UndoManagerImpl$$Lambda$785/1093006244.run(Unknown Source)
at org.reactfx.Suspendable.suspendWhile(Suspendable.java:47)
at org.fxmisc.undo.impl.UndoManagerImpl.performChange(UndoManagerImpl.java:176)
at org.fxmisc.undo.impl.UndoManagerImpl.redo(UndoManagerImpl.java:108)
at org.fxmisc.richtext.UndoActions.redo(UndoActions.java:23)
at org.fxmisc.richtext.skin.StyledTextAreaBehavior.lambda$static$69(StyledTextAreaBehavior.java:73)
at org.fxmisc.richtext.skin.StyledTextAreaBehavior$$Lambda$593/422258802.accept(Unknown Source)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$On.lambda$null$23(EventHandlerTemplate.java:156)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$On$$Lambda$766/1636741105.accept(Unknown Source)
at java.util.Optional.ifPresent(Optional.java:159)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$On.lambda$act$24(EventHandlerTemplate.java:155)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$On$$Lambda$579/2065100728.accept(Unknown Source)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$Builder.lambda$create$21(EventHandlerTemplate.java:117)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$Builder$$Lambda$594/1718700210.accept(Unknown Source)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate.lambda$null$17(EventHandlerTemplate.java:39)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$$Lambda$648/387867067.accept(Unknown Source)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate.lambda$null$15(EventHandlerTemplate.java:26)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$$Lambda$649/770585103.accept(Unknown Source)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate.lambda$null$19(EventHandlerTemplate.java:49)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$$Lambda$650/1762658273.accept(Unknown Source)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate.lambda$null$15(EventHandlerTemplate.java:26)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$$Lambda$649/770585103.accept(Unknown Source)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate.lambda$null$15(EventHandlerTemplate.java:26)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$$Lambda$649/770585103.accept(Unknown Source)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate.lambda$null$15(EventHandlerTemplate.java:26)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$$Lambda$649/770585103.accept(Unknown Source)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate.lambda$bind$14(EventHandlerTemplate.java:18)
at org.fxmisc.wellbehaved.event.EventHandlerTemplate$$Lambda$651/661194729.handle(Unknown Source)
at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
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.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$KeyHandler.process(Scene.java:3965)
at javafx.scene.Scene$KeyHandler.access$1800(Scene.java:3911)
at javafx.scene.Scene.impl_processKeyEvent(Scene.java:2040)
at javafx.scene.Scene$ScenePeerListener.keyEvent(Scene.java:2502)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:197)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$KeyEventNotification.run(GlassViewEventHandler.java:147)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.lambda$handleKeyEvent$349(GlassViewEventHandler.java:228)
at com.sun.javafx.tk.quantum.GlassViewEventHandler$$Lambda$764/621943615.get(Unknown Source)
at com.sun.javafx.tk.quantum.QuantumToolkit.runWithoutRenderLock(QuantumToolkit.java:404)
at com.sun.javafx.tk.quantum.GlassViewEventHandler.handleKeyEvent(GlassViewEventHandler.java:227)
at com.sun.glass.ui.View.handleKeyEvent(View.java:546)
at com.sun.glass.ui.View.notifyKey(View.java:956)


@lexaay
Copy link
Member Author

lexaay commented Dec 5, 2015

Original comment by Benedict Lee (Bitbucket: benedictleejh, GitHub: benedictleejh):


Bug in dependency, see FXMisc/RichTextFX#216

@lexaay
Copy link
Member Author

lexaay commented Dec 29, 2015

Original comment by Alex Mitchell (Bitbucket: lexaay, GitHub: lexaay):


Leave open, but I assume we have to wait until the bug is fixed in the dependency, unless there's a workaround.

@lexaay lexaay added this to the 0.1 milestone Mar 3, 2016
@lexaay lexaay modified the milestones: 0.23, 0.22 May 3, 2016
@lexaay lexaay modified the milestones: 0.24, 0.23 Jan 16, 2017
@benedictleejh
Copy link
Contributor

This won't be an easy fix; we'll need to upgrade the dependency, but a look at the latest milestone version of RichTextFX (0.7-M3) suggests a lot has changed from the previous stable (0.6.10). Attempting to just upgrade results in 48 errors while compiling, and at least 1 deprecation.

Furthermore, the documentation for the latest milestone version is sparse, to say the least, which makes upgrading more painful than it should be. And the docs aren't likely to improve until the next stable version is out.

@lexaay lexaay modified the milestones: 0.25, 0.24, 0.26 Jan 20, 2017
@lexaay lexaay modified the milestones: 0.27, 0.26 Feb 19, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants