Project

Profile

Help

Bug #5533

closed

segfault when setting xslt parameter in a loop

Added by Lou Burnard over 2 years ago. Updated over 2 years ago.

Status:
Closed
Priority:
Normal
Category:
Python
Start date:
2022-05-23
Due date:
% Done:

100%

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

Description

my python code looks like this:

`import saxonc
with saxonc.PySaxonProcessor(license=False) as proc:
    print(proc.version)
    proc.set_configuration_property("xi", "on")
    xdmAtomicval = proc.make_boolean_value(False)
    xsltproc = proc.new_xslt30_processor()
    for LANG in LANGS:
      repoName=repoRoot+LANG
      print("Summarizing repo "+repoName+ " on "+lastUpdate)
      params=' corpus='+LANG + ' lastUpdate='+ lastUpdate
      xsltproc.set_parameter("corpus",proc.make_string_value(LANG)) 
      xsltproc.set_parameter("lastUpdate",proc.make_string_value(lastUpdate))
      src=repoName + "/driver.tei" 
      result = xsltproc.transform_to_string(source_file=src, stylesheet_file=scriptRoot+"summarize.xsl")
      print(result) `

The first time round the loop everything works correctly. But the second iteration (no matter what the input data) always leads to a core dump and the message

`JET RUNTIME HAS DETECTED UNRECOVERABLE ERROR: system exception at 0x00007ff0557820f4
Please, contact the vendor of the application.
Core dump will be written to "/home/lou/Public/Scripts/core"
Extra information about error is saved in the "jet_err_31824.txt" file.`

If I comment out the two invocations of xsltproc.set_parameter everything works fine (or as well as it can without the parameter values)

The jet_err file is attached in the hope that you can spot what is going wrong, or advise me how to pin it down!


Files

jet_err_31748.txt (93.4 KB) jet_err_31748.txt diagnostics from jet Lou Burnard, 2022-05-23 15:21
summarize2.py (1.59 KB) summarize2.py Lou Burnard, 2022-05-23 17:55
summarize.xsl (16.5 KB) summarize.xsl Lou Burnard, 2022-05-23 17:55

Related issues

Related to SaxonC - Bug #4386: setProperty and setParameter does not replace keys already in the mapClosedO'Neil Delpratt2019-11-15

Actions
Related to SaxonC - Bug #5542: Python example causes segmentation errorClosedO'Neil Delpratt2022-05-26

Actions

Please register to edit this issue

Also available in: Atom PDF