Basex stops with error: 'Index -1 out of bounds for length 32'.
Friday, 3 January 2025 · 2 messages
RS
Rob Stapper3 Jan 2025 10:16 #
Hi Christian,
First of all best wishes for the next year, may it be an interesting one. Having said that, I encountered this 'interesting' issue. I vagely think to remember something lijke this is adressed before but I'm not sure.
I hereby send you a self containing application: 'nastyIssueTest2.xq', that triggers the error. I've made the code as small as possible, but since the occurrence of the error very much depends on the context, some context code is necessary. ( I don't think the context code triggers the error but more suppresses it, adding a trace somewhere could make the error just disappear)
I suspect that the first function in the app: 'local:for-each-component#4', is the culprit, but I can't really tell. I've also added a workaround in the app: 'local:for-each-component2#2', which seems a stable solution.
The issue looks like something like 'https://github.com/BaseXdb/basex/issues/909' of march 2014.
Btw. I used version 11.3. Updating to version 11.6 triggers a different error when code of function: 'local:folderDialog.new#2', is activated. When deactivated it triggers the above mentioned error.
I hope this helps.
mvgr.
Rob Stapper
CG
Christian Grün3 Jan 2025 15:25 #
Hi Rob,
Thanks for the observation.
Quoted text · Rob Stapper · 3 lines
I've made the code as small as possible, but since the occurrence of the > error very much depends on the context, some context code is necessary. >
Yes, it often takes some time to further reduce code without losing the bug. This is my result so far [1]; let’s see what we can find out.
Best,
Christian
[1] https://github.com/BaseXdb/basex/issues/2359
Written for BaseX 11.6. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery