View Issue Details

IDProjectCategoryView StatusLast Update
0012596ScribusUndo/Redopublic2026-08-28 04:26
ReporterFirasH Assigned To 
PrioritynormalSeveritymajorReproducibilityalways
Status confirmedResolutionopen 
Platformx86_64OSFreeBSDOS Version10.0
Product Version1.5.0svn 
Target Version1.5.5 
Summary0012596: Using Undo/Redo while Story Editor is opened might crash Scribus
DescriptionUsing Undo/Redo while Story Editor is opened might crash Scribus
Steps To Reproduce0) Create a new document
1) Insert a Text Frame
2) Select the Text Frame and open the Story Editor
3) Go to: Item > Duplicate/Transform > Transform
     Add > Scaling > OK (not needed to edit transformation settings)
4) Undo (2 times > click OK)
5) Redo (2 times)
6) Close the document

Scribus crashes due to Signal 6
Additional Information1.5.0.svn (19415)


Program received signal SIGABRT, Aborted.
[Switching to Thread 814c06400 (LWP 100357/scribus)]
0x0000000809b37e1a in kill () from /lib/libc.so.7
(gdb) bt
 0 0x0000000809b37e1a in kill ()
   from /lib/libc.so.7
 1 0x0000000809b36ac9 in abort ()
   from /lib/libc.so.7
 2 0x00000008093be8e9 in __cxa_pure_virtual ()
   from /lib/libcxxrt.so.1
 3 0x000000080241d08a in QObject::~QObject ()
   from /usr/local/lib/libQt5Core.so.5
 4 0x000000080241c94e in QObject::~QObject ()
   from /usr/local/lib/libQt5Core.so.5
 5 0x0000000000e1bef2 in ~ScribusDoc (this=0x8252e1000)
    at /home/.../Scribus/scribus/scribusdoc.cpp:719
 6 0x0000000000e1a7e8 in ~ScribusDoc (this=0x8252e1000)
    at /home/.../Scribus/scribus/scribusdoc.cpp:608
 7 0x0000000000dbbe96 in ScribusMainWindow::DoFileClose (this=0x814c08c00)
    at /home/.../Scribus/scribus/scribus.cpp:4763
 8 0x0000000000f06bba in ScribusWin::closeEvent (this=0x81705eb60,
    ce=0x7fffffffba88)
    at /home/.../Scribus/scribus/scribuswin.cpp:95
 9 0x00000008029b94c2 in QWidget::event ()
   from /usr/local/lib/libQt5Widgets.so.5
 10 0x0000000802aa3750 in QMainWindow::event ()
   from /usr/local/lib/libQt5Widgets.so.5
 11 0x00000008029831a7 in QApplicationPrivate::notify_helper ()
   from /usr/local/lib/libQt5Widgets.so.5
 12 0x0000000802985c0c in QApplication::notify ()
   from /usr/local/lib/libQt5Widgets.so.5
 13 0x00000008023f4ac2 in QCoreApplication::notifyInternal ()
   from /usr/local/lib/libQt5Core.so.5
 14 0x00000008029ab800 in QWidgetPrivate::close_helper ()
   from /usr/local/lib/libQt5Widgets.so.5
 15 0x00000008029b8172 in QWidget::close ()
   from /usr/local/lib/libQt5Widgets.so.5
 16 0x0000000802abe58a in QMdiSubWindow::closeEvent ()
   from /usr/local/lib/libQt5Widgets.so.5
 17 0x00000008029b94c2 in QWidget::event ()
   from /usr/local/lib/libQt5Widgets.so.5
 18 0x0000000802abe2f3 in QMdiSubWindow::event ()
   from /usr/local/lib/libQt5Widgets.so.5
 19 0x00000008029831a7 in QApplicationPrivate::notify_helper ()
   from /usr/local/lib/libQt5Widgets.so.5
 20 0x0000000802985c0c in QApplication::notify ()
   from /usr/local/lib/libQt5Widgets.so.5
 21 0x00000008023f4ac2 in QCoreApplication::notifyInternal ()
   from /usr/local/lib/libQt5Core.so.5
 22 0x00000008029ab800 in QWidgetPrivate::close_helper ()
   from /usr/local/lib/libQt5Widgets.so.5
 23 0x00000008029b8172 in QWidget::close ()
   from /usr/local/lib/libQt5Widgets.so.5
 24 0x0000000000db961e in ScribusMainWindow::slotFileClose (this=0x814c08c00)
    at /home/.../Scribus/scribus/scribus.cpp:4683
 25 0x0000000000737054 in ScribusMainWindow::qt_static_metacall (
    _o=0x814c08c00, _c=QMetaObject::InvokeMetaMethod, _id=85,
    _a=0x7fffffffc6d0)
    at /home/.../Scribus/build/scribus/moc_scribus.cpp:1050
 26 0x0000000802424827 in QMetaObject::activate ()
   from /usr/local/lib/libQt5Core.so.5
 27 0x000000080297b9cf in QAction::activate ()
   from /usr/local/lib/libQt5Widgets.so.5
 28 0x0000000802a49dac in QAbstractButton::isCheckable ()
   from /usr/local/lib/libQt5Widgets.so.5
 29 0x0000000802a4ae50 in QAbstractButton::mouseReleaseEvent ()
   from /usr/local/lib/libQt5Widgets.so.5
 30 0x0000000802b038cf in QToolButton::mouseReleaseEvent ()
   from /usr/local/lib/libQt5Widgets.so.5
 31 0x00000008029b9281 in QWidget::event ()
   from /usr/local/lib/libQt5Widgets.so.5
 32 0x0000000802a4abb3 in QAbstractButton::event ()
   from /usr/local/lib/libQt5Widgets.so.5
 33 0x0000000802b03e0e in QToolButton::event ()
   from /usr/local/lib/libQt5Widgets.so.5
 34 0x00000008029831a7 in QApplicationPrivate::notify_helper ()
   from /usr/local/lib/libQt5Widgets.so.5
 35 0x0000000802986018 in QApplication::notify ()
   from /usr/local/lib/libQt5Widgets.so.5
 36 0x00000008023f4ac2 in QCoreApplication::notifyInternal ()
   from /usr/local/lib/libQt5Core.so.5
 37 0x0000000802983b45 in QApplicationPrivate::sendMouseEvent ()
   from /usr/local/lib/libQt5Widgets.so.5
 38 0x00000008029d5aca in QWidgetPrivate::setModal_sys ()
   from /usr/local/lib/libQt5Widgets.so.5
 39 0x00000008029d4dff in QWidgetPrivate::setModal_sys ()
   from /usr/local/lib/libQt5Widgets.so.5
 40 0x00000008029831a7 in QApplicationPrivate::notify_helper ()
   from /usr/local/lib/libQt5Widgets.so.5
 41 0x0000000802985c0c in QApplication::notify ()
   from /usr/local/lib/libQt5Widgets.so.5
 42 0x00000008023f4ac2 in QCoreApplication::notifyInternal ()
   from /usr/local/lib/libQt5Core.so.5
 43 0x00000008030d48f7 in QGuiApplicationPrivate::processMouseEvent ()
   from /usr/local/lib/libQt5Gui.so.5
 44 0x00000008030d3c41 in QGuiApplicationPrivate::processWindowSystemEvent ()
   from /usr/local/lib/libQt5Gui.so.5
 45 0x00000008030c4b58 in QWindowSystemInterface::sendWindowSystemEvents ()
   from /usr/local/lib/libQt5Gui.so.5
 46 0x00000008145226f0 in qt_plugin_instance ()
   from /usr/local/lib/qt5/plugins/platforms/libqxcb.so
 47 0x000000080bc92702 in g_main_context_dispatch ()
   from /usr/local/lib/libglib-2.0.so.0
 48 0x000000080bc92aa3 in g_main_context_pending ()
   from /usr/local/lib/libglib-2.0.so.0
 49 0x000000080bc92b34 in g_main_context_iteration ()
   from /usr/local/lib/libglib-2.0.so.0
 50 0x0000000802442e58 in QEventDispatcherGlib::processEvents ()
   from /usr/local/lib/libQt5Core.so.5
 51 0x000000081452269c in qt_plugin_instance ()
   from /usr/local/lib/qt5/plugins/platforms/libqxcb.so
 52 0x00000008023f245e in QEventLoop::exec ()
   from /usr/local/lib/libQt5Core.so.5
 53 0x00000008023f5072 in QCoreApplication::exec ()
   from /usr/local/lib/libQt5Core.so.5
 54 0x00000000014bfe2b in mainApp (argc=1, argv=0x7fffffffd908)
    at main_nix.cpp:86
 55 0x00000000014bfd72 in main (argc=1, argv=0x7fffffffd908)
    at main_nix.cpp:54
