View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017600 | Scribus | Scripter | public | 2025-08-04 10:54 | 2025-08-05 23:48 |
Reporter | hjh | Assigned To | |||
Priority | normal | Severity | crash | Reproducibility | always |
Status | new | Resolution | open | ||
Platform | Windows | OS | MSWindows | OS Version | 10 |
Summary | 0017600: Using unknown/misspelled named parameter in API call causes Scribus crash | ||||
Description | For 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 Reproduce | 1. 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' | ||||
Tags | 1.6.4, 1.6.5svn | ||||
Patch | No | ||||
|
No issue with 1.6.5.svn or 1.7.1.svn here on Mac OS. |
|
Screenshot of error: |
|
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. |
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 |