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

Reach crashes on input of large nxml files with a stack overflow #792

Open
kwalcock opened this issue Mar 16, 2023 · 0 comments
Open

Reach crashes on input of large nxml files with a stack overflow #792

kwalcock opened this issue Mar 16, 2023 · 0 comments

Comments

@kwalcock
Copy link
Member

I believe that it comes down to a sequence of intervals being unioned using a reduceRight, which is not tail recursive. Changing to reduceLeft seems to fix the problem. Unfortunately, multiple dependencies are involved.

The problem can last be detected in this project at

val nxmlDoc: NxmlDocument = nxmlReader.read(nxml)

which leads to the nxmlreader project

https://github.com/lum-ai/nxmlreader/blob/ef7e1440faf5dcae54cc046ba26825b08f1c84e1/src/main/scala/ai/lum/nxmlreader/standoff/Tree.scala#L57

and then to common

https://github.com/lum-ai/common/blob/b7c0b70c460790088d655a98be178cbef9767a24/src/main/scala/ai/lum/common/Interval.scala#L399

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

1 participant