Project

Profile

Help

Bug #4352

closed

JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR: system exception at 0x0000000000428b82

Added by O'Neil Delpratt about 5 years ago. Updated about 5 years ago.

Status:
Closed
Priority:
Normal
Category:
C++ API
Start date:
2019-10-21
Due date:
% Done:

100%

Estimated time:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Found in version:
1.2.0
Fixed in version:
1.2.1
SaxonC Languages:
SaxonC Platforms:
SaxonC Architecture:

Description

The following sample code crashes out:

with saxonc.PySaxonProcessor(license=False) as proc:
    print(proc.version)

    xquery_processor = proc.new_xquery_processor()

    result = xquery_processor.run_query_to_value(query_text = 'declare variable $n external := 10; (1 to $n)!(. * .)')

    print(result.size)

    for i in range(result.size):
        print(result.item_at(i))

See error below:

Saxon/C 1.2.0 running with Saxon-HE 9.9.1.5J from Saxonica
10
1

JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR: system exception at 0x0000000000428b82

The issue is we are not handling properly the case where the `XdmValue is a sequence.

In the C++ code we are checking if the XdmValue is an instance of XdmNode or XdmtomicValue. But if it is neither of these types we just wrap the Java XdmValue object in the wrapper class in C++. This is no good in the case where the XdmValue contains a sequence value like a SequenceExtent object. In the Xslt30Processor object we handle this case by building sequence of items on the C++ side, but this code we are just not using in the XQueryProcessor.

I have made the fix in the C++ code and the sample above works now.

Testing for other places in the code which needs this fix.

Please register to edit this issue

Also available in: Atom PDF