Hi,
I got an "Improper use? Potential bug?” error (see below) with a (complex) query which actually works when applied to many files (but not to all). This is the query (temporary links):
https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/scripts/... https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/scripts/03.00_normalize_spelling.xq
applied to all files here:
https://git.informatik.uni-leipzig.de/celano/latinnlp/-/tree/master/texts/pa...
Essentially, I have some words associated to an XPath expression + offsets (see, for example, [1]), which (words) I can retrieve by using substring($xpath, $start, $long) applied to [2]. My goal is to try to identify the text nodes the words are children of, because I want to check whether they are contained in some specific elements.
Ciao, Giuseppe
[1] https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/pa... https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/parsed-texts/phi2331.phi005.perseus-lat2/phi2331.phi005.perseus-lat2.tok01.xml [2] https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/pa... https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/parsed-texts/phi2331.phi005.perseus-lat2/phi2331.phi005.perseus-lat2.xml ---
Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de mailto:basex-talk@mailman.uni-konstanz.de Version: BaseX 9.3.2 Java: Ubuntu, 11.0.9.1 OS: Linux, amd64 Stack Trace: java.lang.ArrayIndexOutOfBoundsException: Maximum array size reached. at org.basex.util.Array.newSize(Array.java:299) at org.basex.util.Array.newSize(Array.java:288) at org.basex.util.TokenBuilder.add(TokenBuilder.java:267) at org.basex.util.TokenBuilder.add(TokenBuilder.java:252) at org.basex.query.QueryInfo.toString(QueryInfo.java:142) at org.basex.query.QueryContext.info http://org.basex.query.querycontext.info/(QueryContext.java:474) at org.basex.query.QueryProcessor.info http://org.basex.query.queryprocessor.info/(QueryProcessor.java:272) at org.basex.core.cmd.AQuery.extError(AQuery.java:212) at org.basex.core.cmd.AQuery.query(AQuery.java:130) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.gui.GUI.exec(GUI.java:416) at org.basex.gui.GUI.lambda$execute$4(GUI.java:359) at java.base/java.lang.Thread.run(Thread.java:834)
Hi GIuseppe,
The error message indicates that the info that’s to be output in the Info View panel gets too large. Does the error also occur if you disable the Info View before running the query?
We’ll try to find the weak spot (usually, too large info output will be chopped), Christian
On Sat, Nov 21, 2020 at 11:32 PM Giuseppe G. A. Celano celano@informatik.uni-leipzig.de wrote:
Hi,
I got an "Improper use? Potential bug?” error (see below) with a (complex) query which actually works when applied to many files (but not to all). This is the query (temporary links):
https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/scripts/...
applied to all files here:
https://git.informatik.uni-leipzig.de/celano/latinnlp/-/tree/master/texts/pa...
Essentially, I have some words associated to an XPath expression + offsets (see, for example, [1]), which (words) I can retrieve by using substring($xpath, $start, $long) applied to [2]. My goal is to try to identify the text nodes the words are children of, because I want to check whether they are contained in some specific elements.
Ciao, Giuseppe
[1] https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/pa... [2] https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/pa...
Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.3.2 Java: Ubuntu, 11.0.9.1 OS: Linux, amd64 Stack Trace: java.lang.ArrayIndexOutOfBoundsException: Maximum array size reached. at org.basex.util.Array.newSize(Array.java:299) at org.basex.util.Array.newSize(Array.java:288) at org.basex.util.TokenBuilder.add(TokenBuilder.java:267) at org.basex.util.TokenBuilder.add(TokenBuilder.java:252) at org.basex.query.QueryInfo.toString(QueryInfo.java:142) at org.basex.query.QueryContext.info(QueryContext.java:474) at org.basex.query.QueryProcessor.info(QueryProcessor.java:272) at org.basex.core.cmd.AQuery.extError(AQuery.java:212) at org.basex.core.cmd.AQuery.query(AQuery.java:130) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.gui.GUI.exec(GUI.java:416) at org.basex.gui.GUI.lambda$execute$4(GUI.java:359) at java.base/java.lang.Thread.run(Thread.java:834)
One more hint:
If you iterate over documents that are not stored in a database, you can save a lot of main memory by using fetch:xml instead of fn:doc.
As fn:doc is deterministic, all intermediate documents must be kept in main memory in order to ensure that a future access to this file will return the same document node. If you use fetch:xml, the document reference will automatically be dropped in the next step of the iteration.
On Sat, Nov 21, 2020 at 11:32 PM Giuseppe G. A. Celano celano@informatik.uni-leipzig.de wrote:
Hi,
I got an "Improper use? Potential bug?” error (see below) with a (complex) query which actually works when applied to many files (but not to all). This is the query (temporary links):
https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/scripts/...
applied to all files here:
https://git.informatik.uni-leipzig.de/celano/latinnlp/-/tree/master/texts/pa...
Essentially, I have some words associated to an XPath expression + offsets (see, for example, [1]), which (words) I can retrieve by using substring($xpath, $start, $long) applied to [2]. My goal is to try to identify the text nodes the words are children of, because I want to check whether they are contained in some specific elements.
Ciao, Giuseppe
[1] https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/pa... [2] https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/pa...
Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.3.2 Java: Ubuntu, 11.0.9.1 OS: Linux, amd64 Stack Trace: java.lang.ArrayIndexOutOfBoundsException: Maximum array size reached. at org.basex.util.Array.newSize(Array.java:299) at org.basex.util.Array.newSize(Array.java:288) at org.basex.util.TokenBuilder.add(TokenBuilder.java:267) at org.basex.util.TokenBuilder.add(TokenBuilder.java:252) at org.basex.query.QueryInfo.toString(QueryInfo.java:142) at org.basex.query.QueryContext.info(QueryContext.java:474) at org.basex.query.QueryProcessor.info(QueryProcessor.java:272) at org.basex.core.cmd.AQuery.extError(AQuery.java:212) at org.basex.core.cmd.AQuery.query(AQuery.java:130) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.gui.GUI.exec(GUI.java:416) at org.basex.gui.GUI.lambda$execute$4(GUI.java:359) at java.base/java.lang.Thread.run(Thread.java:834)
Hi Giuseppe,
The compilation info of all xquery:eval calls was added to the query info; this resulted in a huge list of info messages. With the new snapshot, only the compilation strings for the main expression will be added to the info output [1].
As indicated, the error can be avoided in 9.4.5 if you disable the info view panel, run the query on command-line without the -V flag, etc.
Cheers, Christian
[1] https://files.basex.org/releases/latest/
On Wed, Nov 25, 2020 at 1:03 PM Christian Grün christian.gruen@gmail.com wrote:
One more hint:
If you iterate over documents that are not stored in a database, you can save a lot of main memory by using fetch:xml instead of fn:doc.
As fn:doc is deterministic, all intermediate documents must be kept in main memory in order to ensure that a future access to this file will return the same document node. If you use fetch:xml, the document reference will automatically be dropped in the next step of the iteration.
On Sat, Nov 21, 2020 at 11:32 PM Giuseppe G. A. Celano celano@informatik.uni-leipzig.de wrote:
Hi,
I got an "Improper use? Potential bug?” error (see below) with a (complex) query which actually works when applied to many files (but not to all). This is the query (temporary links):
https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/scripts/...
applied to all files here:
https://git.informatik.uni-leipzig.de/celano/latinnlp/-/tree/master/texts/pa...
Essentially, I have some words associated to an XPath expression + offsets (see, for example, [1]), which (words) I can retrieve by using substring($xpath, $start, $long) applied to [2]. My goal is to try to identify the text nodes the words are children of, because I want to check whether they are contained in some specific elements.
Ciao, Giuseppe
[1] https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/pa... [2] https://git.informatik.uni-leipzig.de/celano/latinnlp/-/blob/master/texts/pa...
Error: Improper use? Potential bug? Your feedback is welcome: Contact: basex-talk@mailman.uni-konstanz.de Version: BaseX 9.3.2 Java: Ubuntu, 11.0.9.1 OS: Linux, amd64 Stack Trace: java.lang.ArrayIndexOutOfBoundsException: Maximum array size reached. at org.basex.util.Array.newSize(Array.java:299) at org.basex.util.Array.newSize(Array.java:288) at org.basex.util.TokenBuilder.add(TokenBuilder.java:267) at org.basex.util.TokenBuilder.add(TokenBuilder.java:252) at org.basex.query.QueryInfo.toString(QueryInfo.java:142) at org.basex.query.QueryContext.info(QueryContext.java:474) at org.basex.query.QueryProcessor.info(QueryProcessor.java:272) at org.basex.core.cmd.AQuery.extError(AQuery.java:212) at org.basex.core.cmd.AQuery.query(AQuery.java:130) at org.basex.core.cmd.XQuery.run(XQuery.java:22) at org.basex.core.Command.run(Command.java:257) at org.basex.core.Command.execute(Command.java:93) at org.basex.gui.GUI.exec(GUI.java:416) at org.basex.gui.GUI.lambda$execute$4(GUI.java:359) at java.base/java.lang.Thread.run(Thread.java:834)
basex-talk@mailman.uni-konstanz.de