View Issue Details

IDProjectCategoryView StatusLast Update
0013281ScribusUndo/Redopublic2016-12-08 21:30
ReporterFirasH Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
Status confirmedResolutionopen 
Platformx86_64OSopenSUSEOS Version13.2
Product Version1.5.1svn 
Target Version1.5.5Fixed in Version 
Summary0013281: Undo/Redo of imported items (Barcode/PDF) casues Scribus crash on document closing
DescriptionUndo/Redo of imported items (Barcode/PDF) casues Scribus crash on document closing.
Steps To Reproduce0) Create a new document
1) Insert a Barcode (or import a vector file like PDF)
2) Undo
3) Redo
4) Undo
5) Redo
6) Close Scribus > Discard

Scribus crashes due to Signal 11
Additional Information1.5.1.svn (20300)
TagsHOST-Oman
PatchNo

Relationships

related to 0012374 confirmed Undo/Redo crashes Scribus editing a Barcode 
related to 0012194 confirmed Redo is not able to restore correctly an imported SVG/PDF/EPS removed with Undo 
child of 0012500 acknowledged Metabug: Undo/Redo (1.5.x.svn) 

Activities

as.bahanta

2015-10-20 08:35

reporter   ~0036723

hi ,
I was able to reproduce the crash and tried to fix it. so here is what I think went wrong. in step 3 it produce a duplicate of the Barcode object and then in the last step the program tries to access an item that does not exist.
so I replaced takefirst() with removeFirst() which removes an item without returning an item .

as.bahanta

2015-10-20 08:36

reporter  

issue0013281.patch (377 bytes)
Index: scribusdoc.cpp
===================================================================
--- scribusdoc.cpp	(revision 20473)
+++ scribusdoc.cpp	(working copy)
@@ -715,7 +715,7 @@
 	numerations.clear();
 	while (!DocItems.isEmpty())
 	{
-		delete DocItems.takeFirst();
+		DocItems.removeFirst();
 	}
 	QList<PageItem*> tmList = FrameItems.values();
 	while (!tmList.isEmpty())
issue0013281.patch (377 bytes)

Kunda

2015-10-20 12:46

updater   ~0036729

Thanks for the patch :)
That would be fantastic if the patch was that simple!
Lets see what the devs say. Cheers

jghali

2015-10-20 12:52

administrator   ~0036730

The patch is unfortunately incorrect as it cause memory leaks and in fact does not fix the source of the problem.

Kunda

2015-10-27 23:17

updater   ~0037005

Nevertheless, nice try as.bahanta

Issue History

Date Modified Username Field Change
2015-08-08 23:42 FirasH New Issue
2015-08-08 23:42 FirasH Relationship added child of 0012500
2015-08-08 23:43 FirasH Relationship added related to 0012374
2015-08-08 23:43 FirasH Relationship added related to 0012194
2015-10-04 23:26 Kunda Status new => confirmed
2015-10-04 23:26 Kunda Target Version => 1.5.1
2015-10-20 08:35 as.bahanta Note Added: 0036723
2015-10-20 08:36 as.bahanta File Added: issue0013281.patch
2015-10-20 12:46 Kunda Note Added: 0036729
2015-10-20 12:52 jghali Note Added: 0036730
2015-10-26 07:44 as.bahanta Tag Attached: HOST-Oman
2015-10-27 23:17 Kunda Note Added: 0037005
2016-01-23 17:16 cbradney Target Version 1.5.1 => 1.5.3
2016-12-08 21:30 Kunda Target Version 1.5.3 => 1.5.5