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

StackOverflowError in JavaKeywords demo #178

Closed
Zomis opened this issue Sep 10, 2015 · 2 comments
Closed

StackOverflowError in JavaKeywords demo #178

Zomis opened this issue Sep 10, 2015 · 2 comments

Comments

@Zomis
Copy link

Zomis commented Sep 10, 2015

I tried to add Syntax Highlighting by looking at this example: https://github.com/TomasMikula/RichTextFX/blob/master/richtextfx-demos/src/main/java/org/fxmisc/richtext/demo/JavaKeywords.java

but I ran into a StackOverflowError whenever I started the application or edited the text. I thought that I must be doing something wrong so I tried to use your JavaKeywords.java exactly, but that also throws StackOverflowError on startup.

The Stack Overflow loop is:

at net.zomis.example.JavaKeywords.lambda$start$0(JavaKeywords.java:85)
at net.zomis.example.JavaKeywords$$Lambda$105/1357313881.accept(Unknown Source)
at org.reactfx.util.QueuingStreamNotifications.lambda$head$274(NotificationAccumulator.java:217)
at org.reactfx.util.QueuingStreamNotifications$$Lambda$141/1670854427.run(Unknown Source)
at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68)
at org.reactfx.SuspendableBase.resume(SuspendableBase.java:64)
at org.reactfx.SuspendableBase$$Lambda$117/995084862.close(Unknown Source)
at org.reactfx.CloseableOnceGuard.close(Guard.java:49)
at org.reactfx.MultiGuard.close(Guard.java:83)
at org.fxmisc.richtext.StyledTextArea.setStyleSpans(StyledTextArea.java:660)
at net.zomis.example.JavaKeywords.lambda$start$0(JavaKeywords.java:85)
at net.zomis.example.JavaKeywords$$Lambda$105/1357313881.accept(Unknown Source)
at org.reactfx.util.QueuingStreamNotifications.lambda$head$274(NotificationAccumulator.java:217)
at org.reactfx.util.QueuingStreamNotifications$$Lambda$141/1670854427.run(Unknown Source)
at org.reactfx.ObservableBase.notifyObservers(ObservableBase.java:68)
at org.reactfx.SuspendableBase.resume(SuspendableBase.java:64)
at org.reactfx.SuspendableBase$$Lambda$117/995084862.close(Unknown Source)
at org.reactfx.CloseableOnceGuard.close(Guard.java:49)
at org.reactfx.MultiGuard.close(Guard.java:83)
at org.fxmisc.richtext.StyledTextArea.setStyleSpans(StyledTextArea.java:660)

java version "1.8.0_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b18)
Java HotSpot(TM) 64-Bit Server VM (build 25.25-b02, mixed mode)

Downloading and running java -cp richtextfx-demos-fat-0.6.8.jar org.fxmisc.richtext.demo.JavaKeywords does work fine. Same with cloning repo and running gradle JavaKeywords, which makes me feel like there is something that I'm doing incorrectly, but what? Why the Stack Overflow Error?

@TomasMikula
Copy link
Member

Hi Simon,

do you mind sharing your code? Otherwise I can't tell whether you are doing something wrong or there is a bug.

Note that the JavaKeywords demo changed slightly in 0.6.8, and the way it does syntax highlighting would not work in previous versions (you would get a stack overflow that looks like the one you posted and was mentioned here). So please make sure you use 0.6.8 for your development as well.

@Zomis
Copy link
Author

Zomis commented Sep 10, 2015

Apparently I wasn't using 0.6.8. That solved it, thanks.

@Zomis Zomis closed this as completed Sep 10, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants