Project

Profile

Help

Bug #4859

closed

Jet Runtime Has detected Unrecoverable Error-libsaxonhec.dll transformToString not found

Added by Brian Higashide almost 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
High
Category:
Python
Start date:
2020-12-17
Due date:
% Done:

0%

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

Description

When trying to run the following code, i am getting this error:

Error: C:\Program Files\Saxonica\SaxonHEC1.2.1\libsaxonhec.dlltransformToString not found

12072020

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

print(fcfilename)
proc=saxonc.PySaxonProcessor(license=False)
print('Test Saxon/C on Python')
print(proc.version)
xslt30_processor = proc.new_xslt30_processor()
xslt30_processor.set_cwd(".")
	transform=xslt30_processor.transform_to_string(source_file="S:/QA/Projects2/SBE/schematron/NJFC_0814_22000040437.xml",stylesheet_file='S:/QA/Projects2/SBE/schematron/AccountTransfer-runtime-compiled.xsl',output_file='S:/QA/Projects2/SBE/schematron/testresults.xml')

	msg=xslt30_processor.get_xsl_messages()
	print(fcfilename)
	printed=[]
	if msg is not None:
		i=0
		while i <msg.size:
			if str(msg.item_at(i)) not in printed:
				print('\t'+msg.item_at(i))
				printed.append(str(msg.item_at(i)))

Files

jet_err_5828.txt (44.9 KB) jet_err_5828.txt Brian Higashide, 2020-12-17 15:06
jet_dump_5828.dmp (169 MB) jet_dump_5828.dmp Brian Higashide, 2020-12-17 15:06
clipboard-202012180939-zcvqr.png (25.1 KB) clipboard-202012180939-zcvqr.png Brian Higashide, 2020-12-18 15:39
jet_err_14200.txt (39.3 KB) jet_err_14200.txt Brian Higashide, 2020-12-19 07:03
jet_dump_14200.dmp (169 MB) jet_dump_14200.dmp Brian Higashide, 2020-12-19 07:04

Related issues

Is duplicate of SaxonC - Bug #4847: sotransformToString - PythonClosedO'Neil Delpratt2020-12-02

Actions
Actions #1

Updated by Michael Kay almost 4 years ago

  • Project changed from Saxon to SaxonC
  • Assignee set to O'Neil Delpratt
Actions #2

Updated by O'Neil Delpratt almost 4 years ago

  • Is duplicate of Bug #4847: sotransformToString - Python added
Actions #3

Updated by O'Neil Delpratt almost 4 years ago

  • Category set to Python
  • Status changed from New to Duplicate
  • Found in version set to 1.2.1

Hi,

Thanks for reporting this issue. This looks like the same bug issue as #4847. In comment #2 we describe the issue and solution. In summary the get_xsl_messages function has incorrect JNI code in the underlying C++ code. A fix is available for the next release of Saxon/C

As a workaround there is a patched file Xslt30Processor.cpp attached in the same bug issue #4847 please download it, replace the file you have and rebuild the Saxon/C product for python.

Actions #4

Updated by Brian Higashide almost 4 years ago

The fix from #4847 has been applied and the module rebuilt but I am still seeing the same error message.

Actions #5

Updated by O'Neil Delpratt almost 4 years ago

Investigating.

Actions #6

Updated by O'Neil Delpratt almost 4 years ago

  • Status changed from Duplicate to In Progress
Actions #7

Updated by O'Neil Delpratt almost 4 years ago

  • Status changed from In Progress to AwaitingInfo

Hi,

you are missing a set property for xsl:message:

xslt30_processor.set_property('m', '') 

The bug issue #4847 also mentions:

What actually happens to the xsl:messages by default is to output messages to the standard output console, 
but this does not find its way to python. As mentioned in the bug issue #4147 to capture the messages you 
will have to call xslt30_processor.set_property('m', '') before you do the transformation.

The culprit of the exception thrown is the size property. For some reason we create a PyXdmValue object over an empty sequence. We probably should return None for when get_xsl_message has no xsl:message to return.

Actions #8

Updated by Brian Higashide almost 4 years ago

I have updated the code as follows, but still receiving the same error

for fcfilename in os.listdir(path):
	print(fcfilename)
	proc=saxonc.PySaxonProcessor(license=False)
	print('Test Saxon/C on Python')
	print(proc.version)
	xslt30_processor = proc.new_xslt30_processor()
	xslt30_processor.set_property('m','')
	xslt30_processor.set_cwd(".")
	transform=xslt30_processor.transform_to_string(source_file="S:/QA/Projects2/SBE/schematron/NJFC_0814_22000040437.xml",stylesheet_file='S:/QA/Projects2/SBE/schematron/AccountTransfer-runtime-compiled.xsl',output_file='S:/QA/Projects2/SBE/schematron/testresults.xml')
	# dink=xslt30_processor.transform_to_string(source_file=path+'/'+fcfilename,stylesheet_file='S:/QA/Projects2/SBE/schematron/AccountTransfer-runtime-compiled.xsl',output_file='S:/QA/Projects2/SBE/schematron/testresults.xml')
	msg=xslt30_processor.get_xsl_messages()
	print(fcfilename)
	printed=[]
	if msg is not None:
		i=0
		while i <msg.size:
			if str(msg.item_at(i)) not in printed:
				print('\t'+msg.item_at(i))
				printed.append(str(msg.item_at(i)))
Actions #9

Updated by O'Neil Delpratt almost 4 years ago

  • Status changed from AwaitingInfo to In Progress

Please can you send us your stylesheet and XML document either on the bug issue or private email.

Actions #10

Updated by Brian Higashide almost 4 years ago

Just wanted to update, this is working fine on my home computer but I'm only having issues on my office pc so it might be difficult to duplicate.

I will try reinstalling it on Monday just in case.

Actions #11

Updated by O'Neil Delpratt almost 4 years ago

Thanks for sending me your files privately.

On my linux machine the stylesheet displays the xsl:messages as expected.

On your office pc please double check that you have applied the fixes described in comment #3.

Please can you describe your environment such as platform that you are using. I assume you are using a Windows machine.

Actions #12

Updated by Brian Higashide almost 4 years ago

Sure, I am running windows 10 64bit on my office pc.

I have the same setup at home (windows 10, 64 bit) which is running fine after the fix but not on my office machine for some reason.

Actions #13

Updated by O'Neil Delpratt almost 4 years ago

It looks like we have a cython caching problem when changes are made to the C++ files:

https://stackoverflow.com/questions/55836761/cython-c-cache-how-to-clear

Actions #14

Updated by O'Neil Delpratt almost 4 years ago

  • Status changed from In Progress to AwaitingInfo

So the link I posted does not have a solution, but what is clear is that the python extension build, which uses cython is not picking up the modified Xslt30Processor.cpp file. I am not experiencing this on my windows machine, but I know this issue can happen as I once experienced it in the past on my mac platform.

There are a number options here /

  1. try to deleting the object file for Xslt30Processor in the directory ../Saxon.C.APIpython-saxon/build/temp.win-amd64-3.7/Xslt30Processor.obj (directory may be slightly different if not on the same python release) and then rebuild the python extension

  2. If 1. fails try reinstalling Saxon/C and apply the patch before you rebuild the python extension

Also being on the latest stable cython release could make the difference. Please can you confirm which cython version you have on your office machine?

In Powershell on my machine if I run cython --version I get:

Cython version 0.29.14
Actions #15

Updated by Brian Higashide almost 4 years ago

Hi O'Neil. my cython version is 0.29.21

removing the Xslt30Processor.obj and rebuilding the extension looks to have fixed the problem. Now my code is running without errors.

Thanks for the help!

Actions #16

Updated by O'Neil Delpratt almost 3 years ago

  • Status changed from AwaitingInfo to Closed

Please register to edit this issue

Also available in: Atom PDF