View Issue Details

IDProjectCategoryView StatusLast Update
0011409ScribusImport / Exportpublic2015-12-05 00:48
ReporterJLuc Assigned Tojghali  
PrioritynormalSeverityblockReproducibilityalways
Status closedResolutionfixed 
PlatformPCOSUbuntu 12.04 
Target Version1.5.1Fixed in Version1.5.1svn 
Summary0011409: crash while importing masterpage, with gdb backtrace
DescriptionBoth on 1.4.2 and 1.5 trunk,
importing "Normal Left" masterpage of P1_vide.sla in mpa.sla causes a sigfault crash.

On 1.4.2
It says : "Program received signal SIGSEGV, Segmentation fault.
0x08982bda in UndoState::setUndoObject(UndoObject*) ()"
and the backtrace is :
[Thread 0xb28ffb40 (LWP 17219) exited]
[Thread 0xada91b40 (LWP 17232) exited]
[Thread 0xb0373b40 (LWP 17231) exited]
[New Thread 0xb0373b40 (LWP 17237)]
[New Thread 0xada91b40 (LWP 17238)]
[Thread 0xb0373b40 (LWP 17237) exited]
[Thread 0xada91b40 (LWP 17238) exited]

Program received signal SIGSEGV, Segmentation fault.
0x08982bda in UndoState::setUndoObject(UndoObject*) ()
(gdb) bt
#0 0x08982bda in UndoState::setUndoObject(UndoObject*) ()
0000001 0x0897dc88 in TransactionState::pushBack(UndoObject*, UndoState*) ()
0000002 0x08980871 in UndoManager::action(UndoObject*, UndoState*, QPixmap*) ()
0000003 0x087cc383 in ScribusDoc::itemAdd(PageItem::ItemType, PageItem::ItemFrameType, double, double, double, double, double, QString const&, QString const&, bool) ()
0000004 0xb0ee8045 in Scribus134Format::PasteItem(QDomElement*, ScribusDoc*, QString const&, int) () from /usr/lib/scribus/plugins//libscribus134format.so
0000005 0xb0ef9955 in Scribus134Format::loadPage(QString const&, int, bool, QString) () from /usr/lib/scribus/plugins//libscribus134format.so
0000006 0x08355576 in FileLoader::loadPage(ScribusDoc*, int, bool, QString) ()
0000007 0x08764ea8 in ScribusMainWindow::loadPage(QString, int, bool, QString const&) ()
0000008 0x0841658c in MasterPagesPalette::importPage() ()
0000009 0x08191678 in ?? ()
0000010 0xb71476b1 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000011 0xb7c9197d in QAbstractButton::clicked(bool) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000012 0xb798562d in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000013 0xb7986c9b in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000014 0xb7986f56 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000015 0xb7a5f4ad in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000016 0xb75b41ac in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000017 0xb79861f9 in QAbstractButton::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000018 0xb7a60bdc in QToolButton::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000019 0xb7559ed4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000020 0xb7560024 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000021 0xb713097e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000022 0xb755ae95 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000023 0xb75e7074 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000024 0xb75e5c0d in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000025 0xb7612eac in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000026 0xb661bd86 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
0000027 0xb661c125 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
0000028 0xb661c201 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
0000029 0xb7163887 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000030 0xb7612aaa in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000031 0xb712f50d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000032 0xb712f7a9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000033 0xb7134eba in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000034 0xb7557a74 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000035 0x089b6d69 in mainApp(int, char**) ()
0000036 0x0817b3c7 in main ()
(gdb) ^CQuit

=====================================================================================

With 1.5.x, same happens, backtrace is :



[Thread 0xad81bb40 (LWP 17177) exited]
[Thread 0xaaf14b40 (LWP 17179) exited]
[New Thread 0xaaf14b40 (LWP 17197)]
[New Thread 0xad81bb40 (LWP 17198)]
[Thread 0xaaf14b40 (LWP 17197) exited]
[Thread 0xad81bb40 (LWP 17198) exited]
ASSERT failure in QList<T>::at: "index out of range", file /usr/include/qt4/QtCore/qlist.h, line 469

