Bug 312318 - Undo of bullet list style changes crash Calligra Words
Summary: Undo of bullet list style changes crash Calligra Words
Status: RESOLVED FIXED
Alias: None
Product: calligrawords
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Calligra Words Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-12-28 20:42 UTC by Yasin Zähringer
Modified: 2013-04-14 13:24 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
New crash information added by DrKonqi (11.08 KB, text/plain)
2013-01-13 06:23 UTC, spam_detect
Details
New crash information added by DrKonqi (4.99 KB, text/plain)
2013-04-14 13:24 UTC, MartinB
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yasin Zähringer 2012-12-28 20:42:08 UTC
Application: calligrawords (2.6 RC2)
KDE Platform Version: 4.9.95
Qt Version: 4.8.3
Operating System: Linux 3.5.0-21-generic x86_64
Distribution: Ubuntu 12.10

-- Information about the crash:
- What I was doing when the application crashed:
I open a file with a nested list and change some text. (Without this I am unable to use undo.) I select the nested list and repeatedly click on the "Bullet list" button on the right to select different styles. Undoing these changes crashes Calligra.
A note on reproducibility: I was not yet able to reproduce this crash without saving the file.

- Unusual behavior I noticed:
Selecting a new style flattens the list. Furthermore, a style is not applied immediately. You have to select it a few times until it is applied. And, as mentioned above, I am unable to undo a bullet list style change if this is the only change in the document.

The crash can be reproduced some of the time.

-- Backtrace:
Application: Calligra Words (calligrawords), signal: Segmentation fault
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f67c6e98780 (LWP 4371))]

Thread 2 (Thread 0x7f67a4293700 (LWP 4377)):
#0  __pthread_mutex_lock (mutex=0x7f679c19a290) at pthread_mutex_lock.c:50
#1  0x00007f67c09a9e21 in g_mutex_lock () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#2  0x00007f67c096c897 in g_main_context_check () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#3  0x00007f67c096cd22 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#4  0x00007f67c096cea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#5  0x00007f67c4e40c16 in QEventDispatcherGlib::processEvents (this=0x7f679c199dc0, flags=...) at kernel/qeventdispatcher_glib.cpp:426
#6  0x00007f67c4e112bf in QEventLoop::processEvents (this=this@entry=0x7f67a4292dd0, flags=...) at kernel/qeventloop.cpp:149
#7  0x00007f67c4e11548 in QEventLoop::exec (this=0x7f67a4292dd0, flags=...) at kernel/qeventloop.cpp:204
#8  0x00007f67c4d12b10 in QThread::exec (this=<optimized out>) at thread/qthread.cpp:501
#9  0x00007f67c4df19af in QInotifyFileSystemWatcherEngine::run (this=0x41fde60) at io/qfilesystemwatcher_inotify.cpp:248
#10 0x00007f67c4d15aec in QThreadPrivate::start (arg=0x41fde60) at thread/qthread_unix.cpp:338
#11 0x00007f67c0e3be9a in start_thread (arg=0x7f67a4293700) at pthread_create.c:308
#12 0x00007f67c679dcbd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:112
#13 0x0000000000000000 in ?? ()

