Bug 290708 - crash on moving a layer
Summary: crash on moving a layer
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: unspecified
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-01-05 16:31 UTC by Halla Rempt
Modified: 2012-02-03 10:36 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Halla Rempt 2012-01-05 16:31:37 UTC
Application: krita (2.4 Beta 5)
KDE Platform Version: 4.7.4 (4.7.4)
Qt Version: 4.8.0
Operating System: Linux 3.1.0-1.2-desktop x86_64
Distribution: "openSUSE 12.1 (x86_64)"

-- Information about the crash:
I had an image with two layers. I have transformed one, then tried to move the other. This is the konsole output:

krita(25679)/kotext TextShapeFactory::newDocumentResourceManager: No KUndo2Stack found in the document resource manager, creating a new one 
krita(25679)/koffice (lib komain) KoOdfReadStore::loadAndParse: No store backend 
krita(25679)/koffice (lib kopageapp) KoOdfLoadingContext::KoOdfLoadingContext: could not parse manifest document 
krita(25679)/krita (tiles) KisMementoManager::commit: Named Transaction is empty 
krita(25679)/kotext TextShapeFactory::newDocumentResourceManager: No KUndo2Stack found in the document resource manager, creating a new one 
krita(25679)/koffice (lib komain) KoOdfReadStore::loadAndParse: No store backend 
krita(25679)/koffice (lib kopageapp) KoOdfLoadingContext::KoOdfLoadingContext: could not parse manifest document 
krita(25679)/krita (tiles) KisMementoManager::commit: Named Transaction is empty 
krita(25679)/koffice: Lcms2 error:  5 Read from memory error. Got 0 bytes, block should be of 128 bytes 
krita(25679)/koffice: Lcms2 error:  5 Read from memory error. Got 0 bytes, block should be of 128 bytes 
krita(25679): "[
0: /usr/lib64/libkdecore.so.5(kRealBacktrace(int)+0x35) [0x7fd49834c535]
1: /home/boud/kde/inst/lib64/libkritaimage.so.9(KisImageSignalRouter::emitAboutToAddANode(KisNode*, int)+0x3d) [0x7fd49ed5b4dd]
2: /home/boud/kde/inst/lib64/libkritaimage.so.9(KisNode::add(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>)+0x8ba) [0x7fd49ed8cdba]
3: /home/boud/kde/inst/lib64/libkritaimage.so.9(KisNodeFacade::addNode(KisSharedPtr<KisNode>, KisSharedPtr<KisNode>, KisSharedPtr<KisNode>)+0x9e) [0x7fd49ed930ae]
4: /home/boud/kde/inst/lib64/libkritaimage.so.9(KisImageLayerAddCommand::redo()+0xe3) [0x7fd49ec77533]
5: /home/boud/kde/inst/lib64/libkritaimage.so.9(KisStrokeStrategyUndoCommandBased::doStrokeCallback(KisStrokeJobData*)+0x67) [0x7fd49ed30eb7]
6: /home/boud/kde/inst/lib64/libkritaimage.so.9(+0xb2b36) [0x7fd49ec05b36]
7: /usr/lib64/libQtCore.so.4(+0x75d12) [0x7fd49fa1ed12]
8: /usr/lib64/libQtCore.so.4(+0x8255b) [0x7fd49fa2b55b]
9: /lib64/libpthread.so.0(+0x7f05) [0x7fd49f793f05]
10: /lib64/libc.so.6(clone+0x6d) [0x7fd49733453d]
]
" 
ASSERT: "checkSameThread()" in file /home/boud/kde/src/calligra/krita/image/kis_image_signal_router.cpp, line 116
KCrash: Application 'krita' crashing...

-- Backtrace:
Application: Krita (krita), signal: Aborted
[Current thread is 1 (Thread 0x7fd4a028f760 (LWP 25679))]

Thread 9 (Thread 0x7fd481458700 (LWP 25684)):
#0  0x00007fd49f797e6c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fd49fa2ba6b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fd49fa27894 in QSemaphore::acquire(int) () from /usr/lib64/libQtCore.so.4
#3  0x00007fd49ec0d06e in KisTileDataPooler::waitForWork (this=0x1a06770) at /home/boud/kde/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:162
#4  0x00007fd49ec0d754 in KisTileDataPooler::run (this=0x1a06770) at /home/boud/kde/src/calligra/krita/image/tiles3/kis_tile_data_pooler.cc:184
#5  0x00007fd49fa2b55b in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007fd49f793f05 in start_thread () from /lib64/libpthread.so.0
#7  0x00007fd49733453d in clone () from /lib64/libc.so.6

