Stack overflow with certain XML files in XMLEditor demo
Hello,
i am working on XML editor with syntax highlighting using RichTextFX. Everything was running smoothly until I started using large XML files. Then my applicatioon and even XML Editor demo started crashing on StackOverFlow exception:
Executing xxx.jar using platform C:\Program Files\Java\jdk1.8.0_51\jre/bin/java
Exception in thread "JavaFX Application Thread" java.lang.StackOverflowError
at org.reactfx.util.ListsHelper$ConcatListView.size(Lists.java:250)
at java.util.Collections$UnmodifiableCollection.size(Collections.java:1030)
at org.reactfx.util.ListsHelper$ConcatListView.size(Lists.java:250)
at java.util.Collections$UnmodifiableCollection.size(Collections.java:1030)
at org.reactfx.util.ListsHelper$ConcatListView.size(Lists.java:250)
at java.util.Collections$UnmodifiableCollection.size(Collections.java:1030)
at org.reactfx.util.ListsHelper$ConcatListView.size(Lists.java:250)
at java.util.Collections$UnmodifiableCollection.size(Collections.java:1030)
at org.reactfx.util.ListsHelper$ConcatListView.size(Lists.java:250)
at java.util.Collections$UnmodifiableCollection.size(Collections.java:1030)
at org.reactfx.util.ListsHelper$ConcatListView.size(Lists.java:250)
at java.util.Collections$UnmodifiableCollection.size(Collections.java:1030)
at org.reactfx.util.ListsHelper$ConcatListView.size(Lists.java:250)
at java.util.Collections$UnmodifiableCollection.size(Collections.java:1030)
(etc...)
What is weird: program is working for 15 MB of XML data and it crashes for 2 MB of XML data. I did not spotted any bigger differences in file's structure.
It is working for this data: http://dawon.cz/test1.xml and not working for this: http://dawon.cz/test2.xml
Can you please look into this issue?
Thank you very much
Jakub
I suspect this is related to the regex expressions for parsing. I can run it through the debugger later on after work to try and find the fault.
Well when I debugged it, it seemed to crash after all regexps were done. But I can be wrong...
Can you get a StackTrace that includes some instruction before the loop?
Unfortunately no. It continues this way all the way down.
This looks like a bug in ReactFX that I resolved months ago, but somehow I never made a release with that fix. I will fix it soon.
Cool.
Well I am using RichTextFX "fat" jar, so it is possible, that the new release is not in that jar...
I never even released ReactFX with that fix, so it can't possibly be fixed in RichTextFX.
On Tue, Aug 18, 2015 at 11:47 AM, Jakub Žáček [email protected] wrote:
Well I am using RichTextFX "fat" jar, so it is possible, that the new release is not in that jar...
— Reply to this email directly or view it on GitHub https://github.com/TomasMikula/RichTextFX/issues/167#issuecomment-132255494 .
Please try the new version 0.6.6 and confirm that it is resolved. Thanks.
It works well now, thank you very much for such a fast resolution and keep up the good work!