Tags#please_test
PatchNo

Relationships

child of 0012500 acknowledged Metabug: Undo/Redo (1.5.x.svn) 

Activities

Kunda

2014-08-10 13:50

updater   ~0033223

Reproducible on OSX 10.8.5 1.5svn r19415

FirasH

2014-08-10 16:24

reporter   ~0033226

Reduced steps:
0) Create a new document
1) Insert a Text Frame
2) Select the Text Frame and open the Story Editor
3) Undo once (click OK)
4) Redo once
5) Close the document

Scribus crashes due to Signal 6

FirasH

2014-08-12 13:39

reporter   ~0033236

1.4.5.svn (19402) crashes due to Signal 11.

Kunda

2015-04-07 21:42

updater   ~0034844

re-categorized as Undo/Redo

qirat

2026-08-28 04:26

reporter   ~0054352

I can reproduce it on r27785. Patch attached (with a new bt).

#Cause:
Undo of the text-frame creation was blocked because Story Editor still referenced the frame, but the Undo stack still advanced. Redo then re-added the same PageItem*, leaving a duplicate pointer in DocItems and causing a crash when the document was destroyed.

#Fix:
During Undo/Redo, detach Story Editor from the affected frame instead of cancelling the deletion.

#Rationale:
Keeps the document state consistent with the Undo stack, preserves normal protection against deleting an in-use Story Editor frame, and fixes the source of the duplicate pointer rather than masking the close-time crash.
bt-new-undo-redo.txt (1,952 bytes)   
(gdb) bt
#0  0x0000000000000000 in ??? ()
#1  0x00000000011c5ea3 in ScribusDoc::~ScribusDoc (this=0x5e7d000)
    at /home/M/x/1_src/scribus/scribusdoc.cpp:598