Thread 8 (Thread 0x7fd480c57700 (LWP 25685)):
#0  0x00007fd49f797e6c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fd49fa2ba6b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fd49fa27cd9 in QSemaphore::tryAcquire(int, int) () from /usr/lib64/libQtCore.so.4
#3  0x00007fd49ec43d8a in KisTileDataSwapper::run (this=0x1a067a8) at /home/boud/kde/src/calligra/krita/image/tiles3/swap/kis_tile_data_swapper.cpp:92
#4  0x00007fd49fa2b55b in ?? () from /usr/lib64/libQtCore.so.4
#5  0x00007fd49f793f05 in start_thread () from /lib64/libpthread.so.0
#6  0x00007fd49733453d in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7fd46eaaa700 (LWP 25694)):
#0  0x00007fd49f797e6c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fd49fa2ba6b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fd498df9904 in ?? () from /usr/lib64/libQtGui.so.4
#3  0x00007fd49fa2b55b in ?? () from /usr/lib64/libQtCore.so.4
#4  0x00007fd49f793f05 in start_thread () from /lib64/libpthread.so.0
#5  0x00007fd49733453d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7fd46e2a9700 (LWP 25695)):
#0  0x00007fd49732dc33 in select () from /lib64/libc.so.6
#1  0x00007fd49fb54806 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib64/libQtCore.so.4
#2  0x00007fd49fb5a2f0 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib64/libQtCore.so.4
#3  0x00007fd49fb5a7e3 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fd49fb27672 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fd49fb278c7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fd49fa28537 in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fd49fb0747f in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fd49fa2b55b in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007fd49f793f05 in start_thread () from /lib64/libpthread.so.0
#10 0x00007fd49733453d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7fd45c532700 (LWP 25722)):
#0  0x00007fd49732dc33 in select () from /lib64/libc.so.6
#1  0x00007fd49fb54806 in qt_safe_select(int, fd_set*, fd_set*, fd_set*, timeval const*) () from /usr/lib64/libQtCore.so.4
#2  0x00007fd49fb5a2f0 in QEventDispatcherUNIXPrivate::doSelect(QFlags<QEventLoop::ProcessEventsFlag>, timeval*) () from /usr/lib64/libQtCore.so.4
#3  0x00007fd49fb5a7e3 in QEventDispatcherUNIX::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#4  0x00007fd49fb27672 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#5  0x00007fd49fb278c7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#6  0x00007fd49fa28537 in QThread::exec() () from /usr/lib64/libQtCore.so.4
#7  0x00007fd49fb0747f in ?? () from /usr/lib64/libQtCore.so.4
#8  0x00007fd49fa2b55b in ?? () from /usr/lib64/libQtCore.so.4
#9  0x00007fd49f793f05 in start_thread () from /lib64/libpthread.so.0
#10 0x00007fd49733453d in clone () from /lib64/libc.so.6

