View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0008285 | Scribus | Scripter | public | 2009-07-14 14:40 | 2009-08-10 22:14 |
Reporter | ciops | Assigned To | jghali | ||
Priority | normal | Severity | crash | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | intel | OS | windows | OS Version | xp sp3 |
Product Version | 1.3.3.13 | ||||
Fixed in Version | 1.3.3.14svn | ||||
Summary | 0008285: while loop with textOverflows crashes scribus | ||||
Description | I do not understand why if I run the following script with a messageBox Command it works, else with the messageBox line commented it halts scribus (I must kill scribus.exe process to stop having 100% Cpu working). | ||||
Steps To Reproduce | run this script: from scribus import * setUnit(1) descFrameID="DESC_2" createText(100,100,100,1, descFrameID) setText("bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla bla ",descFrameID) H = getSize(descFrameID)[1] ovfc=textOverflows(descFrameID) while ovfc>0: if ovfc==0: break else: H += 1 sizeObject(getSize(descFrameID)[0], H ,descFrameID) messageBox("caption", "Overflow character: "+str(textOverflows(descFrameID))+"\n new Frame Height:"+str(H), icon=ICON_NONE, button1=BUTTON_OK, button2=BUTTON_NONE, button3=BUTTON_NONE) ovfc=textOverflows(descFrameID) | ||||
Tags | No tags attached. | ||||
Patch | |||||
2009-07-14 14:40
|
|
|
The frame layout is tied to redraw in 1.3.3.x. As redraw is normally disabled while script is running, a way to redraw frames is needed. Calling messageBox() allows that indirectly. Here you will need to call redrawAll() after sizeObject(). You will need also latest 1.3.3.14svn snapshot as i fixed a bug which prevented redrawAll() to work as expected : https://sourceforge.net/projects/scribus/files/scribus-svn/scribus-1.3.3.14svn-090716-snapshot.exe/download |
|
Forgot a thing : that redrawAll() is not needed in 1.3.5svn as layout and redraw are now recoupled. |
Date Modified | Username | Field | Change |
---|---|---|---|
2009-07-14 14:40 | ciops | New Issue | |
2009-07-14 14:40 | ciops | File Added: new.py | |
2009-07-16 22:41 | jghali | Note Added: 0022202 | |
2009-07-16 22:42 | jghali | Status | new => resolved |
2009-07-16 22:42 | jghali | Fixed in Version | => 1.3.3.14svn |
2009-07-16 22:42 | jghali | Resolution | open => fixed |
2009-07-16 22:42 | jghali | Assigned To | => jghali |
2009-07-16 22:44 | jghali | Note Added: 0022203 | |
2009-08-10 22:14 | cbradney | Status | resolved => closed |