Thread 1 (Thread 0x7f67c6e98780 (LWP 4371)):
[KCrash Handler]
#6  size (this=<error reading variable: Cannot access memory at address 0x8>) at ../../include/QtCore/../../src/corelib/tools/qlist.h:98
#7  count (this=<error reading variable: Cannot access memory at address 0x8>) at ../../include/QtCore/../../src/corelib/tools/qlist.h:280
#8  QTextList::count (this=0x0) at text/qtextlist.cpp:136
#9  0x00007f67c308e8ac in ChangeListCommand::undo (this=0x352e9d0) at /build/buildd/calligra-2.5.93/libs/kotext/commands/ChangeListCommand.cpp:306
#10 0x00007f67c20682ce in KUndo2QStack::undo (this=0x4f3abe0) at /build/buildd/calligra-2.5.93/libs/kundo2/kundo2stack.cpp:683
#11 0x00007f67c4e27f5f in QMetaObject::activate (sender=0x3000e50, m=<optimized out>, local_signal_index=<optimized out>, argv=0x7fff28ed7a70) at kernel/qobject.cpp:3547
#12 0x00007f67c57eea32 in QAction::triggered (this=this@entry=0x3000e50, _t1=false) at .moc/release-shared/moc_qaction.cpp:277
#13 0x00007f67c57eec20 in QAction::activate (this=0x3000e50, event=event@entry=QAction::Trigger) at kernel/qaction.cpp:1257
#14 0x00007f67c57eed87 in QAction::event (this=<optimized out>, e=<optimized out>) at kernel/qaction.cpp:1183
#15 0x00007f67c1b66b47 in KAction::event (this=<optimized out>, event=0x7fff28ed8020) at ../../kdeui/actions/kaction.cpp:131
#16 0x00007f67c57f4e9c in QApplicationPrivate::notify_helper (this=this@entry=0x20d0cc0, receiver=receiver@entry=0x3000e50, e=e@entry=0x7fff28ed8020) at kernel/qapplication.cpp:4562
#17 0x00007f67c57f930a in QApplication::notify (this=0x7fff28ed9490, receiver=0x3000e50, e=0x7fff28ed8020) at kernel/qapplication.cpp:4423
#18 0x00007f67c6347af8 in KoApplication::notify (this=<optimized out>, receiver=0x3000e50, event=0x7fff28ed8020) at /build/buildd/calligra-2.5.93/libs/main/KoApplication.cpp:504
#19 0x00007f67c4e1256e in QCoreApplication::notifyInternal (this=0x7fff28ed9490, receiver=0x3000e50, event=0x7fff28ed8020) at kernel/qcoreapplication.cpp:915
#20 0x00007f67c5825d74 in sendEvent (event=0x7fff28ed8020, receiver=<optimized out>) at ../../include/QtCore/../../src/corelib/kernel/qcoreapplication.h:231
#21 QShortcutMap::dispatchEvent (this=this@entry=0x20d0de0, e=e@entry=0x7fff28ed8600) at kernel/qshortcutmap.cpp:884
#22 0x00007f67c58273a3 in QShortcutMap::tryShortcutEvent (this=0x20d0de0, o=<optimized out>, e=0x7fff28ed8600) at kernel/qshortcutmap.cpp:364
#23 0x00007f67c57fafe9 in QApplication::notify (this=0x7fff28ed9490, receiver=0x353b160, e=0x7fff28ed8600) at kernel/qapplication.cpp:3986
#24 0x00007f67c6347af8 in KoApplication::notify (this=<optimized out>, receiver=0x353b160, event=0x7fff28ed8600) at /build/buildd/calligra-2.5.93/libs/main/KoApplication.cpp:504
#25 0x00007f67c4e1256e in QCoreApplication::notifyInternal (this=0x7fff28ed9490, receiver=0x353b160, event=0x7fff28ed8600) at kernel/qcoreapplication.cpp:915
#26 0x00007f67c5895e79 in QKeyMapper::sendKeyEvent (keyWidget=keyWidget@entry=0x353b160, grab=grab@entry=false, type=QEvent::KeyPress, code=90, modifiers=..., text=..., autorepeat=autorepeat@entry=false, count=1, nativeScanCode=29, nativeVirtualKey=122, nativeModifiers=20) at kernel/qkeymapper_x11.cpp:1866
#27 0x00007f67c58962b1 in QKeyMapperPrivate::translateKeyEvent (this=0x2115c70, keyWidget=0x353b160, event=0x7fff28ed9030, grab=<optimized out>) at kernel/qkeymapper_x11.cpp:1836
#28 0x00007f67c5871ed9 in QApplication::x11ProcessEvent (this=0x7fff28ed9490, event=0x7fff28ed9030) at kernel/qapplication_x11.cpp:3630
#29 0x00007f67c5899fa2 in x11EventSourceDispatch (s=0x20cf3b0, callback=0x0, user_data=0x0) at kernel/qguieventdispatcher_glib.cpp:146
#30 0x00007f67c096cab5 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#31 0x00007f67c096cde8 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#32 0x00007f67c096cea4 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#33 0x00007f67c4e40bf6 in QEventDispatcherGlib::processEvents (this=0x2041e60, flags=...) at kernel/qeventdispatcher_glib.cpp:424
#34 0x00007f67c5899c1e in QGuiEventDispatcherGlib::processEvents (this=<optimized out>, flags=...) at kernel/qguieventdispatcher_glib.cpp:204
#35 0x00007f67c4e112bf in QEventLoop::processEvents (this=this@entry=0x7fff28ed9400, flags=...) at kernel/qeventloop.cpp:149
#36 0x00007f67c4e11548 in QEventLoop::exec (this=0x7fff28ed9400, flags=...) at kernel/qeventloop.cpp:204
#37 0x00007f67c4e16708 in QCoreApplication::exec () at kernel/qcoreapplication.cpp:1187
#38 0x00007f67c6a97bc5 in kdemain (argc=<optimized out>, argv=0x7fff28ed95a8) at /build/buildd/calligra-2.5.93/words/part/main.cpp:43
#39 0x00007f67c66cb76d in __libc_start_main (main=0x4006a0 <main(int, char**)>, argc=2, ubp_av=0x7fff28ed95a8, init=<optimized out>, fini=<optimized out>, rtld_fini=<optimized out>, stack_end=0x7fff28ed9598) at libc-start.c:226
#40 0x00000000004006d1 in _start ()