#2  0x00000000011c69c6 in ScribusDoc::~ScribusDoc (this=0x5e7d000)
    at /home/M/x/1_src/scribus/scribusdoc.cpp:638
#3  0x0000000001166ea8 in ScribusMainWindow::DoFileClose (this=0x2139680)
    at /home/M/x/1_src/scribus/scribus.cpp:4270
#4  0x00000000012c821e in ScribusWin::closeEvent (this=0x3302450, ce=0x7fffffffc9c0)
    at /home/M/x/1_src/scribus/scribuswin.cpp:85
#5  0x00007ffff56b0778 in QWidget::event (this=0x3302450, event=0x7fffffffc9c0)
    at /usr/src/debug/qt6-qtbase-6.11.1-1.fc44.x86_64/src/widgets/kernel/qwidget.cpp:9408
#6  0x00007ffff563f92e in QApplicationPrivate::notify_helper
    (this=<optimized out>, receiver=0x3302450, e=0x7fffffffc9c0)
    at /usr/src/debug/qt6-qtbase-6.11.1-1.fc44.x86_64/src/widgets/kernel/qapplication.cpp:3276
#7  0x00007ffff430f7b8 in QCoreApplication::notifyInternal2 (receiver=0x3302450, event=0x7fffffffc9c0)
    at /usr/src/debug/qt6-qtbase-6.11.1-1.fc44.x86_64/src/corelib/kernel/qcoreapplication.cpp:1114
