StackOverflowError Caused by Long URI
Closed this issue · 5 comments
I can reproduce the stackoverflow locally, however the stackoverflow doesn't happen on travis (the URI is parsed and the test fails for another reason):
https://travis-ci.org/NET-A-PORTER/scala-uri/jobs/27286327#L316
I'll investigate further.
It looks like it passed on travis because it is using a large 6 MB
stack size. Locally, increasing the stack size from 1024k
to 1300k
using the -Xss1300k
JVM argument is enough of a workaround for the URI in question.
I'll look into a proper fix.
This should be fixed now as of c9168f9
Since this required a fairly large change to the parser, I would like to keep it at a SNAPSHOT version for a little while. Could you try out version 0.4.3-SNAPSHOT
.
The parboiled2 guys have raised a bug against the Scala complier as a result of this, so thanks again for raising this issue.
@NJordan72 Update: The workaround I committed as part of this ticket caused more problems than it solved. For 0.4.3+
I have reverted this change. Unfortunately, this does mean StackOverflowErrors
for long URIs in Scala 2.10, however the good news is that SI-8657 has now been fixed in Scala 2.11.2+
. So, if you need to deal with large URIs, you will currently need to use Scala 2.11.2+
. There is a unit test to ensure this here