Curious "Stack Overflow: Try tail recursion?" error message

Thursday, 12 November 2015 · 3 messages · last reply 20 Nov 2015
AB
Andy Bunce12 Nov 2015 22:13 #
Hi, Using a fresh install on 8.3.1 and running basexgui.bat on windows. I install this expath package https://github.com/expkg-zone58/ex-xparse/releases/download/v0.0.5/ex-xparse-0.0.5.xar Then, paste the following code into an editor window.. ------------------------ import module namespace xp="http://expath.org/ns/xparse"; "http://www.xqueryfunctions.com/xq/functx-1.0-doc-2007-01.xq" !unparsed-text(.) !xp:parse(.,map{"lang":"xquery"}) ----------------------- The result is the error... Stack Overflow: Try tail recursion? The curious part is.. if I keep retrying by clicking the execute button - after around 10 tries it starts working and seems to continue to work every time after that within that GUI instance. I have reproduced this on another pc. /Andy
CG
Christian Grün20 Nov 2015 13:38 #
Hi Andy, Sorry for the late reply. I can reproduce the behavior you have been describing, and I agree it’s quite surprising. I have no idea what’s the reason for that; my assumption is that the Java stack size is increased after a while (?). As you may know, the stack size can be increased via an JVM option in the BaseX script. With -Xss2m, your query will be successfully executed with the first run. Hope this helps, Christian
Quoted text · Andy Bunce · 28 lines
On Thu, Nov 12, 2015 at 10:13 PM, Andy Bunce <bunce.andy at gmail.com> wrote: > Hi, > > Using a fresh install on 8.3.1 and running basexgui.bat on windows. > I install this expath package > > https://github.com/expkg-zone58/ex-xparse/releases/download/v0.0.5/ex-xparse-0.0.5.xar > > Then, paste the following code into an editor window.. > ------------------------ > import module namespace xp="http://expath.org/ns/xparse"; > > "http://www.xqueryfunctions.com/xq/functx-1.0-doc-2007-01.xq" > !unparsed-text(.) > !xp:parse(.,map{"lang":"xquery"}) > ----------------------- > The result is the error... > Stack Overflow: Try tail recursion? > > The curious part is.. > if I keep retrying by clicking the execute button - after around 10 tries > it starts working and seems to continue to work every time after that within > that GUI instance. > I have reproduced this on another pc. > > /Andy > >
AB
Andy Bunce20 Nov 2015 23:39 #
Thanks for the reply. I had not thought that this is really just the Java stack. After reviewing the code I noticed the XQuery parser was created some time ago. The new version runs with the default stack for me [1] /Andy [1] https://github.com/expkg-zone58/ex-xparse/releases/tag/v0.2.1
Quoted text · Christian Grün · 49 lines
On 20 November 2015 at 12:38, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Andy, > > Sorry for the late reply. I can reproduce the behavior you have been > describing, and I agree it’s quite surprising. I have no idea what’s > the reason for that; my assumption is that the Java stack size is > increased after a while (?). > > As you may know, the stack size can be increased via an JVM option in > the BaseX script. With -Xss2m, your query will be successfully > executed with the first run. > > Hope this helps, > Christian > > > On Thu, Nov 12, 2015 at 10:13 PM, Andy Bunce <bunce.andy at gmail.com> wrote: > > Hi, > > > > Using a fresh install on 8.3.1 and running basexgui.bat on windows. > > I install this expath package > > > > > https://github.com/expkg-zone58/ex-xparse/releases/download/v0.0.5/ex-xparse-0.0.5.xar > > > > Then, paste the following code into an editor window.. > > ------------------------ > > import module namespace xp="http://expath.org/ns/xparse"; > > > > "http://www.xqueryfunctions.com/xq/functx-1.0-doc-2007-01.xq" > > !unparsed-text(.) > > !xp:parse(.,map{"lang":"xquery"}) > > ----------------------- > > The result is the error... > > Stack Overflow: Try tail recursion? > > > > The curious part is.. > > if I keep retrying by clicking the execute button - after around 10 > tries > > it starts working and seems to continue to work every time after that > within > > that GUI instance. > > I have reproduced this on another pc. > > > > /Andy > > > > >

⚡Generated with XQuery