Thread 4 (Thread 0x7fd45bb0f700 (LWP 25726)):
#0  0x00007fd49732dc33 in select () from /lib64/libc.so.6
#1  0x00007fd49fb05921 in ?? () from /usr/lib64/libQtCore.so.4
#2  0x00007fd49fa2b55b in ?? () from /usr/lib64/libQtCore.so.4
#3  0x00007fd49f793f05 in start_thread () from /lib64/libpthread.so.0
#4  0x00007fd49733453d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7fd46daa8700 (LWP 25809)):
[KCrash Handler]
#6  0x00007fd49728fd95 in raise () from /lib64/libc.so.6
#7  0x00007fd4972912ab in abort () from /lib64/libc.so.6
#8  0x00007fd49fa20c84 in qt_message_output(QtMsgType, char const*) () from /usr/lib64/libQtCore.so.4
#9  0x00007fd49fa20e3f in ?? () from /usr/lib64/libQtCore.so.4
#10 0x00007fd49fa20fe4 in qFatal(char const*, ...) () from /usr/lib64/libQtCore.so.4
#11 0x00007fd49fa2102a in qt_assert(char const*, char const*, int) () from /usr/lib64/libQtCore.so.4
#12 0x00007fd49ed5b596 in KisImageSignalRouter::emitAboutToAddANode (this=0x1d01290, parent=0x1fd6250, index=3) at /home/boud/kde/src/calligra/krita/image/kis_image_signal_router.cpp:116
#13 0x00007fd49ed8cdba in KisNode::add (this=0x1fd6250, newNode=..., aboveThis=...) at /home/boud/kde/src/calligra/krita/image/kis_node.cpp:273
#14 0x00007fd49ed930ae in KisNodeFacade::addNode (this=<optimized out>, node=..., parent=..., aboveThis=<optimized out>) at /home/boud/kde/src/calligra/krita/image/kis_node_facade.cpp:125
#15 0x00007fd49ec77533 in KisImageLayerAddCommand::redo (this=0x34138c0) at /home/boud/kde/src/calligra/krita/image/commands/kis_image_layer_add_command.cpp:45
#16 0x00007fd49ed30eb7 in KisStrokeStrategyUndoCommandBased::doStrokeCallback (this=0x60a5940, data=<optimized out>) at /home/boud/kde/src/calligra/krita/image/kis_stroke_strategy_undo_command_based.cpp:96
#17 0x00007fd49ec05b36 in run (this=<optimized out>) at /home/boud/kde/build/calligra/krita/image/../../../../src/calligra/krita/image/kis_stroke_job.h:39
#18 KisUpdateJobItem::run (this=0x1fd2410) at /home/boud/kde/build/calligra/krita/image/../../../../src/calligra/krita/image/kis_update_job_item.h:59
#19 0x00007fd49fa1ed12 in ?? () from /usr/lib64/libQtCore.so.4
#20 0x00007fd49fa2b55b in ?? () from /usr/lib64/libQtCore.so.4
#21 0x00007fd49f793f05 in start_thread () from /lib64/libpthread.so.0
#22 0x00007fd49733453d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7fd47bbb0700 (LWP 25810)):
#0  0x00007fd49f797e6c in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007fd49fa2ba6b in QWaitCondition::wait(QMutex*, unsigned long) () from /usr/lib64/libQtCore.so.4
#2  0x00007fd49fa26ce7 in QReadWriteLock::lockForRead() () from /usr/lib64/libQtCore.so.4
#3  0x00007fd49ec05bfd in KisUpdateJobItem::run (this=0x1fd21f0) at /home/boud/kde/build/calligra/krita/image/../../../../src/calligra/krita/image/kis_update_job_item.h:52
#4  0x00007fd49fa1ed12 in ?? () from /usr/lib64/libQtCore.so.4
#5  0x00007fd49fa2b55b in ?? () from /usr/lib64/libQtCore.so.4
#6  0x00007fd49f793f05 in start_thread () from /lib64/libpthread.so.0
#7  0x00007fd49733453d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7fd4a028f760 (LWP 25679)):
#0  0x00007fd49732b423 in poll () from /lib64/libc.so.6
#1  0x00007fd493d84c62 in ?? () from /usr/lib64/libxcb.so.1
#2  0x00007fd493d851bf in ?? () from /usr/lib64/libxcb.so.1
#3  0x00007fd493d85244 in xcb_writev () from /usr/lib64/libxcb.so.1
#4  0x00007fd49d967ab7 in _XSend () from /usr/lib64/libX11.so.6
#5  0x00007fd49d967e41 in _XEventsQueued () from /usr/lib64/libX11.so.6
#6  0x00007fd49d95881f in XEventsQueued () from /usr/lib64/libX11.so.6
#7  0x00007fd4989980c6 in ?? () from /usr/lib64/libQtGui.so.4
#8  0x00007fd49fb27672 in QEventLoop::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#9  0x00007fd49fb278c7 in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQtCore.so.4
#10 0x00007fd49fb2c425 in QCoreApplication::exec() () from /usr/lib64/libQtCore.so.4
#11 0x00007fd49fe86d3d in kdemain (argc=<optimized out>, argv=<optimized out>) at /home/boud/kde/src/calligra/krita/main.cc:71
#12 0x00007fd49727c23d in __libc_start_main () from /lib64/libc.so.6
#13 0x0000000000400911 in _start () at ../sysdeps/x86_64/elf/start.S:113

Reported using DrKonqi
Comment 1 Dmitry Kazakov 2012-01-05 16:38:44 UTC
Thanks, got it. My fault.
Comment 2 Dmitry Kazakov 2012-01-06 13:36:58 UTC
Git commit 594e53058be70b4452e8b508418ffd687b31aad0 by Dmitry Kazakov.
Committed on 06/01/2012 at 15:25.
Pushed by dkazakov into branch 'master'.

Temporary disable assert to allow people to work with master

M  +1    -1    krita/image/kis_image_signal_router.cpp

http://commits.kde.org/calligra/594e53058be70b4452e8b508418ffd687b31aad0
Comment 3 Dmitry Kazakov 2012-01-08 11:37:40 UTC
Git commit 40b292a9dfc967571f14a4a673cf3489cd647157 by Dmitry Kazakov.
Committed on 08/01/2012 at 13:34.
Pushed by dkazakov into branch 'master'.

