Bug 399751 - SIGSEGV when converting a Local selection layer to Transparency mask
Summary: SIGSEGV when converting a Local selection layer to Transparency mask
Status: RESOLVED DUPLICATE of bug 406241
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2018-10-13 11:21 UTC by mvowada
Modified: 2019-05-01 09:38 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
(Video example) (877.85 KB, video/mp4)
2018-10-13 11:21 UTC, mvowada
Details

Note You need to log in before you can comment on or make changes to this bug.
Description mvowada 2018-10-13 11:21:44 UTC
Created attachment 115623 [details]
(Video example)

(Krita 4.2.0-pre-alpha (git e35700e) - Ubuntu 14.04.5 LTS)

I'm getting a crash if I try to convert a Local selection to Transparency Mask (see video):

    1. add a Local selection
    2. convert the added Local selection to Transparency Mask

Actual results: SIGSEGV
Comment 1 Halla Rempt 2018-10-14 08:25:03 UTC
Thread 1 (Thread 0x7f06d7a6a980 (LWP 30406)):
[KCrash Handler]
#6  musable (mem=0x7f06cc072818 <main_arena+472>) at malloc.c:4604
#7  __malloc_usable_size (m=0x7f06cc072818 <main_arena+472>) at malloc.c:4615
#8  0x00007f06c933d0b9 in ?? () from /usr/X11R6/lib64/libGL.so.1
#9  0x00007f06c76451fc in ?? () from /usr/lib64/tls/libnvidia-tls.so.390.67
#10 0x00007f06d58b9a81 in KisWeakSharedPtr<KisSelection>::detach (this=0xe6e2c00) at /home/boud/dev/krita/libs/global/kis_shared_ptr.h:480
#11 KisWeakSharedPtr<KisSelection>::attach (o=..., this=0xe6e2c00) at /home/boud/dev/krita/libs/global/kis_shared_ptr.h:460
#12 KisWeakSharedPtr<KisSelection>::operator= (o=..., this=0xe6e2c00) at /home/boud/dev/krita/libs/global/kis_shared_ptr.h:287
#13 KisPixelSelection::KisPixelSelection (this=0xade7840, copySource=..., copyMode=<optimized out>, parentSelection=...) at /home/boud/dev/krita/libs/image/kis_pixel_selection.cpp:96
#14 0x00007f06d58c6550 in KisSelection::KisSelection (this=0xc765030, source=..., copyMode=KritaUtils::CopyAllFrames, defaultBounds=...) at /home/boud/dev/krita/libs/image/kis_selection.cc:82
#15 0x00007f06d585ed8e in KisMask::Private::initSelectionImpl (this=0xa89ee20, copyFrom=..., parentLayer=..., copyFromDevice=...) at /home/boud/dev/krita/libs/image/kis_mask.cc:181
#16 0x00007f06d585f34a in KisMask::initSelection (this=this@entry=0x11d4f950, copyFromDevice=..., parentLayer=...) at /home/boud/dev/krita/libs/image/kis_mask.cc:153
#17 0x00007f06d6d1a78e in KisMaskManager::createMaskCommon (this=this@entry=0xb31e730, mask=..., activeNode=..., copyFrom=..., macroName=..., nodeType=..., nodeName=..., suppressSelection=false, avoidActiveNode=true, updateImage=true) at /home/boud/dev/krita/libs/ui/kis_mask_manager.cc:172
#18 0x00007f06d6d1b057 in KisMaskManager::createTransparencyMask (this=0xb31e730, activeNode=..., copyFrom=..., convertActiveNode=convertActiveNode@entry=true) at /home/boud/dev/krita/libs/ui/kis_mask_manager.cc:217
#19 0x00007f06d6d27c87 in KisNodeManager::convertNode (this=0xb470608, nodeType=...) at /home/boud/dev/krita/libs/ui/kis_node_manager.cpp:609
#20 0x00007f06d70429fc in KisNodeManager::qt_static_metacall (_o=0xb470608, _c=<optimized out>, _id=<optimized out>, _a=0x7ffd3c8be9a0) at /home/boud/dev/b-krita/libs/ui/moc_kis_node_manager.cpp:327
#21 0x00007f06ccba05ef in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#22 0x00007f06ccbabe65 in QSignalMapper::mapped(QString const&) () from /usr/lib64/libQt5Core.so.5
#23 0x00007f06ccbac9db in QSignalMapper::map(QObject*) () from /usr/lib64/libQt5Core.so.5
#24 0x00007f06ccba05ef in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#25 0x00007f06cdb1ad42 in QAction::triggered(bool) () from /usr/lib64/libQt5Widgets.so.5
#26 0x00007f06cdb1d43d in QAction::activate(QAction::ActionEvent) () from /usr/lib64/libQt5Widgets.so.5
#27 0x00007f06cdc83ea2 in ?? () from /usr/lib64/libQt5Widgets.so.5
#28 0x00007f06cdc8a7a4 in ?? () from /usr/lib64/libQt5Widgets.so.5
#29 0x00007f06cdc8b6bb in QMenu::mouseReleaseEvent(QMouseEvent*) () from /usr/lib64/libQt5Widgets.so.5
#30 0x00007f06cdb5cc87 in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#31 0x00007f06cdc8da0b in QMenu::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#32 0x00007f06cdb211ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#33 0x00007f06cdb28718 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#34 0x00007f06d6f55857 in KisApplication::notify (this=<optimized out>, receiver=0xc28e730, event=0x7ffd3c8bf1d0) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#35 0x00007f06ccb768f5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#36 0x00007f06cdb271e9 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () from /usr/lib64/libQt5Widgets.so.5
#37 0x00007f06cdb751d4 in ?? () from /usr/lib64/libQt5Widgets.so.5
#38 0x00007f06cdb77993 in ?? () from /usr/lib64/libQt5Widgets.so.5
#39 0x00007f06cdb211ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#40 0x00007f06cdb27b52 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#41 0x00007f06d6f55857 in KisApplication::notify (this=<optimized out>, receiver=0xe0e89c0, event=0x7ffd3c8bf670) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#42 0x00007f06ccb768f5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#43 0x00007f06cd10f74f in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib64/libQt5Gui.so.5
#44 0x00007f06cd111855 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib64/libQt5Gui.so.5
#45 0x00007f06cd0f07eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#46 0x00007f06c1b8c08b in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#47 0x00007f06ccb7508b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#48 0x00007f06cdc8861d in QMenu::exec(QPoint const&, QAction*) () from /usr/lib64/libQt5Widgets.so.5
#49 0x00007f069edfe22d in KisLayerBox::slotContextMenuRequested (this=0xd3d4c60, pos=..., index=...) at /home/boud/dev/krita/plugins/dockers/defaultdockers/kis_layer_box.cpp:685
#50 0x00007f069edfe80d in KisLayerBox::qt_static_metacall (_o=0xd3d4c60, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>) at /home/boud/dev/b-krita/plugins/dockers/defaultdockers/moc_kis_layer_box.cpp:228
#51 0x00007f06ccba05ef in QMetaObject::activate(QObject*, int, int, void**) () from /usr/lib64/libQt5Core.so.5
#52 0x00007f06d7030e87 in KisNodeView::contextMenuRequested (this=this@entry=0xd408750, _t1=..., _t2=...) at /home/boud/dev/b-krita/libs/ui/moc_KisNodeView.cpp:221
#53 0x00007f06d6f707bd in KisNodeView::showContextMenu (index=..., globalPos=..., this=<optimized out>) at /home/boud/dev/krita/libs/ui/KisNodeView.cpp:312
#54 KisNodeView::contextMenuEvent (this=0xd408750, e=0x7ffd3c8c0370) at /home/boud/dev/krita/libs/ui/KisNodeView.cpp:307
#55 0x00007f06cdb5cffe in QWidget::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#56 0x00007f06cdc0039e in QFrame::event(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#57 0x00007f06cdd5f12b in QAbstractItemView::viewportEvent(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#58 0x00007f06cddc6e20 in QTreeView::viewportEvent(QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#59 0x00007f06d6f6fbdb in KisNodeView::viewportEvent (this=0xd408750, e=0x7ffd3c8c0370) at /home/boud/dev/krita/libs/ui/KisNodeView.cpp:298
#60 0x00007f06ccb7676e in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#61 0x00007f06cdb21185 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#62 0x00007f06cdb29254 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#63 0x00007f06d6f55857 in KisApplication::notify (this=<optimized out>, receiver=0xd408e30, event=0x7ffd3c8c0370) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#64 0x00007f06ccb768f5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#65 0x00007f06cdb755f6 in ?? () from /usr/lib64/libQt5Widgets.so.5
#66 0x00007f06cdb77993 in ?? () from /usr/lib64/libQt5Widgets.so.5
#67 0x00007f06cdb211ac in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#68 0x00007f06cdb27b52 in QApplication::notify(QObject*, QEvent*) () from /usr/lib64/libQt5Widgets.so.5
#69 0x00007f06d6f55857 in KisApplication::notify (this=<optimized out>, receiver=0xa870980, event=0x7ffd3c8c0810) at /home/boud/dev/krita/libs/ui/KisApplication.cpp:608
#70 0x00007f06ccb768f5 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /usr/lib64/libQt5Core.so.5
#71 0x00007f06cd10f74f in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /usr/lib64/libQt5Gui.so.5
#72 0x00007f06cd111855 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /usr/lib64/libQt5Gui.so.5
#73 0x00007f06cd0f07eb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Gui.so.5
#74 0x00007f06c1b8c08b in ?? () from /usr/lib64/libQt5XcbQpa.so.5
#75 0x00007f06ccb7508b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /usr/lib64/libQt5Core.so.5
#76 0x00007f06ccb7d770 in QCoreApplication::exec() () from /usr/lib64/libQt5Core.so.5
#77 0x000000000040640f in main (argc=<optimized out>, argv=0x7ffd3c8c0d38) at /home/boud/dev/krita/krita/main.cc:456
Comment 2 Halla Rempt 2018-11-15 10:29:15 UTC
This is caused by:

commit 2502c494a4824099ac4578322370a48ddb2a80f9
Author: Dmitry Kazakov <dimula73@gmail.com>
Date:   Mon Dec 2 15:47:50 2013 +0400

    Fixed a memory leak in KisSelection
    
    The circular dependencies between shared pointers in
    KisSelectionMask<->KisSelection<->KisPixelSelection
    caused memory to leak.
    
    BUG:320865
Comment 3 Dmitry Kazakov 2019-05-01 09:38:38 UTC
The bug has been fixed in commit 38175ae5b1efddcecf6f0699544884e5278a7c3f

*** This bug has been marked as a duplicate of bug 406241 ***