Created attachment 113238 [details] example (krita-4.1.0-pre-alpha-b01e10e-x86_64.appimage - Ubuntu 14.04 Unity) Steps: 1. CTRL + N (new default RGB document) 2. "Channels docker" > uncheck the "Blue" and the "Green" channels Actual Results: crash
Created attachment 113239 [details] gdb (not sure if it can be useful)
Can reproduce. Just to reiterate your instructions, uncheck blue, green and then red to cause the crash. Video of the crash: https://youtu.be/wcpP-J0FIco Build & Platform: krita 4.1.0-pre-alpha (git hash: 526d714) Xubuntu 17.10 Thread 1 "krita" received signal SIGSEGV, Segmentation fault. 0x00007ffff7314721 in QListData::at (i=<optimized out>, this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:115 115 inline void **at(int i) const Q_DECL_NOTHROW { return d->array + d->begin + i; } (gdb) bt #0 0x00007ffff7314721 in QListData::at(int) const (i=<optimized out>, this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:115 #1 0x00007ffff7314721 in QList<KoChannelInfo*>::operator[](int) (i=<optimized out>, this=<optimized out>) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:550 #2 0x00007ffff7314721 in KisTextureTileUpdateInfo::retrieveData(KisSharedPtr<KisPaintDevice>, QBitArray const&, bool, int) (selectedChannelIndex=-1, onlyOneChannelSelected=false, channelFlags=..., projectionDevice=..., this=0x55555a142390) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/kis_texture_tile_update_info.h:176 #3 0x00007ffff7314721 in KisOpenGLUpdateInfoBuilder::buildUpdateInfo(QRect const&, KisSharedPtr<KisPaintDevice>, QRect const&, int, bool) (this=this@entry=0x5555603d2828, rect=..., projection=..., bounds=..., levelOfDetail=levelOfDetail@entry=0, convertColorSpace=<optimized out>) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/KisOpenGLUpdateInfoBuilder.cpp:154 #4 0x00007ffff7316597 in KisOpenGLUpdateInfoBuilder::buildUpdateInfo(QRect const&, KisSharedPtr<KisImage>, bool) (this=0x5555603d2828, rect=..., srcImage=..., convertColorSpace=<optimized out>) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/KisOpenGLUpdateInfoBuilder.cpp:61 #5 0x00007ffff7307169 in KisOpenGLImageTextures::updateCacheImpl(QRect const&, KisSharedPtr<KisImage>, bool) (this=<optimized out>, rect=..., srcImage=..., convertColorSpace=convertColorSpace@entry=true) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/kis_opengl_image_textures.cpp:256 #6 0x00007ffff730723a in KisOpenGLImageTextures::updateCache(QRect const&, KisSharedPtr<KisImage>) (this=this@entry=0x5555603d2790, rect=..., srcImage=...) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/kis_opengl_image_textures.cpp:244 #7 0x00007ffff72febbc in KisOpenGLCanvas2::startUpdateCanvasProjection(QRect const&, QBitArray const&) (this=0x5555613a8550, rc=..., channelFlags=...) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/kis_opengl_canvas2.cpp:901 #8 0x00007ffff712fe35 in KisCanvas2::startUpdateCanvasProjection(QRect const&) (this=0x55556139d5a0, rc=...) at /home/managor/Sourcebuilding/krita/libs/ui/canvas/kis_canvas2.cpp:739 #9 0x00007ffff7130005 in KisCanvas2::startUpdateInPatches(QRect const&) (this=this@entry=0x55556139d5a0, imageRect=...) at /home/managor/Sourcebuilding/krita/libs/ui/canvas/kis_canvas2.cpp:600 #10 0x00007ffff713060e in KisCanvas2::channelSelectionChanged() (this=0x55556139d5a0) at /home/managor/Sourcebuilding/krita/libs/ui/canvas/kis_canvas2.cpp:376 #11 0x00007ffff4e4b8e5 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #12 0x00007fffba8cd221 in ChannelModel::channelFlagsChanged() (this=0x555560dacb10) at /home/managor/Sourcebuilding/b-krita/plugins/dockers/channeldocker/kritachanneldocker_autogen/include/moc_channelmodel.cpp:173 #13 0x00007fffba8cd221 in ChannelModel::setData(QModelIndex const&, QVariant const&, int) (this=0x555560dacb10, index=..., value=..., role=<optimized out>) at /home/managor/Sourcebuilding/krita/plugins/dockers/channeldocker/channelmodel.cpp:121 #14 0x00007ffff5e5bd9d in QStyledItemDelegate::editorEvent(QEvent*, QAbstractItemModel*, QStyleOptionViewItem const&, QModelIndex const&) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #15 0x00007ffff5ddf9ec in () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #16 0x00007ffff5de4ceb in QAbstractItemView::edit(QModelIndex const&, QAbstractItemView::EditTrigger, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #17 0x00007ffff5ddfc27 in QAbstractItemView::mouseReleaseEvent(QMouseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #18 0x00007ffff5bd7dc8 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #19 0x00007ffff5cb72de in QFrame::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #20 0x00007ffff5de8c4b in QAbstractItemView::viewportEvent(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #21 0x00007ffff4e1cacc in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #22 0x00007ffff5b97445 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #23 0x00007ffff5b9f28f in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #24 0x00007ffff7466de7 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x555560da3150, event=0x7fffffffd4a0) at /home/managor/Sourcebuilding/krita/libs/ui/KisApplication.cpp:627 #25 0x00007ffff4e1cde8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #26 0x00007ffff5b9e262 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #27 0x00007ffff5bf294b in () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #28 0x00007ffff5bf4fba in () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #29 0x00007ffff5b9746c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #30 0x00007ffff5b9ed34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #31 0x00007ffff7466de7 in KisApplication::notify(QObject*, QEvent*) (this=<optimized out>, receiver=0x55555ed0ac10, event=0x7fffffffd910) at /home/managor/Sourcebuilding/krita/libs/ui/KisApplication.cpp:627 #32 0x00007ffff4e1cde8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #33 0x00007ffff53dbf43 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #34 0x00007ffff53dda25 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #35 0x00007ffff53b5cab in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #36 0x00007fffe2a015a0 in () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #37 0x00007fffec934fb7 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #38 0x00007fffec9351f0 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #39 0x00007fffec93527c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #40 0x00007ffff4e7547f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #41 0x00007ffff4e1ae3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #42 0x00007ffff4e23da4 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #43 0x0000555555e8c7e5 in main(int, char**) (argc=<optimized out>, argv=0x7fffffffdf88) at /home/managor/Sourcebuilding/krita/krita/main.cc:395
I did a new test on this crash and got this backtrace Thread 1 "krita" received signal SIGABRT, Aborted. __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 51 ../sysdeps/unix/sysv/linux/raise.c: No such file or directory. (gdb) bt #0 0x00007ffff3edb0bb in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:51 #1 0x00007ffff3edcf5d in __GI_abort () at abort.c:90 #2 0x00007ffff48b8107 in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #3 0x00007ffff48b33ba in () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #4 0x00007ffff6e7a047 in QList<KoChannelInfo*>::operator[](int) (this=0x7fffffffc1e8, i=-1) at /usr/include/x86_64-linux-gnu/qt5/QtCore/qlist.h:549 #5 0x00007ffff70e57e1 in KisTextureTileUpdateInfo::retrieveData(KisSharedPtr<KisPaintDevice>, QBitArray const&, bool, int) (this=0x555564d6f620, projectionDevice=..., channelFlags=..., onlyOneChannelSelected=false, selectedChannelIndex=-1) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/kis_texture_tile_update_info.h:176 #6 0x00007ffff70e3d2c in KisOpenGLUpdateInfoBuilder::buildUpdateInfo(QRect const&, KisSharedPtr<KisPaintDevice>, QRect const&, int, bool) (this=0x555561f11588, rect=..., projection=..., bounds=..., levelOfDetail=0, convertColorSpace=true) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/KisOpenGLUpdateInfoBuilder.cpp:154 #7 0x00007ffff70e3472 in KisOpenGLUpdateInfoBuilder::buildUpdateInfo(QRect const&, KisSharedPtr<KisImage>, bool) (this=0x555561f11588, rect=..., srcImage=..., convertColorSpace=true) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/KisOpenGLUpdateInfoBuilder.cpp:61 #8 0x00007ffff70d82f9 in KisOpenGLImageTextures::updateCacheImpl(QRect const&, KisSharedPtr<KisImage>, bool) (this=0x555561f114f0, rect=..., srcImage=..., convertColorSpace=true) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/kis_opengl_image_textures.cpp:256 #9 0x00007ffff70d816d in KisOpenGLImageTextures::updateCache(QRect const&, KisSharedPtr<KisImage>) (this=0x555561f114f0, rect=..., srcImage=...) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/kis_opengl_image_textures.cpp:244 #10 0x00007ffff70cf66d in KisOpenGLCanvas2::startUpdateCanvasProjection(QRect const&, QBitArray const&) (this=0x5555573a9120, rc=..., channelFlags=...) at /home/managor/Sourcebuilding/krita/libs/ui/opengl/kis_opengl_canvas2.cpp:901 #11 0x00007ffff6e4b7ed in KisCanvas2::startUpdateCanvasProjection(QRect const&) (this=0x555561ee2030, rc=...) at /home/managor/Sourcebuilding/krita/libs/ui/canvas/kis_canvas2.cpp:739 #12 0x00007ffff6e4abf5 in KisCanvas2::startUpdateInPatches(QRect const&) (this=0x555561ee2030, imageRect=...) at /home/managor/Sourcebuilding/krita/libs/ui/canvas/kis_canvas2.cpp:600 #13 0x00007ffff6e49704 in KisCanvas2::channelSelectionChanged() (this=0x555561ee2030) at /home/managor/Sourcebuilding/krita/libs/ui/canvas/kis_canvas2.cpp:376 #14 0x00007ffff73d9afb in KisCanvas2::qt_static_metacall(QObject*, QMetaObject::Call, int, void**) (_o=0x555561ee2030, _c=QMetaObject::InvokeMetaMethod, _id=16, _a=0x7fffffffc840) at /home/managor/Sourcebuilding/b-krita/libs/ui/kritaui_autogen/KGLXD3X7AI/moc_kis_canvas2.cpp:206 #15 0x00007ffff4ad98e5 in QMetaObject::activate(QObject*, int, int, void**) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #16 0x00007fffb97c359b in ChannelModel::channelFlagsChanged() (this=0x5555618ac250) at /home/managor/Sourcebuilding/b-krita/plugins/dockers/channeldocker/kritachanneldocker_autogen/include/moc_channelmodel.cpp:173 #17 0x00007fffb97c1f73 in ChannelModel::setData(QModelIndex const&, QVariant const&, int) (this=0x5555618ac250, index=..., value=..., role=10) at /home/managor/Sourcebuilding/krita/plugins/dockers/channeldocker/channelmodel.cpp:121 #18 0x00007ffff5ae9d9d in QStyledItemDelegate::editorEvent(QEvent*, QAbstractItemModel*, QStyleOptionViewItem const&, QModelIndex const&) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #19 0x00007ffff5a6d9ec in () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #20 0x00007ffff5a72ceb in QAbstractItemView::edit(QModelIndex const&, QAbstractItemView::EditTrigger, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #21 0x00007ffff5a6dc27 in QAbstractItemView::mouseReleaseEvent(QMouseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #22 0x00007ffff5865dc8 in QWidget::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #23 0x00007ffff59452de in QFrame::event(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #24 0x00007ffff5a76c4b in QAbstractItemView::viewportEvent(QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #25 0x00007ffff4aaaacc in QCoreApplicationPrivate::sendThroughObjectEventFilters(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #26 0x00007ffff5825445 in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #27 0x00007ffff582d28f in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #28 0x00007ffff72ca695 in KisApplication::notify(QObject*, QEvent*) (this=0x7fffffffde20, receiver=0x5555618a2a80, event=0x7fffffffd4b0) at /home/managor/Sourcebuilding/krita/libs/ui/KisApplication.cpp:626 #29 0x00007ffff4aaade8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #30 0x00007ffff582c262 in QApplicationPrivate::sendMouseEvent(QWidget*, QMouseEvent*, QWidget*, QWidget*, QWidget**, QPointer<QWidget>&, bool) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #31 0x00007ffff588094b in () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #32 0x00007ffff5882fba in () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #33 0x00007ffff582546c in QApplicationPrivate::notify_helper(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #34 0x00007ffff582cd34 in QApplication::notify(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Widgets.so.5 #35 0x00007ffff72ca695 in KisApplication::notify(QObject*, QEvent*) (this=0x7fffffffde20, receiver=0x55555a193fe0, event=0x7fffffffd940) at /home/managor/Sourcebuilding/krita/libs/ui/KisApplication.cpp:626 #36 0x00007ffff4aaade8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #37 0x00007ffff5069f43 in QGuiApplicationPrivate::processMouseEvent(QWindowSystemInterfacePrivate::MouseEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #38 0x00007ffff506ba25 in QGuiApplicationPrivate::processWindowSystemEvent(QWindowSystemInterfacePrivate::WindowSystemEvent*) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #39 0x00007ffff5043cab in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Gui.so.5 #40 0x00007fffe21005a0 in () at /usr/lib/x86_64-linux-gnu/libQt5XcbQpa.so.5 #41 0x00007fffec03cfb7 in g_main_context_dispatch () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #42 0x00007fffec03d1f0 in () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #43 0x00007fffec03d27c in g_main_context_iteration () at /lib/x86_64-linux-gnu/libglib-2.0.so.0 #44 0x00007ffff4b0347f in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #45 0x00007ffff4aa8e3a in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #46 0x00007ffff4ab1da4 in QCoreApplication::exec() () at /usr/lib/x86_64-linux-gnu/libQt5Core.so.5 #47 0x0000555555e903cc in main(int, char**) (argc=1, argv=0x7fffffffdf88) at /home/managor/Sourcebuilding/krita/krita/main.cc:396
Git commit 4a3af9aba0415ffcbfa987584efdefc068e51ab4 by Boudewijn Rempt. Committed on 26/06/2018 at 14:22. Pushed by rempt into branch 'master'. Check the whether the selected channel exists If it's -1 or greater than the number of available channels, we shouldn't try to get the channel from the list of channels. M +1 -1 libs/ui/opengl/kis_texture_tile_update_info.h https://commits.kde.org/krita/4a3af9aba0415ffcbfa987584efdefc068e51ab4
Git commit 10159b029162149a641dd2a145b3d1591c4fdfbd by Boudewijn Rempt. Committed on 30/06/2018 at 09:08. Pushed by rempt into branch 'krita/4.1'. Check the whether the selected channel exists If it's -1 or greater than the number of available channels, we shouldn't try to get the channel from the list of channels. M +1 -1 libs/ui/opengl/kis_texture_tile_update_info.h https://commits.kde.org/krita/10159b029162149a641dd2a145b3d1591c4fdfbd
*** Bug 396232 has been marked as a duplicate of this bug. ***