internal problem and internal error
Added by Sebastian Fey about 8 years ago
I'm developing a xquery program with oxygen 18 which uses Saxon-EE 9.6.0.7. Everything runs fine in oxygen. But when I run the code with the latest .NET version (EE 9.7.0.8) I get an "internal problem" with one query and an "internal error" with another.
saxon -update:on -tree:linked -qversion:3.0 -o:out/003-components.xml -q:003-components.xq
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
*** Internal problem: Base value for indexed filter is not indexable (net.sf.saxon.expr.LetExpression)
Filter at line 31 of file:/D:/workspaces/XML/autoint/003-components.xq
$Q{http://saxon.sf.net/generated-variable}loc6114302[$Q{http://saxon.sf.net/generated-variable}loc63646052 = (name(.))]
saxon -update:on -tree:linked -qversion:3.0 -o:out/008-devices.xml -q:008-devices.xq
java.lang.NullPointerException: Internal error: expression $devices_ has no retained static context
at net.sf.saxon.expr.Expression.getConfiguration(Expression.java:1106)
at net.sf.saxon.expr.ItemChecker.getItemType(ItemChecker.java:280)
at net.sf.saxon.expr.CardinalityChecker.getItemType(CardinalityChecker.java:349)
at net.sf.saxon.expr.instruct.CopyOf.createsNewNodes(CopyOf.java:170)
at net.sf.saxon.expr.instruct.Instruction.computeSpecialProperties(Instruction.java:258)
at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1129)
at net.sf.saxon.expr.Expression.getSpecialProperties(Expression.java:643)
at net.sf.saxon.expr.VariableReference.computeSpecialProperties(VariableReference.java:378)
at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1129)
at net.sf.saxon.expr.Expression.getDependencies(Expression.java:700)
at net.sf.saxon.expr.Expression.computeDependencies(Expression.java:1181)
at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1129)
at net.sf.saxon.expr.Expression.getDependencies(Expression.java:700)
at net.sf.saxon.expr.Expression.computeDependencies(Expression.java:1181)
at net.sf.saxon.expr.Expression.computeStaticProperties(Expression.java:1129)
at net.sf.saxon.expr.Expression.getDependencies(Expression.java:700)
at net.sf.saxon.expr.UserFunctionCall.computeArgumentEvaluationModes(UserFunctionCall.java:379)
at net.sf.saxon.query.XQueryFunction.fixupReferences(XQueryFunction.java:501)
at net.sf.saxon.query.XQueryFunction.compile(XQueryFunction.java:379)
at net.sf.saxon.query.XQueryFunctionLibrary.fixupGlobalFunctions(XQueryFunctionLibrary.java:313)
at net.sf.saxon.query.QueryModule.fixupGlobalFunctions(QueryModule.java:1189)
at net.sf.saxon.expr.instruct.Executable.fixupQueryModules(Executable.java:565)
at net.sf.saxon.query.XQueryParser.makeXQueryExpression(XQueryParser.java:175)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:589)
at net.sf.saxon.query.StaticQueryContext.compileQuery(StaticQueryContext.java:652)
at net.sf.saxon.s9api.XQueryCompiler.compile(XQueryCompiler.java:606)
at net.sf.saxon.Query.compileQuery(Query.java:795)
at net.sf.saxon.Query.doQuery(Query.java:343)
at cli.Saxon.Cmd.DotNetQuery.Main(Unknown Source)
Fatal error during query: java.lang.NullPointerException: Internal error: expression $devices_ has no retained static context
Replies (6)
Please register to reply
RE: internal problem and internal error - Added by O'Neil Delpratt about 8 years ago
Hi,
Thanks for letting us know about the problem you have discovered. Is it possible that you can send us a repo so that we can investigate further. Either on this bug issue or privately if confidential.
RE: internal problem and internal error - Added by Sebastian Fey about 8 years ago
-
"java.lang.NullPointerException: Internal error: expression $devices_ has no retained static context" I tested the query with the latest java version were it runs without an error. If you want I can look into that again and see if I can narrow it down when I got the time (not this week) or send you the whole code per email.
-
"Internal problem: Base value for indexed filter is not indexable "
the problem here seems to be a predicate of the form @/*[name()=$x]@ where $x is empty. I fixed the problem with a where clause, see comment in snippet.
for $action-type in $component/action-type
let $component-type := $project//components[id = $component/@id]/type
where exists($component-type) (: !!! this line fixes the problem !!! :)
return
{$matrix/*[name() = $component-type]/*[name() = $action-type]/@mode/data()}
RE: internal problem and internal error - Added by O'Neil Delpratt about 8 years ago
Hi,
To reproduce the error we would need the full query file please.
RE: internal problem and internal error - Added by Sebastian Fey about 8 years ago
I can't send the full query, so I'll have to narrow it down, but here is another one (already narrowed down)
this query
declare variable $doc-devices := doc("out/devs-no-params.xml");
declare variable $doc-device-types := doc("res/device-types.xml");
declare variable $devices_ := $doc-devices;
copy $devices := $devices_
modify (
for $channel in $devices//channel
return
replace node $channel
with
{$channel/@*}
)
return
$devices
with this doc
gives me a NullPointerException:
java net.sf.saxon.Query -update:on -tree:linked -q:foo.xq Saxon evaluation license expires in 12 days java.lang.NullPointerException at net.sf.saxon.tree.linked.NodeImpl.getNamePool(NodeImpl.java:362) at net.sf.saxon.tree.linked.NodeImpl.getURI(NodeImpl.java:395) at net.sf.saxon.om.NameOfNode.hasURI(NameOfNode.java:82) at net.sf.saxon.event.ComplexContentOutputter.startContent(ComplexContentOutputter.java:570) at net.sf.saxon.tree.linked.ElementImpl.copy(ElementImpl.java:349) at net.sf.saxon.tree.linked.ElementImpl.copy(ElementImpl.java:355) at net.sf.saxon.tree.linked.ElementImpl.copy(ElementImpl.java:355) at net.sf.saxon.event.ComplexContentOutputter.append(ComplexContentOutputter.java:531) at net.sf.saxon.event.ComplexContentOutputter.append(ComplexContentOutputter.java:520) at net.sf.saxon.expr.VariableReference.process(VariableReference.java:482) at com.saxonica.ee.update.CopyModifyExpression.process(CopyModifyExpression.java:361) at EE_main_01975546571.process(file:/D:/workspace/autoint/foo.xq:7) at com.saxonica.ee.bytecode.CompiledExpression.process(CompiledExpression.java:66) at net.sf.saxon.query.XQueryExpression.run(XQueryExpression.java:409) at net.sf.saxon.s9api.XQueryEvaluator.run(XQueryEvaluator.java:368) at net.sf.saxon.Query.runQuery(Query.java:892) at net.sf.saxon.Query.doQuery(Query.java:439) at net.sf.saxon.Query.main(Query.java:111) Fatal error during query: java.lang.NullPointerException: (no message)
RE: internal problem and internal error - Added by Sebastian Fey about 8 years ago
version SaxonEE9-6-0-9J (where can I edit my posting?)
-- Click on the pencil icon to the right of the post
RE: internal problem and internal error - Added by Michael Kay about 8 years ago
The problem occurs for me when running from the command line, but not when running 9.6 in my IDE. This suggests it's a bug that has been fixed since the last 9.6 maintenance release.
A search leads me to bug 2789 (see comment #4)
Please register to reply