Program received signal SIGABRT, Aborted.
0xb7fdd424 in __kernel_vsyscall ()
(gdb)
(gdb)
(gdb)
(gdb)
(gdb) bt
#0 0xb7fdd424 in __kernel_vsyscall ()
0000001 0xb500d1df in raise () from /lib/i386-linux-gnu/libc.so.6
0000002 0xb5010825 in abort () from /lib/i386-linux-gnu/libc.so.6
0000003 0xb56b6616 in qt_message_output(QtMsgType, char const*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000004 0xb56b6a4b in ?? () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000005 0xb56b6b68 in qFatal(char const*, ...) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000006 0xb56b6bad in qt_assert_x(char const*, char const*, char const*, int) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000007 0x0838f026 in QList<ScPage*>::at (this=0xa1a85d4, i=2) at /usr/include/qt4/QtCore/qlist.h:469
0000008 0x087db05f in ScribusDoc::itemAdd (this=0xa1a7ec8, itemType=PageItem::TextFrame, frameType=PageItem::Unspecified, x=549.405354331024, y=683.62299212307096, b=364.25196849999998, h=527.24409449999996, w=1,
    fill=..., outline=..., itemFinalised=true, noteFrame=false) at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/scribusdoc.cpp:5437
0000009 0xae670db6 in Scribus134Format::pasteItem (this=0x949b068, doc=0xa1a7ec8, attrs=..., baseDir=..., pagenr=-1)
    at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp:2565
0000010 0xae66ac95 in Scribus134Format::readObject (this=0x949b068, doc=0xa1a7ec8, reader=..., info=..., baseDir=..., loadPage=false)
    at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp:1847
0000011 0xae66ccae in Scribus134Format::readPattern (this=0x949b068, doc=0xa1a7ec8, reader=..., baseDir=...)
    at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp:2091
0000012 0xae677691 in Scribus134Format::loadPage (this=0x949b068, fileName=..., pageNumber=0, Mpage=true, renamedPageName=...)
    at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/plugins/fileloader/scribus134format/scribus134format.cpp:3174
0000013 0x08434466 in FileLoader::loadPage (this=0xa335ec0, currDoc=0xa1a7ec8, PageToLoad=0, Mpage=true, renamedPageName=...) at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/fileloader.cpp:171
0000014 0x0875fe38 in ScribusMainWindow::loadPage (this=0x9264b10, fileName=..., Nr=0, Mpa=true, renamedPageName=...) at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/scribus.cpp:3941
0000015 0x08a1abe7 in PagePalette_MasterPages::importPage (this=0x995cb58) at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/ui/pagepalette_masterpages.cpp:390
0000016 0x08317267 in PagePalette_MasterPages::qt_static_metacall (_o=0x995cb58, _c=QMetaObject::InvokeMetaMethod, _id=8, _a=0xbfffe438)
    at /home/jluc/dev/scribus/scribus.git/Build/buildtrunk/scribus/ui/moc_pagepalette_masterpages.cxx:74
0000017 0xb57ed6b1 in QMetaObject::activate(QObject*, QMetaObject const*, int, void**) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000018 0xb633697d in QAbstractButton::clicked(bool) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000019 0xb602a62d in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000020 0xb602bc9b in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000021 0xb602bf56 in QAbstractButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000022 0xb61044ad in QToolButton::mouseReleaseEvent(QMouseEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000023 0xb5c591ac in QWidget::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000024 0xb602b1f9 in QAbstractButton::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000025 0xb6105bdc in QToolButton::event(QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000026 0xb5bfeed4 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000027 0xb5c05024 in QApplication::notify(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000028 0xb57d697e in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000029 0xb5bffe95 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000030 0xb5c8c074 in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000031 0xb5c8ac0d in QApplication::x11ProcessEvent(_XEvent*) () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000032 0xb5cb7eac in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000033 0xb4a44d86 in g_main_context_dispatch () from /lib/i386-linux-gnu/libglib-2.0.so.0
0000034 0xb4a45125 in ?? () from /lib/i386-linux-gnu/libglib-2.0.so.0
0000035 0xb4a45201 in g_main_context_iteration () from /lib/i386-linux-gnu/libglib-2.0.so.0
0000036 0xb5809887 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000037 0xb5cb7aaa in ?? () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000038 0xb57d550d in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000039 0xb57d57a9 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000040 0xb57daeba in QCoreApplication::exec() () from /usr/lib/i386-linux-gnu/libQtCore.so.4
0000041 0xb5bfca74 in QApplication::exec() () from /usr/lib/i386-linux-gnu/libQtGui.so.4
0000042 0x08c5caea in mainApp (argc=1, argv=0xbffff3b4) at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/main_nix.cpp:86
0000043 0x08c5ca73 in main (argc=1, argv=0xbffff3b4) at /home/jluc/dev/scribus/scribus.git/Scribus/scribus/main_nix.cpp:54
TagsHOST-Oman, masterpage, patch_tested_ok
PatchYes

Relationships

related to 0011232 closed Importing Master pages from other document problems 
related to 0003837 acknowledged Metabug: Master pages/Page templates 

Activities

JLuc

2013-02-08 22:29

developer  

JLuc

2013-02-08 22:33

developer   ~0029805

Last edited: 2013-02-09 08:20

I simplified the file whose masterpages caused the crash when imported and uploaded this file. It is now empty but results of a long editing process (so its not same as if 'new').

More carefull tests showed that there is no more crash after deleting the following lines in the sla.
So the bug might be related to meeting this pattern definition during the masterpage import :

        <Pattern Name="Page normale" width="364.2519685" height="527.2440945" scaleX="1" scaleY="1" xoffset="0" yoffset="0">
            <PatternItem OwnPage="-1" PTYPE="4" XPOS="549.405354331024" YPOS="683.622992123071" WIDTH="364.2519685" HEIGHT="527.2440945" RADRECT="0" FRTYPE="0" CLIPEDIT="0" PWIDTH="1" PCOLOR="None" PCOLOR2="None" COLUMNS="1" COLGAP="19.84251969" NAMEDLST="" SHADE="100" SHADE2="100" GRTYP="0" ROT="0" PLINEART="1" PLINEEND="0" PLINEJOIN="0" LOCALSCX="1" LOCALSCY="1" LOCALX="0" LOCALY="0" PICART="1" PLTSHOW="0" BASEOF="0" textPathType="0" textPathFlipped="0" FLIPPEDH="0" FLIPPEDV="0" SCALETYPE="1" RATIO="1" PRINTABLE="1" ANNOTATION="0" ANNAME="Page normale_0" TEXTFLOWMODE="0" TEXTFLOW="0" TEXTFLOW2="0" TEXTFLOW3="0" AUTOTEXT="0" EXTRA="0" TEXTRA="0" BEXTRA="0" REXTRA="0" FLOP="0" PFILE="" PFILE2="" PFILE3="" PRFILE="" EPROF="" IRENDER="1" EMBEDDED="1" LOCK="0" LOCKR="0" REVERS="0" TransValue="0" TransValueS="0" TransBlend="0" TransBlendS="0" isTableItem="0" TopLine="0" LeftLine="0" RightLine="0" BottomLine="0" isGroupControl="0" NUMDASH="0" DASHS="" DASHOFF="0" NUMPO="16" POCOOR="0 0 0 0 364.252 0 364.252 0 364.252 0 364.252 0 364.252 527.244 364.252 527.244 364.252 527.244 364.252 527.244 0 527.244 0 527.244 0 527.244 0 527.244 0 0 0 0 " NUMCO="16" COCOOR="0 0 0 0 364.252 0 364.252 0 364.252 0 364.252 0 364.252 527.244 364.252 527.244 364.252 527.244 364.252 527.244 0 527.244 0 527.244 0 527.244 0 527.244 0 0 0 0 " NUMGROUP="0" GROUPS="" startArrowIndex="0" endArrowIndex="0" OnMasterPage="" ImageClip="" ImageRes="1" Pagenumber="0" isInline="0" fillRule="1" doOverprint="0" gXpos="0" gYpos="0" gWidth="364.2519685" gHeight="527.2440945" LAYER="0" BOOKMARK="0" NEXTITEM="-1" BACKITEM="-1">
                <trail/>
                <PageItemAttributes/>
            </PatternItem>
        </Pattern>

JLuc

2013-02-11 11:01

developer   ~0029827

close to 0011232

JLuc

2014-07-24 16:27

developer   ~0032962

Last edited: 2014-07-24 16:27

Still crashes as of today's version
Steps to reproduce :
- download P1 vide 2p nostyles notext nogabarititre.sla
- open scribus, create new file
- open Masterpage dialog, click "Open file" button
- choose "P1 vide 2p nostyles notext nogabarititre.sla", choose "normal left" (or "normal right" also), validate

Kunda

2014-07-24 20:23

updater   ~0032967

Confirmed crashes Signal 6
on OSX 10.8.5 1.5svn r19366

cbradney

2015-02-11 17:00

administrator   ~0034478

Assigning to Franz.. no idea what should be done here. A quick look at the code suggests to me that the pattern item is being loaded in master page mode or something else like the modes are wrong.

user5122

2015-11-04 09:11

  ~0037212

It seems the crash happens because ScribusDoc::itemAdd() is trying to retrieve the item page unconditionally from the regular pages list regardless of the kind of page it is coming from. This seems to have worked so far because usually there are more regular pages in the document than master pages, but here it raises an out of bounds assert in QList because there are more master pages than regular pages. I’m attaching page that fixes this crash and another one in file loaders exposed by fixing the first crash. I only tested 134 (the format of the attached document) and 150 formats, no idea how to test the rest.

user5122

2015-11-04 09:11

 

issue11409.diff (3,525 bytes)   
Index: scribus/plugins/fileloader/scribus134format/scribus134format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(revision 20526)
+++ scribus/plugins/fileloader/scribus134format/scribus134format.cpp	(working copy)
@@ -3240,9 +3240,9 @@
 			if (Mpage && (tagName != "MASTERPAGE"))
 				continue;
 			a = m_Doc->currentPage()->pageNr();
-			newPage = m_Doc->Pages->at(a);
 			if (Mpage)
 			{
+				newPage = m_Doc->MasterPages.at(a);
 				newPage->LeftPg = attrs.valueAsInt("LEFT", 0);
 				
 				if (!renamedPageName.isEmpty())
@@ -3250,6 +3250,8 @@
 				else
 					newPage->setPageName(attrs.valueAsString("NAM",""));
 			}
+			else
+				newPage = m_Doc->Pages->at(a);
 			if (attrs.hasAttribute("Size"))
 				newPage->m_pageSize = attrs.valueAsString("Size");
 			if (attrs.hasAttribute("Orientation"))
Index: scribus/plugins/fileloader/scribus13format/scribus13format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(revision 20526)
+++ scribus/plugins/fileloader/scribus13format/scribus13format.cpp	(working copy)
@@ -2191,7 +2191,6 @@
 			if (((pg.tagName()=="PAGE") || (pg.tagName()=="MASTERPAGE")) && (pg.attribute("NUM").toInt() == pageNumber))
 			{
 				a = m_Doc->currentPage()->pageNr();
-				Apage = m_Doc->Pages->at(a);
 				if ((pg.tagName()!="MASTERPAGE") && (Mpage))
 				{
 					PAGE=PAGE.nextSibling();
@@ -2199,6 +2198,7 @@
 				}
 				if (Mpage)
 				{
+					Apage = m_Doc->MasterPages.at(a);
 					Apage->LeftPg=pg.attribute("LEFT", "0").toInt();
 					
 					if (!renamedPageName.isEmpty())
@@ -2206,6 +2206,8 @@
 					else
 						Apage->setPageName(pg.attribute("NAM",""));
 				}
+				else
+					Apage = m_Doc->Pages->at(a);
 				if (pg.hasAttribute("Size"))
 					Apage->m_pageSize = pg.attribute("Size");
 				if (pg.hasAttribute("Orientation"))
Index: scribus/plugins/fileloader/scribus150format/scribus150format.cpp
===================================================================
--- scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(revision 20526)
+++ scribus/plugins/fileloader/scribus150format/scribus150format.cpp	(working copy)
@@ -5985,7 +5985,10 @@
 			if (Mpage && (tagName != "MASTERPAGE"))
 				continue;
 			a = m_Doc->currentPage()->pageNr();
-			newPage = m_Doc->Pages->at(a);
+			if (Mpage)
+				newPage = m_Doc->MasterPages.at(a);
+			else
+				newPage = m_Doc->Pages->at(a);
 			SimpleState *ss = NULL;
 			if (UndoManager::undoEnabled())
 			{
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(revision 20526)
+++ scribus/scribusdoc.cpp	(working copy)
@@ -5602,9 +5602,20 @@
 		is->set("CREATE_ITEM", "create_item");
 		is->setItem(newItem);
 		//Undo target rests with the Page for object specific undo
-		UndoObject *target = Pages->at(0);
-		if (newItem->OwnPage > -1)
-			target = Pages->at(newItem->OwnPage);
+		UndoObject *target;
+		if (newItem->OnMasterPage.isEmpty())
+		{
+			 target = Pages->at(0);
+			 if (newItem->OwnPage > -1)
+				 target = Pages->at(newItem->OwnPage);
+		}
+		else
+		{
+			target = MasterPages.at(0);
+			if (newItem->OwnPage > -1)
+				target = MasterPages.at(newItem->OwnPage);
+		}
+
 		undoManager->action(target, is);
 		//If the item is created "complete" (ie, not being created by drag/resize, commit to undomanager)
 		if (activeTransaction)
issue11409.diff (3,525 bytes)   

JLuc

2015-11-04 16:00

developer   ~0037222

Khaled, your analysis of why there is a crash is quite frightening. Wouldnt scribus crash more often when you are right ?

I tested the patch
it looks like this issue is fixed now
since i can now import the test file without crashing anymore.

Please have a look on patch and merge when possible.

ale

2015-11-05 10:22

manager   ~0037250

may i ask why importing a master page tries to read from a regular page that does not exist?
isn't the bug somewhere else?

user5122

2015-11-05 12:10

  ~0037255

That is the bug IIUC, the code in question doesn't distinguish between items belonging to regular or master pages.

Kunda

2015-11-10 15:55

updater   ~0037388

Devs, Please review patch

cbradney

2015-11-10 20:54

administrator   ~0037399

KhaledHosny - Pages is a pointer to the different pages list.. see setMasterPageMode()

cbradney

2015-11-10 21:28

administrator   ~0037404

The current patch doesn't make sense/is not consistent .. Pages should be used (as is currently), or MasterPages and DocPages. More important to understand is why Pages is not pointing to the correct list in the case identified, not to change the code first.

user5122

2015-11-11 06:15

  ~0037412

Thanks for the info, now things are a bit clearer.

Looking again, the crash is traced back to Scribus134Format::readObject() when reading a PatternItem tag, and the code in this function explicitly sets master page mode to false in this case (scribus/plugins/fileloader/scribus134format/scribus134format.cpp:1870), this was introduced by jghali in r13888 with the commit message “fix loading of file with broken pattern”.

If I comment the check for PatternItem this crash will go away, but it will crash again in Scribus134Format::loadPage() which does not set master page mode at all.

jghali

2015-11-19 22:29

administrator   ~0037554

Last edited: 2015-11-20 09:27

I fixed the issue and it was somewhat complex. There is some preparation in commits r20557 and r20561. Then the fix comes in r20563. The problems was that pattern items were assigned properties coming from masterpage when being created. Which is wrong as those items' OwnPage must be -1 and they can't belong to a masterpage.

Kunda

2015-12-05 00:48

updater   ~0037819

Issue seems fixed. Thank you for all that participated.
Closing

Issue History

Date Modified Username Field Change
2013-02-02 19:48 JLuc New Issue
2013-02-02 19:48 JLuc Tag Attached: import
2013-02-02 19:48 JLuc Tag Attached: crash
2013-02-02 19:48 JLuc Tag Attached: masterpage
2013-02-02 19:49 JLuc File Added: P1 vide.sla
2013-02-06 21:47 jghali Target Version => 1.5.0svn
2013-02-06 21:53 jghali Target Version 1.5.0svn => 1.5.0
2013-02-08 22:29 JLuc File Added: P1 vide 2p nostyles notext nogabarititre.sla
2013-02-08 22:29 JLuc File Deleted: P1 vide.sla
2013-02-08 22:33 JLuc Note Added: 0029805
2013-02-08 22:33 JLuc Note Edited: 0029805
2013-02-09 06:31 christoph_s Status new => confirmed
2013-02-09 08:20 JLuc Note Edited: 0029805
2013-02-11 11:01 JLuc Note Added: 0029827
2014-07-22 05:49 Kunda Relationship added related to 0011232
2014-07-24 16:27 JLuc Note Added: 0032962
2014-07-24 16:27 JLuc Note Edited: 0032962
2014-07-24 20:23 Kunda Note Added: 0032967
2014-07-24 20:23 Kunda Severity trivial => crash
2014-09-11 02:34 Kunda Severity crash => block
2014-10-08 23:12 Kunda Tag Detached: crash
2014-10-13 16:02 Kunda Tag Detached: import
2014-10-30 13:28 Kunda Sticky Issue No => Yes
2015-02-11 17:00 cbradney Note Added: 0034478
2015-02-18 21:20 JLuc Relationship added related to 0003837
2015-05-19 20:56 cbradney Target Version 1.5.0 => 1.5.1
2015-11-04 09:11 user5122 Note Added: 0037212
2015-11-04 09:11 user5122 File Added: issue11409.diff
2015-11-04 09:13 user5122 Tag Attached: HOST-Oman
2015-11-04 11:49 Kunda Patch => Yes
2015-11-04 11:49 Kunda Summary crash while importing masterpage, with gdb backtrace => [Patch] crash while importing masterpage, with gdb backtrace
2015-11-04 15:53 JLuc Description Updated
2015-11-04 16:00 JLuc Note Added: 0037222
2015-11-04 16:01 JLuc Tag Attached: patch_tested_ok
2015-11-05 10:22 ale Note Added: 0037250
2015-11-05 12:10 user5122 Note Added: 0037255
2015-11-10 15:55 Kunda Note Added: 0037388
2015-11-10 20:54 cbradney Note Added: 0037399
2015-11-10 21:28 cbradney Note Added: 0037404
2015-11-11 06:15 user5122 Note Added: 0037412
2015-11-19 22:20 jghali Summary [Patch] crash while importing masterpage, with gdb backtrace => crash while importing masterpage, with gdb backtrace
2015-11-19 22:29 jghali Note Added: 0037554
2015-11-19 22:29 jghali Status confirmed => resolved
2015-11-19 22:29 jghali Fixed in Version => 1.5.1svn
2015-11-19 22:29 jghali Resolution open => fixed
2015-11-19 22:29 jghali Assigned To => jghali
2015-11-19 22:31 jghali Sticky Issue Yes => No
2015-11-20 09:27 jghali Note Edited: 0037554
2015-12-05 00:48 Kunda Note Added: 0037819
2015-12-05 00:48 Kunda Status resolved => closed