Bug #4885
closed
Exception 0xC0000005 (EXCEPTION_ACCESS_VIOLATION) Failed to read memory at 0x0000000000000000
Fixed in Maintenance Release:
Description
Qhen attempting schematron validation I am getting an Error JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR: system exception at ...
please find code and .dmp file attached.
Files
- Category set to Python
- Assignee set to O'Neil Delpratt
- Found in version set to 1.2.1
Hi,
Please can you send me privately your XSLT file so that I can try and reproduce the error.
- Status changed from New to In Progress
Hi Brian,
I have managed to reproduce the issue you reported. I see the following printout then it hangs and then crashes:
Test Saxon/C on Python
Saxon/C 1.2.1 running with Saxon-HE 9.9.1.5C from Saxonica
AccountTransfer-runtime-compiled.xsl
nc:Date is required in ns2:StartDate.
I am not seeing the problem on Java, so it is specific to Saxon/C. I am still investigating.
Update:
On Saxon/C the stylesheet with the given source documents works fine using the command Transfom.c and within the C++ API. Therefore the bug is specific to the python API.
- Status changed from In Progress to Rejected
Hi Brian,
Having looked back at the python code. These are the problems I found:
- The program runs out of memory due to the while loop going into infinite loop. The
i
variable needs incrementing.
- PySaxonProcessor objects is created within
for
loop, which is not advised as it should in most cases created once.
- Status changed from Rejected to In Progress
I am reopening this bug issue because after fixing up the python code with the suggestions in comment #4 the user is now getting a segmentation error.
This looks like a bug. The problem is if there are no XSL messages the variable msg
in the code msg=xslt30_processor.get_xsl_messages()
should be None
, but it is in a unclean state.
This is indeed a bug. In the saxonc.pyx file the following patch should be applied to the get_xsl_messages method which appears in the classes PyXsltProcessor
and PyXslt30Processor
:
def get_xsl_messages(self):
"""
Get the messages written using the <code>xsl:message</code> instruction
get_xsl_message(self)
Returns:
PyXdmValue: Messages returned as an XdmValue.
"""
cdef saxoncClasses.XdmValue * xdmValue = NULL
cdef PyXdmValue val = None
xdmValue = self.thisxptr.getXslMessages()
if xdmValue is NULL:
return None
else:
val = PyXdmValue()
val.thisvptr = xdmValue
return val
Also at the end of the users python script the proc.release()
method is required.
Alternatively, if the PySaxonProcessor
is used as a context then itself calls the release
method:
with saxonc.PySaxonProcessor(license=False) as proc:
......
I am closing this bug as the fix was described in comment #6. Also added the patched file to this bug issue.
The mechanism for Saxon/C 1.3 has changed. We will be delivering the xsl:messages to return them in a filename given by the user.
- Status changed from Resolved to Closed
- % Done changed from 0 to 100
- Fixed in version set to 11.1
Bug fix patched in SaxonC 11.1 release
Please register to edit this issue
Also available in: Atom
PDF