#8  0x00007ffff430f7fd in QCoreApplication::sendEvent (receiver=<optimized out>, event=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.11.1-1.fc44.x86_64/src/corelib/kernel/qcoreapplication.cpp:1559
#9  0x00007ffff56aa271 in QWidgetPrivate::handleClose
    (this=0x4729210, mode=mode@entry=QWidgetPrivate::CloseWithEvent)
    at /usr/src/debug/qt6-qtbase-6.11.1-1.fc44.x86_64/src/widgets/kernel/qwidget.cpp:8625
#10 0x00007ffff56aa4e8 in QWidgetPrivate::close (this=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.11.1-1.fc44.x86_64/src/widgets/kernel/qwidget.cpp:8689
#11 0x00007ffff56aad3d in QWidget::close (this=<optimized out>)
    at /usr/src/debug/qt6-qtbase-6.11.1-1.fc44.x86_64/src/widgets/kernel/qwidget.cpp:8671
#12 0x00007ffff5865f9f in QMdiSubWindow::closeEvent (this=0x2f1df10, closeEvent=0x7fffffffccb0)
bt-new-undo-redo.txt (1,952 bytes)   
story-editor-undo-redo-crash-v1.0.patch (584 bytes)   
Index: scribus/scribusdoc.cpp
===================================================================
--- scribus/scribusdoc.cpp	(revision 27785)
+++ scribus/scribusdoc.cpp	(working copy)
@@ -12014,7 +12014,7 @@
 		//CB FIXME remove this and include of storyeditor.h too
 		if ((currItem->isTextFrame() || currItem->isPathText()) && currItem == m_ScMW->storyEditor->currentItem() && this == m_ScMW->storyEditor->currentDocument())
 		{
-			if (forceDeletion)
+			if (forceDeletion || isUndoRedoOngoing())
 				m_ScMW->storyEditor->setCurrentDocumentAndItem(this, nullptr);
 			else
 			{

Issue History

Date Modified Username Field Change
2014-08-10 11:56 FirasH New Issue
2014-08-10 11:57 FirasH OS Version 10.0.2 => 10.0
2014-08-10 13:50 Kunda Note Added: 0033223
2014-08-10 13:50 Kunda Status new => confirmed
2014-08-10 13:50 Kunda Target Version => 1.5.0
2014-08-10 16:24 FirasH Note Added: 0033226
2014-08-10 16:26 FirasH Summary Using Transform while Story Editor is opened might crash Scribus => Using Undo/Redo while Story Editor is opened might crash Scribus
2014-08-10 16:26 FirasH Description Updated
2014-08-10 16:26 FirasH Relationship added child of 0012500
2014-08-12 13:39 FirasH Note Added: 0033236
2014-09-11 02:34 Kunda Severity crash => block
2015-04-07 21:42 Kunda Patch => No
2015-04-07 21:42 Kunda Note Added: 0034844
2015-04-07 21:42 Kunda Category Story Editor / Text Frames => Undo/Redo
2015-05-19 20:56 cbradney Target Version 1.5.0 => 1.5.1
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
2016-12-29 23:43 plinnell Severity block => major
2026-08-28 04:26 qirat Note Added: 0054352
2026-08-28 04:26 qirat File Added: bt-new-undo-redo.txt
2026-08-28 04:26 qirat File Added: story-editor-undo-redo-crash-v1.0.patch
2026-08-28 04:26 qirat Tag Attached: #please_test