Bug 328326 - Crash when creating multiline text item
Summary: Crash when creating multiline text item
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: 2.9 Beta
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords: drkonqi
Depends on:
Blocks:
 
Reported: 2013-12-02 13:47 UTC by Halla Rempt
Modified: 2014-05-01 12:39 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
[ ^ crash log ] (11.87 KB, text/plain)
2014-05-01 12:37 UTC, David REVOY
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2013-12-02 13:47:42 UTC
Application: krita (2.9 Pre-Alpha)
KDE Platform Version: 4.11.2
Qt Version: 4.8.5
Operating System: Linux 3.11.6-4-desktop x86_64
Distribution: "openSUSE 13.1 (Bottle) (x86_64)"

-- Information about the crash:
* create a document
* select the text tool
* switch to multiline
* draw the text shape

I think this must have to do with the recent refactoring.

The crash can be reproduced every time.

-- Backtrace:
Application: Krita (krita), signal: Segmentation fault
Using host libthread_db library "/lib64/libthread_db.so.1".
[Current thread is 1 (Thread 0x7f6b546988c0 (LWP 2640))]

Thread 13 (Thread 0x7f6b33ce1700 (LWP 2641)):
#0  0x00007f6b4c4200af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6afcfb in QSemaphore::acquire(int) () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b53262826 in waitForWork (this=0x1a70e00) at /home/boud/kde/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162
#4  KisTileDataPooler::run (this=0x1a70e00) at /home/boud/kde/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184
#5  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#7  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 12 (Thread 0x7f6b334e0700 (LWP 2642)):
#0  0x00007f6b4c4200af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6b0103 in QSemaphore::tryAcquire(int, int) () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b5328eb93 in KisTileDataSwapper::waitForWork (this=<optimized out>) at /home/boud/kde/src/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:86
#4  0x00007f6b5328edba in KisTileDataSwapper::run (this=0x1a70e38) at /home/boud/kde/src/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#5  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#7  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 11 (Thread 0x7f6b221af700 (LWP 2667)):
#0  0x00007f6b4c4200af in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b66 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4d918ac6 in ?? () from /usr/lib64/libQtGui.so.4
#3  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 10 (Thread 0x7f6b219ae700 (LWP 2668)):
#0  0x00007f6b4b6cb913 in select () from /lib64/libc.so.6
#1  0x00007f6b4c7dd6fb in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c7e3374 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b4c7e37d2 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c7b1d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007f6b4c7b2005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007f6b4c6b0fef in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007f6b4c793513 in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#10 0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 9 (Thread 0x7f6b3167f700 (LWP 2694)):
#0  0x00007f6b4c420458 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b44 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6a7235 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7f6b2a156700 (LWP 2695)):
#0  0x00007f6b4c420458 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b44 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6a7235 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7f6b292eb700 (LWP 2696)):
#0  0x00007f6b4c420458 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b44 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6a7235 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7f6b231b1700 (LWP 2697)):
#0  0x00007f6b4c420458 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b44 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6a7235 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7f6b1f691700 (LWP 2698)):
#0  0x00007f6b4c420458 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b44 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6a7235 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7f6b1ee90700 (LWP 2699)):
#0  0x00007f6b4c420458 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b44 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6a7235 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7f6b1e68f700 (LWP 2700)):
#0  0x00007f6b4c420458 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b44 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6a7235 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7f6b1de8e700 (LWP 2701)):
#0  0x00007f6b4c420458 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007f6b4c6b3b44 in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007f6b4c6a7235 in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007f6b4c6b368f in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007f6b4c41c0db in start_thread () from /lib64/libpthread.so.0
#5  0x00007f6b4b6d290d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7f6b546988c0 (LWP 2640)):
[KCrash Handler]
#5  0x00007f6b4d43c2c5 in QAction::setEnabled(bool) () from /usr/lib64/libQtGui.so.4
#6  0x00007f6b39311d49 in TextTool::updateActions (this=this@entry=0x56a20f0) at /home/boud/kde/src/calligra/plugins/textshape/TextTool.cpp:1916
#7  0x00007f6b3931262c in TextTool::setShapeData (this=0x56a20f0, data=<optimized out>) at /home/boud/kde/src/calligra/plugins/textshape/TextTool.cpp:1018
#8  0x00007f6b39318652 in TextTool::activate (this=0x56a20f0, toolActivation=<optimized out>, shapes=...) at /home/boud/kde/src/calligra/plugins/textshape/TextTool.cpp:1966
#9  0x00007f6b5088b030 in KoToolManager::Private::postSwitchTool (this=this@entry=0x3c33850, temporary=temporary@entry=false) at /home/boud/kde/src/calligra/libs/flake/KoToolManager.cpp:332
#10 0x00007f6b5088bd8b in KoToolManager::Private::switchTool (this=0x3c33850, tool=0x56a20f0, temporary=<optimized out>) at /home/boud/kde/src/calligra/libs/flake/KoToolManager.cpp:262
#11 0x00007f6b50890015 in KoToolManager::Private::switchTool (this=0x3c33850, id=..., temporary=temporary@entry=false) at /home/boud/kde/src/calligra/libs/flake/KoToolManager.cpp:286
#12 0x00007f6b50890bfa in KoToolManager::switchToolRequested (this=0x3c33780, id=...) at /home/boud/kde/src/calligra/libs/flake/KoToolManager.cpp:832
#13 0x00007f6b2d3afaf4 in KisToolText::slotActivateTextTool (this=<optimized out>) at /home/boud/kde/src/calligra/krita/plugins/tools/tool_text/kis_tool_text.cc:95
#14 0x00007f6b2d3afcf7 in KisToolText::qt_static_metacall (_o=0x60fbcd0, _c=QMetaObject::ReadProperty, _id=0, _a=0x56a2c70) at /home/boud/kde/build/calligra/krita/plugins/tools/tool_text/kis_tool_text.moc:48
#15 0x00007f6b4c7cb11e in QObject::event(QEvent*) () from /usr/lib64/libQtCore.so.4
#16 0x00007f6b4d4408ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#17 0x00007f6b4d446e70 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQtGui.so.4
#18 0x00007f6b52eaa947 in KoApplication::notify (this=<optimized out>, receiver=0x60fbcd0, event=0x6189520) at /home/boud/kde/src/calligra/libs/main/KoApplication.cpp:549
#19 0x00007f6b4c7b30ad in QCoreApplication::notifyInternal(QObject*, QEvent*) () from /usr/lib64/libQtCore.so.4
#20 0x00007f6b4c7b60ff in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /usr/lib64/libQtCore.so.4
#21 0x00007f6b4c7e36ff in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#22 0x00007f6b4d4de256 in ?? () from /usr/lib64/libQtGui.so.4
#23 0x00007f6b4c7b1d0f in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#24 0x00007f6b4c7b2005 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#25 0x00007f6b4c7b713b in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#26 0x00007f6b5406ab45 in kdemain (argc=<optimized out>, argv=<optimized out>) at /home/boud/kde/src/calligra/krita/main.cc:99
#27 0x00007f6b4b60cbe5 in __libc_start_main () from /lib64/libc.so.6
#28 0x00000000004009f1 in _start () at ../sysdeps/x86_64/start.S:122

