View Issue Details

IDProjectCategoryView StatusLast Update
0016411ScribusScripterpublic2021-01-08 06:18
Reporterjuham Assigned To 
PrioritynormalSeveritycrashReproducibilitysometimes
Status newResolutionopen 
PlatformOSWindowsOS Version10
Product Version1.5.6 
Target VersionFixed in Version 
Summary0016411: Scribus crashes when calling scribus.redrawAll() function
DescriptionScribus crash when call scribus.redrawAll() API function. I have multiple textframes, images, rects and lines in sla document which are created with python API functions. Crash appears in somehow randomly but It will eventually happen when rects/lines are drawn and scribus.redrawAll() called. I have self compiled 1.5.6 source code and I reproduced the error with Visual Studio 2019. I can see that there occurs some problem inside LineBox::drawBackGround function. Problem is that (const CharStyle& style = box->style(); ) style is a faulty object and does not contain CharStyle. GlyphBox seems to be otherwise ok.
Additional InformationDump file size was 575Mb and I could not attach it here.
TagsNo tags attached.
PatchNo

Activities

juham

2021-01-07 08:12

reporter  

scr1.png (426,677 bytes)
scr1.png (426,677 bytes)
src2.png (515,894 bytes)
src2.png (515,894 bytes)

juham

2021-01-07 08:24

reporter   ~0048642

Here is a download link of VS 2019 dump file(570Mb): https://drive.google.com/file/d/1Vg3Br3kWOdGZXtJCgOg5s_1tlp39-blg/view?usp=sharing

jghali

2021-01-07 12:39

administrator   ~0048644

This is apparently a case where a dump will not be really useful as the root cause of the crash will not be in the stack. I suspect this LineBox::drawBackground() to be performed on a text layout which has been invalidated by some text modification. So to continue investigating, I will need any element which allows me to reproduce the crash: script, document, etc...

juham

2021-01-08 06:18

reporter   ~0048652

It would be far too complicated to deliver a working running environment. Here I attach two py files and one sla document, that are essential with this problem.
My software calls AgDragPreview.py display_neo_drag() function that calls _doc_group_highlight_ex and _paint_group_clear_article_ex functions. Crash happens always inside _doc_group_highlight_ex() where scribus.redrawAll() is called(after writing text inside textframes).
Underlying sla doc. contains textframes and imageframes(+some lines). AgDraw.py _insert_stylename_title() function inserts text to textframes and that may be essential for this problem. _remove_stylename_title() function removes these same written texts that are in form "<somestringname>"

When runnin my code, pointed_article(int) variable gets different values(for example 1...10) and thus rects are drawn and removed according that value. It is kind of preview which frame group is selected.

AgDragPreview.py (3,725 bytes)
AgDraw.py (6,811 bytes)
40701_.sla (76,357 bytes)

Issue History

Date Modified Username Field Change
2021-01-07 08:12 juham New Issue
2021-01-07 08:12 juham File Added: scr1.png
2021-01-07 08:12 juham File Added: src2.png
2021-01-07 08:24 juham Note Added: 0048642
2021-01-07 11:55 jghali Category Styles => Scripter
2021-01-07 12:09 jghali Summary Scribus crash when call scribus.redrawAll() API function. => Scribus crashes when calling scribus.redrawAll() function
2021-01-07 12:39 jghali Note Added: 0048644
2021-01-08 06:18 juham File Added: AgDragPreview.py
2021-01-08 06:18 juham File Added: AgDraw.py
2021-01-08 06:18 juham File Added: 40701_.sla
2021-01-08 06:18 juham Note Added: 0048652