View Issue Details

IDProjectCategoryView StatusLast Update
0017600ScribusScripterpublic2025-08-05 23:48
Reporterhjh Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status newResolutionopen 
PlatformWindowsOSMSWindowsOS Version10
Summary0017600: Using unknown/misspelled named parameter in API call causes Scribus crash
DescriptionFor long parameters lists it is recommended to use named parameters in Scribus API calls.

However if a parameter is not known Scribus crashes instead of giving an error message reporting the line where the problem exists as with other issues with scripts.
Steps To Reproduce1. Open a new document in Scribus
2. Run the following script in the console

# (c) CC0 Public Domain
import scribus
origX = 40
origX = 70
origY = 56
i = 0
boxHeight =100
boxWidth = 515
boxWidth = 470
fSize= 64

myCharStyle = scribus.createCharStyle("BigCharStyle", font="Arial Regular", fontsize=64)
myParaStyle = scribus.createParagraphStyle("BigPara", alignment=scribus.ALIGN_CENTERED, charstyle="BigCharStyle")


y= origY
scribus.createText(origX,y,boxWidth,boxHeight,"line1")
scribus.setText("Hello","line1")
scribus.setParagraphStyle("BigPara","line1")

Result: No problem

3. replace
    alignment=scribus.ALIGN_CENTERED
    with
    align=scribus.ALIGN_CENTERED
    (= an unknown parameter name)

4. Run the script again

# (c) CC0 Public Domain
import scribus
origX = 40
origX = 70
origY = 56
i = 0
boxHeight =100
boxWidth = 515
boxWidth = 470
fSize= 64

myCharStyle = scribus.createCharStyle("BigCharStyle", font="Arial Regular", fontsize=64)
myParaStyle = scribus.createParagraphStyle("BigPara", align=scribus.ALIGN_CENTERED, charstyle="BigCharStyle")


y= origY
scribus.createText(origX,y,boxWidth,boxHeight,"line1")
scribus.setText("Hello","line1")
scribus.setParagraphStyle("BigPara","line1")

Result: Scribus crashes: Exception Access violation message box, no message box when run with 'Execute script'.

Expected behaviour:

Error message: 'Unknown parameter in line 13'
Tags1.6.4, 1.6.5svn
PatchNo

Activities

cbradney

2025-08-05 19:46

administrator   ~0052947

Last edited: 2025-08-05 19:47

No issue with 1.6.5.svn or 1.7.1.svn here on Mac OS.

cbradney

2025-08-05 19:48

administrator   ~0052948

Screenshot of error:
image.png (125,066 bytes)   
image.png (125,066 bytes)   

jghali

2025-08-05 23:48

administrator   ~0052949

The error comes apparently from Python itself. In the python 3.8 version used by the Scribus 1.6.x series on Windows, the PyArg_ParseTupleAndKeywords function leaves us with some bad pointers when an argument parsing error occurs, which ultimately cause some bad Py_MemFree calls on our side and the crashes. Fortunately this will be easy to workaround.

Issue History

Date Modified Username Field Change
2025-08-04 10:54 hjh New Issue
2025-08-04 10:54 hjh Tag Attached: 1.6.4
2025-08-04 10:54 hjh Tag Attached: 1.6.5svn
2025-08-05 19:46 cbradney Note Added: 0052947
2025-08-05 19:47 cbradney Note Edited: 0052947
2025-08-05 19:48 cbradney Note Added: 0052948
2025-08-05 19:48 cbradney File Added: image.png
2025-08-05 23:48 jghali Note Added: 0052949