Bug 427476

Summary: When the top layer is set to invisible (eye closed), you can't create a "new layer from visible"
Product: [Applications] krita Reporter: rg0001
Component: Layer StackAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED DUPLICATE    
Severity: normal CC: halla, igortechnicalmail, tamtamy.tymona
Priority: NOR    
Version: nightly build (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:

Description rg0001 2020-10-09 08:15:14 UTC
git c0166ba, 7de2b88 and preceding

SUMMARY

When the top layer is set to invisible (eye closed), you can't create a "new layer from visible"

STEPS TO REPRODUCE
1. Create an image with several layers
2. Set the top layer to invisible
3. Click "Layer", "New", "New layer from visible"
OR right click on the layers and choose "New layer from visible"

OBSERVED RESULT

Nothing happens

EXPECTED RESULT

A new layer should be created corresponding to what you saw when you clicked "New layer from visible"


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Halla Rempt 2020-10-09 08:17:15 UTC
This also shows a safe assert (when enabled):

SAFE ASSERT (krita): "putAfter->parent()" in file /home/boud/dev/4.3/libs/image/kis_layer_utils.cpp, line 1376

Full backtrace:

[KCrash Handler]
#4  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:50
#5  0x00007f7d929cd859 in __GI_abort () at abort.c:79
#6  0x00007f7d92e28c39 in QMessageLogger::fatal(char const*, ...) const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007f7d9412d32e in kis_assert_common (assertion=<optimized out>, file=<optimized out>, line=1376, throwException=<optimized out>, isIgnorable=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qarraydata.h:61
#8  0x00007f7d94131585 in kis_safe_assert_recoverable (assertion=assertion@entry=0x7f7d948e3922 "putAfter->parent()", file=file@entry=0x7f7d948e3808 "/home/boud/dev/4.3/libs/image/kis_layer_utils.cpp", line=line@entry=1376) at /home/boud/dev/4.3/libs/global/kis_assert.cpp:117
#9  0x00007f7d94724ed8 in KisLayerUtils::mergeMultipleLayersImpl (image=..., mergedNodes=..., putAfter=..., flattenSingleLayer=<optimized out>, actionName=..., cleanupNodes=<optimized out>, layerName=...) at /home/boud/dev/4.3/libs/global/kis_shared_ptr.h:223
#10 0x00007f7d9472598e in KisLayerUtils::newLayerFromVisible (image=..., putAfter=...) at /usr/include/c++/9/bits/atomic_base.h:318
#11 0x00007f7d957b3ee9 in KisNodeManager::createFromVisible (this=0x562b3f153778) at /home/boud/dev/4.3/libs/global/kis_shared_ptr.h:175
#12 0x00007f7d955dbbaa in KisNodeManager::qt_static_metacall (_o=0x562b3f153778, _c=<optimized out>, _id=<optimized out>, _a=0x7fff0619e3a0) at /home/boud/dev/b-4.3/libs/ui/kritaui_autogen/EWIEGA46WW/moc_kis_node_manager.cpp:328
#13 0x00007f7d9307d5e0 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#14 0x00007f7d93b797f6 in QAction::triggered(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007f7d93b7bec8 in QAction::activate(QAction::ActionEvent) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#16 0x00007f7d93d06712 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#17 0x00007f7d93d0ddbe in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007f7d93d0f052 in QMenu::mouseReleaseEvent(QMouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007f7d93bc2db6 in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#20 0x00007f7d93d1165b in QMenu::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#21 0x00007f7d93b7fcc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#22 0x00007f7d93b88ec3 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#23 0x00007f7d95abd5ad in KisApplication::notify (this=<optimized out>, receiver=0x562b419a1850, event=0x7fff0619eb00) at /home/boud/dev/4.3/libs/ui/KisApplication.cpp:688
#24 0x00007f7d930466aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#25 0x00007f7d93b87fd7 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool, bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#26 0x00007f7d93bdea86 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#27 0x00007f7d93be14dc in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#28 0x00007f7d93b7fcc3 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007f7d93b88c70 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#30 0x00007f7d95abd5ad in KisApplication::notify (this=<optimized out>, receiver=0x562b40fc0580, event=0x7fff0619f000) at /home/boud/dev/4.3/libs/ui/KisApplication.cpp:688
#31 0x00007f7d930466aa in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#32 0x00007f7d93475f78 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#33 0x00007f7d934775b5 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#34 0x00007f7d9344f2cb in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#35 0x00007f7d8d5aa99e in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#36 0x00007f7d903a5fbd in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#37 0x00007f7d903a6240 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#38 0x00007f7d903a62e3 in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#39 0x00007f7d930a0e92 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#40 0x00007f7d930451bb in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#41 0x00007f7d9304d354 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#42 0x0000562b35c94e63 in main (argc=<optimized out>, argv=0x7fff0619f6c8) at /home/boud/dev/4.3/krita/main.cc:620
[Inferior 1 (process 732838) detached]
Comment 2 Igor 2020-10-18 02:36:30 UTC
The bug uprose with version 4.4 of Krita, in 4.3 is Ok.
Comment 3 Tiar 2021-03-15 22:53:42 UTC

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