View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0013286 | Scribus | Undo/Redo | public | 2015-08-10 16:20 | 2016-12-08 21:30 |
Reporter | FirasH | Assigned To | |||
Priority | normal | Severity | crash | Reproducibility | always |
Status | confirmed | Resolution | open | ||
Platform | x86_64 | OS | openSUSE | OS Version | 13.2 |
Product Version | 1.5.1svn | ||||
Target Version | 1.5.5 | ||||
Summary | 0013286: [PATCH] Undo/Redo used with Symbol conversion might cause crash on document closing | ||||
Description | Undo/Redo used with Symbol convertion might cause crash on document closing. | ||||
Steps To Reproduce | 0) Create a new document and open Windows > Properties/Symbols 1) Insert a Polygon 2) Select the Polygon and Item > Convert to > Symbol (> OK) 3) Undo once 4) Redo once Now a new Polygon symbol is added in the upper part of the canvas. 5) Close the document Scribus crashes due to Signal 11 | ||||
Additional Information | 1.5.1.svn (20305) Testing on 0.10.5 1.5.1svn r20478 gives the following results: Step 3 does not undo correctly Step 4 does not place a "new Polygon symbol is added in the upper part of the canvas" Step 5 does crash Added backtrace | ||||
Tags | HOST-Oman | ||||
Patch | Yes | ||||
related to | 0012299 | confirmed | Undo/Redo is not able to handle changes to Symbols | |
related to | 0011365 | confirmed | Convert to Symbol is not recorded by Action History correctly which leads to Crash | |
related to | 0004959 | closed | Tsoots | add objects as patterns creates three internal undo actions |
child of | 0012500 | acknowledged | Metabug: Undo/Redo (1.5.x.svn) |
|
Step 3 does not undo correctly Step 4 does not place a "new Polygon symbol is added in the upper part of the canvas" Step 5 does crash Added backtrace |
|
bt.txt (5,168 bytes)
QPixmap::scaled: Pixmap is a null pixmap QPainter::end: Painter not active, aborted libc++abi.dylib: Pure virtual function called! Process 32972 stopped * thread #1: tid = 0x461ec, 0x00007fff98247286 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT frame #0: 0x00007fff98247286 libsystem_kernel.dylib`__pthread_kill + 10 libsystem_kernel.dylib`__pthread_kill: -> 0x7fff98247286 <+10>: jae 0x7fff98247290 ; <+20> 0x7fff98247288 <+12>: movq %rax, %rdi 0x7fff9824728b <+15>: jmp 0x7fff98242c53 ; cerror_nocancel 0x7fff98247290 <+20>: retq (lldb) bt * thread #1: tid = 0x461ec, 0x00007fff98247286 libsystem_kernel.dylib`__pthread_kill + 10, queue = 'com.apple.main-thread', stop reason = signal SIGABRT * frame #0: 0x00007fff98247286 libsystem_kernel.dylib`__pthread_kill + 10 frame #1: 0x00007fff90ef79f9 libsystem_pthread.dylib`pthread_kill + 90 frame #2: 0x00007fff8ebe39b3 libsystem_c.dylib`abort + 129 frame #3: 0x00007fff93b1ba21 libc++abi.dylib`abort_message + 257 frame #4: 0x00007fff93b4242f libc++abi.dylib`__cxa_pure_virtual + 18 frame #5: 0x00000001037c2bb7 QtCore`QObject::~QObject() + 1863 frame #6: 0x00000001037c32ae QtCore`QObject::~QObject() + 14 frame #7: 0x00000001003e38cb Scribus`ScribusDoc::~ScribusDoc() + 2773 frame #8: 0x00000001003e49a1 Scribus`ScribusDoc::~ScribusDoc() + 15 frame #9: 0x00000001003b37d0 Scribus`ScribusMainWindow::DoFileClose() + 1190 frame #10: 0x000000010046713b Scribus`ScribusWin::closeEvent(QCloseEvent*) + 419 frame #11: 0x000000010237fd93 QtWidgets`QWidget::event(QEvent*) + 2243 frame #12: 0x0000000102485fa7 QtWidgets`QMainWindow::event(QEvent*) + 1751 frame #13: 0x0000000102341b3b QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 251 frame #14: 0x000000010234449e QtWidgets`QApplication::notify(QObject*, QEvent*) + 5630 frame #15: 0x000000010379a843 QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 115 frame #16: 0x000000010236fc0c QtWidgets`QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) + 204 frame #17: 0x00000001024a45ca QtWidgets`QMdiSubWindow::closeEvent(QCloseEvent*) + 58 frame #18: 0x000000010237fd93 QtWidgets`QWidget::event(QEvent*) + 2243 frame #19: 0x00000001024a4176 QtWidgets`QMdiSubWindow::event(QEvent*) + 2230 frame #20: 0x0000000102341b3b QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 251 frame #21: 0x000000010234449e QtWidgets`QApplication::notify(QObject*, QEvent*) + 5630 frame #22: 0x000000010379a843 QtCore`QCoreApplication::notifyInternal(QObject*, QEvent*) + 115 frame #23: 0x000000010236fc0c QtWidgets`QWidgetPrivate::close_helper(QWidgetPrivate::CloseMode) + 204 frame #24: 0x00000001003b21cb Scribus`ScribusMainWindow::slotFileClose() + 29 frame #25: 0x000000010001548f Scribus`ScribusMainWindow::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) + 3339 frame #26: 0x00000001037cab7c QtCore`QMetaObject::activate(QObject*, int, int, void**) + 2988 frame #27: 0x0000000102338c20 QtWidgets`QAction::activate(QAction::ActionEvent) + 288 frame #28: 0x00000001037cab7c QtCore`QMetaObject::activate(QObject*, int, int, void**) + 2988 frame #29: 0x00000001037c357c QtCore`QObject::event(QEvent*) + 156 frame #30: 0x0000000102341b3b QtWidgets`QApplicationPrivate::notify_helper(QObject*, QEvent*) + 251 frame #31: 0x000000010234449e QtWidgets`QApplication::notify(QObject*, QEvent*) + 5630 frame #32: 0x000000010379b562 QtCore`QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) + 1058 frame #33: 0x000000010536d27e libqcocoa.dylib`QCocoaEventDispatcherPrivate::processPostedEvents() + 190 frame #34: 0x000000010536db01 libqcocoa.dylib`QCocoaEventDispatcherPrivate::postedEventsSourceCallback(void*) + 33 frame #35: 0x00007fff95934a01 CoreFoundation`__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17 frame #36: 0x00007fff95926b8d CoreFoundation`__CFRunLoopDoSources0 + 269 frame #37: 0x00007fff959261bf CoreFoundation`__CFRunLoopRun + 927 frame #38: 0x00007fff95925bd8 CoreFoundation`CFRunLoopRunSpecific + 296 frame #39: 0x00007fff967b656f HIToolbox`RunCurrentEventLoopInMode + 235 frame #40: 0x00007fff967b61ee HIToolbox`ReceiveNextEventCommon + 179 frame #41: 0x00007fff967b612b HIToolbox`_BlockUntilNextEventMatchingListInModeWithFilter + 71 frame #42: 0x00007fff945f18ab AppKit`_DPSNextEvent + 978 frame #43: 0x00007fff945f0e58 AppKit`-[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346 frame #44: 0x00007fff945e6af3 AppKit`-[NSApplication run] + 594 frame #45: 0x000000010536ca4f libqcocoa.dylib`QCocoaEventDispatcher::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) + 2191 frame #46: 0x0000000103797f7c QtCore`QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) + 412 frame #47: 0x000000010379ade5 QtCore`QCoreApplication::exec() + 341 frame #48: 0x00000001007dfad9 Scribus`mainApp(int, char**) + 90 frame #49: 0x00007fff971c15c9 libdyld.dylib`start + 1 |
|
Watfa, thanks for the feedback. What do you mean by: "I try it again an it was work" You are able to reproduce the crash or that you fixed it? Also it is good practice to offer what version and revision of scribus you are running. For example: Confirmed on 1.5.1svn r20437 Thanks |
|
Watfa, it is not recommended to edit a previous part of the thread. It breaks p the thread and doesn't make sense unless know you specifically add something like: Edit: actually I retested and cannot reproduce now Use html < del > and bold to make it stand out. |
|
Watfa, Everything I wrote in 0013286:0036520 still occurs What OS platform, Scribus version, and Scribus revision are you testing on? Mine is 10.10.5 1.5.1svn r20478 |
|
I find this solution but I am not sure if is correct! But it work now with out crash. scribus 1.5.1svn r20484 plz look for my patch! |
|
watfa, Scribus 1.5.1svn trunk is currently at r20484 (See http://scribus.net/websvn/log.php?repname=Scribus&path=%2F&isdir=1&) Where you are you getting r12400 from ? |
|
issue13286.patch (470 bytes)
Index: scribus/scribus.cpp =================================================================== --- scribus/scribus.cpp (revision 20478) +++ scribus/scribus.cpp (working copy) @@ -9125,7 +9125,7 @@ if (!dia.exec()) return; patternName = dia.getEditText(); - undoManager->setUndoEnabled(false); + undoManager->setUndoEnabled(true); doc->itemSelection_convertItemsToSymbol(patternName); propertiesPalette->updateColorList(); symbolPalette->updateSymbolList(); |
|
I just finished solve this issue. please test my patch |
|
hi wafta! thanks for the patch! personally, i wonder why the original programmer did set the disabled here the undo... what was the reason for it? your patch is too simple to be false^w oops true... :-) it's very likely that it solves the issue reported by firash, but there is a risk that it leads to other bugs. how can we know if we don't try? (or if the original programmer speaks up / adds a comment on the rationals behind his code :-) anyway, if not further information is made available (and added as a comment to the scribus source code) i guess that this patch should be accepted. |
|
I did some time travell and archeological searchs for the origin of this disabling. Various people have been involved in this part of code and enforced this disabling - MrB in r19894 - Franz in r12172 or r12173 and the search ended with revision 7797 (3213 days ago) http://scribus.net/websvn/comp.php?manualorder=1&repname=Scribus&compare[0]=%2F&compare_rev[0]=7796&comparesubmit=Compare+Paths&compare[1]=%2F&compare_rev[1]=7797 That commiter tsoots commented with the very sober log : "0004959" whose issue is labeled "add objects as patterns creates three internal undo actions but undoing does not undo the pattern creation." The concluding test-after-fix seemed very satisfying : "tested.fixed." Does it help sort out the reason for this disabling ? |
|
The patch is indeed too simple to be correct. I should be rather qualified as a workaround than a fix. It even introduce another issue: if user had undo disabled, this patch would enable it. Not good... This crash is likely caused by a memory management issue somewhere. So this is maybe not an "easy hack". |
|
Watfa, are you still planning to tackle this bug based on jghali's feedback ? |
Date Modified | Username | Field | Change |
---|---|---|---|
2015-08-10 16:20 | FirasH | New Issue | |
2015-08-10 16:20 | FirasH | Relationship added | child of 0012500 |
2015-08-10 16:20 | FirasH | Relationship added | related to 0012299 |
2015-08-10 16:20 | FirasH | Relationship added | related to 0011365 |
2015-10-05 00:56 | Kunda | Note Added: 0036520 | |
2015-10-05 00:57 | Kunda | File Added: bt.txt | |
2015-10-05 00:57 | Kunda | Status | new => confirmed |
2015-10-05 00:57 | Kunda | Target Version | => 1.5.1 |
2015-10-20 12:56 | Kunda | Note Added: 0036732 | |
2015-10-21 13:04 | Kunda | Note Added: 0036778 | |
2015-10-21 13:05 | Kunda | Note Edited: 0036778 | |
2015-10-21 13:05 | Kunda | Note Edited: 0036778 | |
2015-10-21 13:10 | Kunda | Note Added: 0036779 | |
2015-10-21 13:11 | Kunda | Additional Information Updated | |
2015-10-22 10:33 | watfa albadi | File Added: issue13286.patch | |
2015-10-22 10:38 | watfa albadi | Note Added: 0036811 | |
2015-10-22 17:11 | Kunda | Note Added: 0036835 | |
2015-10-25 06:28 | watfa albadi | Note Edited: 0036811 | |
2015-10-25 13:42 |
|
Tag Attached: HOST-Oman | |
2015-10-26 05:06 | watfa albadi | File Deleted: issue13286.patch | |
2015-10-26 05:06 | watfa albadi | File Added: issue13286.patch | |
2015-10-26 05:08 | watfa albadi | Note Added: 0036934 | |
2015-10-26 05:55 | ale | Summary | Undo/Redo used with Symbol convertion might cause crash on document closing => [PATCH] Undo/Redo used with Symbol convertion might cause crash on document closing |
2015-10-26 06:03 | ale | Note Added: 0036938 | |
2015-10-26 19:07 | JLuc | Patch | No => Yes |
2015-10-26 19:35 | JLuc | Note Added: 0036950 | |
2015-10-26 19:36 | JLuc | Note Edited: 0036950 | |
2015-10-26 19:37 | JLuc | Note Edited: 0036950 | |
2015-10-26 19:38 | JLuc | Relationship added | related to 0004959 |
2015-10-26 22:21 | jghali | Note Added: 0036957 | |
2015-11-03 15:45 | Kunda | Note Added: 0037191 | |
2015-11-03 15:45 | Kunda | Summary | [PATCH] Undo/Redo used with Symbol convertion might cause crash on document closing => [PATCH] Undo/Redo used with Symbol conversion might cause crash on document closing |
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 |