Reported using DrKonqi
Comment 1 Michael Martini 2013-12-02 23:10:27 UTC
I can also reproduce this crash. In addition you can get crashes when you add the text shape or the new annotation shape from the add shape docker. These shapes don't immediately crash krita, they only crash krita after double clicking on them to change or add text. I think this bug originates somewhere around commit 17c9132885af3afc2e5ab1b2aabcfe910e4de913
Comment 2 Dmitry Kazakov 2013-12-07 08:21:57 UTC
Git commit fad45bd4002c1417f8b9f0e9fc0743812a2ff787 by Dmitry Kazakov.
Committed on 07/12/2013 at 07:23.
Pushed by dkazakov into branch 'master'.

Fix a crash in Krita due to accessing to an unsupported action in TextTool

The action "insert_table" (as well as other table-related actions) is added
by the Text Tool only in case the app supports 'useAdvancedText' feature.

That is why accessing the "insert_table" outside 'useAdvancedText' check
will cause a crash.

Please revert/change this commit if I understood something wrong :)
CC:calligra-devel@kde.org

M  +2    -2    plugins/textshape/TextTool.cpp

http://commits.kde.org/calligra/fad45bd4002c1417f8b9f0e9fc0743812a2ff787
Comment 3 Dmitry Kazakov 2013-12-07 08:27:37 UTC
Git commit a957d083cdc1d586ccbd2ba4a972c7eac3dd1e11 by Dmitry Kazakov.
Committed on 07/12/2013 at 07:23.
Pushed by dkazakov into branch 'calligra/2.8'.

Fix a crash in Krita due to accessing to an unsupported action in TextTool

The action "insert_table" (as well as other table-related actions) is added
by the Text Tool only in case the app supports 'useAdvancedText' feature.

That is why accessing the "insert_table" outside 'useAdvancedText' check
will cause a crash.

Please revert/change this commit if I understood something wrong :)
CC:calligra-devel@kde.org

M  +2    -2    plugins/textshape/TextTool.cpp

http://commits.kde.org/calligra/a957d083cdc1d586ccbd2ba4a972c7eac3dd1e11
Comment 4 David REVOY 2014-05-01 12:37:36 UTC
Created attachment 86391 [details]
[ ^ crash log ]

Hi, In actual 2.9pre-alpha, I can crash Krita on demand everytime I trace a multiline text frame.
Comment 5 Halla Rempt 2014-05-01 12:39:36 UTC
Are you completely up to date?