Finished porting KisShapeController to two-stage signals processing

Yay! Now it doesn't depend on multithreading of the KisImage at all!
The updates of the internal shapes representation are done in two stage
way like it is done for all the signals of KisCanvas2. First connection
is direct and fetches the data from the image and the second is automatic
and executed in the context of UI thread.

I introduced four new signals for the image:
    void sigNodeAddedAsync(KisNodeSP node);
    void sigNodeMovedAsync(KisNodeSP node);
    void sigRemoveNodeAsync(KisNodeSP node);
    void sigLayersChangedAsync();

They are supposed to supersede old 7 signals in the nearest future.

This is the biggest part of refactoring needed for closing bug 290708.
Now the only thing left is to port KisNodeModel to use dummies stored
inside KisShapesController.

M  +4    -4    krita/image/kis_image.cc
M  +8    -2    krita/image/kis_image.h
M  +13   -4    krita/image/kis_image_signal_router.cpp
M  +8    -2    krita/image/kis_image_signal_router.h
M  +73   -81   krita/ui/flake/kis_shape_controller.cpp
M  +14   -3    krita/ui/flake/kis_shape_controller.h
M  +152  -85   krita/ui/tests/kis_shape_controller_test.cpp
M  +23   -4    krita/ui/tests/kis_shape_controller_test.h
M  +18   -6    krita/ui/tests/node_shapes_utils.h

http://commits.kde.org/calligra/40b292a9dfc967571f14a4a673cf3489cd647157
Comment 4 Dmitry Kazakov 2012-01-08 12:15:19 UTC
Git commit 6c8e7d9d17b4e1e0040e6c226781c5f148864265 by Dmitry Kazakov.
Committed on 08/01/2012 at 14:16.
Pushed by dkazakov into branch 'master'.

Temporary crutch for bug 290708 to allow people to work with Move Tool

Sometime the Undo of the Move tool crashes, because KisNodeModel
is not ported yet.

M  +2    -1    krita/plugins/tools/defaulttools/kis_tool_move.cc

http://commits.kde.org/calligra/6c8e7d9d17b4e1e0040e6c226781c5f148864265
Comment 5 Dmitry Kazakov 2012-02-03 10:36:33 UTC
Git commit dfc19c9649158820225318f9da7f1c5362b792d8 by Dmitry Kazakov.
Committed on 03/02/2012 at 12:35.
Pushed by dkazakov into branch 'shapes-as-node-model-kazakov'.

Fixed managing selection masks which are children of the root node

Now the mapping between KisNodeDummy and QModelIndex is done by
classes KisModeIndexConverter and KisModelIndexConverterShowAll.
They represent two options available to the user: normal mode and
mode when the root layer is visible.

This is the last commit in a series of refactorings for KisNodeModel.
Now there should be no known crashes or bugs. So if you see one, do
not hesitate to report! ;)

My plan is the following:
1) I'm pushing it to my branch.
2) Then I'll fix drag-and-drop (it is unrelated to the refactorings)
3) Then I'll make a call for testing both of the features, to
   save the time of artists ;)
Related: bug 291271

M  +11   -3    krita/plugins/extensions/dockers/defaultdockers/kis_layer_box.cpp
M  +28   -0    krita/sdk/tests/empty_nodes_test.h
M  +3    -0    krita/ui/CMakeLists.txt
M  +10   -3    krita/ui/flake/kis_dummies_facade_base.cpp
M  +2    -0    krita/ui/flake/kis_dummies_facade_base.h
A  +179  -0    krita/ui/kis_model_index_converter.cpp     [License: GPL (v2+)]
A  +49   -0    krita/ui/kis_model_index_converter.h     [License: GPL (v2+)]
A  +24   -0    krita/ui/kis_model_index_converter_base.cpp     [License: GPL (v2+)]
A  +64   -0    krita/ui/kis_model_index_converter_base.h     [License: GPL (v2+)]
A  +91   -0    krita/ui/kis_model_index_converter_show_all.cpp     [License: GPL (v2+)]
A  +47   -0    krita/ui/kis_model_index_converter_show_all.h     [License: GPL (v2+)]
M  +62   -86   krita/ui/kis_node_model.cpp
M  +4    -3    krita/ui/kis_node_model.h
M  +6    -0    krita/ui/tests/CMakeLists.txt
A  +279  -0    krita/ui/tests/kis_model_index_converter_test.cpp     [License: GPL (v2+)]
A  +61   -0    krita/ui/tests/kis_model_index_converter_test.h     [License: GPL (v2+)]

http://commits.kde.org/calligra/dfc19c9649158820225318f9da7f1c5362b792d8