This bug may be a duplicate of or related to bug 309451.

Possible duplicates by query: bug 309451.

Reported using DrKonqi
Comment 1 Gopalakrishna Bhat 2013-01-05 17:17:58 UTC
I can reproduce this. On a blank document do the following
1) Type three lines of text. Say Item 1, Item 2, Item 3
2) Create a numbered list of these 3 lines.
3) Press enter after Item 2
4) Remove the list numbering by pressing backspace twice.
5) Select "Item 3" and from the Paragraph Setting dialog change the list style to, say lowercase alphabet.
6) Now pressing Undo multiple times should crash on "Undo Change List".
Comment 2 Camilla Boemann 2013-01-12 17:09:40 UTC
ping, how is it going with fixing this bug
Comment 3 spam_detect 2013-01-13 06:23:32 UTC
Created attachment 76432 [details]
New crash information added by DrKonqi

calligrawords (2.4.0) on KDE Platform 4.8.5 (4.8.5) using Qt 4.8.1

- What I was doing when the application crashed:
First, this is 2.4 - possibly fixed in related bug 309451. At least this is more information, which may prove helpful with this bug.

One significant thing that I noticed was, in the undo command, there was no undo available in the Edit menu, even though I had done something - paste content from a web page, including some formatting (a title of an article). I suspect this may be relataed to attempting to undo when there is nothing in the undo list/queue, perhaps stored in one place in code, while there IS something in a different list of operations stored elsewhere. 

Anyway, all I did was create a new doc, no custom changes from the defaults, and pasted in the article title from a webpage, and then try undo a few times. I did this a few times, always crashing, and I noticed that after passting the text, the Edit menu Undo option was dimmed/grayed out.

CTRL-Z was what I did a few times that resulted in the crash.

This was the current/latest version installed via synaptic for Ubuntu 12.04, version 2.4

-- Backtrace (Reduced):
#6  size (this=<error reading variable: Cannot access memory at address 0x8>) at ../../include/QtCore/../../src/corelib/tools/qlist.h:98
#7  count (this=<error reading variable: Cannot access memory at address 0x8>) at ../../include/QtCore/../../src/corelib/tools/qlist.h:280
#8  QTextList::count (this=0x0) at text/qtextlist.cpp:136
#9  0x00007fa85063e2f3 in ChangeListCommand::undo (this=0x2e9cfb0) at /build/buildd/calligra-2.4.0/libs/kotext/commands/ChangeListCommand.cpp:300
#10 0x00007fa84f5f219e in undo (this=0x3fecef0) at /build/buildd/calligra-2.4.0/libs/kundo2/kundo2stack.cpp:683
Comment 4 Camilla Boemann 2013-01-13 06:34:32 UTC
thanks but that is indeed a duplicate of the other bug you mention.

btw we _highly_ recommend using a newer version.
Comment 5 Gopalakrishna Bhat 2013-01-14 17:35:20 UTC
Git commit 42a679e5c9f7b9bb250c722fcb5f2b0d7fc69f73 by Gopalakrishna Bhat A.
Committed on 14/01/2013 at 18:16.
Pushed by gopalakrishnabhat into branch 'master'.

Improved undo/redo of lists.

M  +4    -1    plugins/textshape/dialogs/ParagraphSettingsDialog.cpp

http://commits.kde.org/calligra/42a679e5c9f7b9bb250c722fcb5f2b0d7fc69f73
Comment 6 Gopalakrishna Bhat 2013-01-20 12:05:08 UTC
Git commit d4869442d2ec15da9130f81d06b9c4c41f8e791f by Gopalakrishna Bhat A.
Committed on 20/01/2013 at 08:25.
Pushed by gopalakrishnabhat into branch 'master'.

Implement Undo command for Paragraph Settings
REVIEW: 108491

M  +1    -0    libs/kotext/CMakeLists.txt
M  +2    -2    libs/kotext/KoTextEditor.cpp
M  +3    -2    libs/kotext/KoTextEditor.h
M  +5    -58   libs/kotext/KoTextEditor_format.cpp
M  +14   -1    libs/kotext/commands/ChangeListCommand.cpp
A  +120  -0    libs/kotext/commands/ParagraphFormattingCommand.cpp     [License: LGPL (v2+)]
A  +62   -0    libs/kotext/commands/ParagraphFormattingCommand.h     [License: LGPL (v2+)]
M  +7    -12   plugins/textshape/dialogs/ParagraphSettingsDialog.cpp

http://commits.kde.org/calligra/d4869442d2ec15da9130f81d06b9c4c41f8e791f
Comment 7 Gopalakrishna Bhat 2013-01-26 03:27:06 UTC
Git commit e8c0f9e3f9069bfe07d3ed7ea14a4cfa598c1bda by Gopalakrishna Bhat A.
Committed on 14/01/2013 at 18:16.
Pushed by gopalakrishnabhat into branch 'calligra/2.6'.

Improved undo/redo of lists.
(cherry picked from commit 42a679e5c9f7b9bb250c722fcb5f2b0d7fc69f73)

M  +4    -1    plugins/textshape/dialogs/ParagraphSettingsDialog.cpp

http://commits.kde.org/calligra/e8c0f9e3f9069bfe07d3ed7ea14a4cfa598c1bda
Comment 8 Gopalakrishna Bhat 2013-01-26 03:27:06 UTC
Git commit a30b879ae22eaa84f7add8d44847709c8c0215dc by Gopalakrishna Bhat A.
Committed on 20/01/2013 at 08:25.
Pushed by gopalakrishnabhat into branch 'calligra/2.6'.

Implement Undo command for Paragraph Settings
REVIEW: 108491
(cherry picked from commit d4869442d2ec15da9130f81d06b9c4c41f8e791f)

Conflicts:
	libs/kotext/KoTextEditor.h
	libs/kotext/KoTextEditor_format.cpp

M  +1    -0    libs/kotext/CMakeLists.txt
M  +2    -2    libs/kotext/KoTextEditor.cpp
M  +3    -2    libs/kotext/KoTextEditor.h
M  +6    -77   libs/kotext/KoTextEditor_format.cpp
M  +14   -1    libs/kotext/commands/ChangeListCommand.cpp
A  +131  -0    libs/kotext/commands/ParagraphFormattingCommand.cpp     [License: LGPL (v2+)]
A  +62   -0    libs/kotext/commands/ParagraphFormattingCommand.h     [License: LGPL (v2+)]
M  +7    -12   plugins/textshape/dialogs/ParagraphSettingsDialog.cpp

http://commits.kde.org/calligra/a30b879ae22eaa84f7add8d44847709c8c0215dc
Comment 9 MartinB 2013-04-14 13:24:24 UTC
Created attachment 78894 [details]
New crash information added by DrKonqi

calligrawords (2.5.3) on KDE Platform 4.9.5 using Qt 4.8.3

- What I was doing when the application crashed:
Tried to undo backspaced bulleted list. 

I had pasted a bulleted list from LibreOffice Writer into Calligra Writer and tried to change the markup. However, when undoing this action (I had backspaced too far and deleted some characters from the sentence above), calligra crashed.

-- Backtrace (Reduced):
#6  size (this=<error reading variable: Cannot access memory at address 0x8>) at ../../include/QtCore/../../src/corelib/tools/qlist.h:98
#7  count (this=<error reading variable: Cannot access memory at address 0x8>) at ../../include/QtCore/../../src/corelib/tools/qlist.h:280
#8  QTextList::count (this=0x0) at text/qtextlist.cpp:136
#9  0x00007f109b7027a3 in ChangeListCommand::undo (this=0x4191920) at /build/buildd/calligra-2.5.3/libs/kotext/commands/ChangeListCommand.cpp:306
#10 0x00007f109a6eb25e in KUndo2QStack::undo (this=0xd72220) at /build/buildd/calligra-2.5.3/libs/kundo2/kundo2stack.cpp:683