#1073054 krita: Krita crashes when canceling the "Missing Color Profile" dialog

Package:
krita
Source:
krita
Description:
pixel-based image manipulation program
Submitter:
Elias Batek
Date:
2024-06-26 12:15:03 UTC
Severity:
normal
#1073054#5
Date:
2024-06-12 13:21:35 UTC
From:
To:
Dear Maintainer,

Krita crashes when canceling the "Missing Color Profile" dialog.

   * What led up to the situation?

I hit cancel on the “Missing Color Profile” dialog.

   * What exactly did you do (or not do) that was effective (or
     ineffective)?

1. I opened Krita
2. selected “New File” (Ctrl+N)
3. chose “Create from Clipboard”
4. got the “Missing Color Profile” dialog asking me to choose between “As Web (sRGB)” and “As on Monitor”
5. where I clicked “Cancel”. (Pressing [Enter] with no option selection has the same result.)

   * What was the outcome of this action?

Krita crashed.

   * What outcome did you expect instead?

I would expect the dialog to close, canceling the “Create from Clipboard” action.


==== Backtrace ====
ASSERT (krita): "clip" in file ./libs/ui/widgets/kis_image_from_clipboard_widget.cpp, line 80

Thread 1 "krita" received signal SIGABRT, Aborted.
0x00007ffff56a9e2c in ?? () from /lib/x86_64-linux-gnu/libc.so.6
(gdb) bt
#0  0x00007ffff56a9e2c in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#1  0x00007ffff565afb2 in raise () from /lib/x86_64-linux-gnu/libc.so.6
#2  0x00007ffff5645472 in abort () from /lib/x86_64-linux-gnu/libc.so.6
#3  0x00007ffff5890c79 in QMessageLogger::fatal(char const*, ...) const () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#4  0x00007ffff6e7c8bc in ?? () from /lib/x86_64-linux-gnu/libkritaglobal.so.18
#5  0x00007ffff7b6e6d8 in ?? () from /lib/x86_64-linux-gnu/libkritaui.so.18
#6  0x00007ffff5ae8f4f in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#7  0x00007ffff68fe838 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#8  0x00007ffff5ae8f7c in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#9  0x00007ffff6854fc2 in QAbstractButton::clicked(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#10 0x00007ffff685522a in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#11 0x00007ffff68571a9 in QAbstractButton::click() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#12 0x00007ffff67a5bba in QWidget::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#13 0x00007ffff6762fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#14 0x00007ffff676aed7 in QApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#15 0x00007ffff7cb9cfe in KisApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libkritaui.so.18
#16 0x00007ffff5ab16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#17 0x00007ffff67c0fa2 in ?? () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#18 0x00007ffff6762fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#19 0x00007ffff7cb9cfe in KisApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libkritaui.so.18
#20 0x00007ffff5ab16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#21 0x00007ffff5ab4681 in QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#22 0x00007ffff5b0a153 in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#23 0x00007ffff34627a9 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#24 0x00007ffff3462a38 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#25 0x00007ffff3462acc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#26 0x00007ffff5b09836 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#27 0x00007ffff5ab017b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#28 0x00007ffff696bbb7 in QDialog::exec() () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#29 0x00007ffff7cebf43 in KisMainWindow::slotFileNew() () from /lib/x86_64-linux-gnu/libkritaui.so.18
#30 0x00007ffff5ae8f7c in ?? () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#31 0x00007ffff675c782 in QAction::triggered(bool) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#32 0x00007ffff675f3ab in QAction::activate(QAction::ActionEvent) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#33 0x00007ffff675ff7d in QAction::event(QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#34 0x00007ffff6762fae in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Widgets.so.5
#35 0x00007ffff7cb9cfe in KisApplication::notify(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libkritaui.so.18
#36 0x00007ffff5ab16f8 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#37 0x00007ffff5f6c76b in QShortcutMap::dispatchEvent(QKeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#38 0x00007ffff5f6d0bb in QShortcutMap::tryShortcut(QKeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#39 0x00007ffff5f15376 in QWindowSystemInterface::handleShortcutEvent(QWindow*, unsigned long, int, QFlags<Qt::KeyboardModifier>, unsigned int, unsigned int, unsigned int, QString const&, bool, unsigned short) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#40 0x00007ffff5f390cd in QGuiApplicationPrivate::processKeyEvent(QWindowSystemInterfacePrivate::KeyEvent*) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#41 0x00007ffff5f11cac in QWindowSystemInterface::sendWindowSystemEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Gui.so.5
#42 0x00007ffff01e3eca in ?? () from /lib/x86_64-linux-gnu/libQt5XcbQpa.so.5
#43 0x00007ffff34627a9 in g_main_context_dispatch () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#44 0x00007ffff3462a38 in ?? () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#45 0x00007ffff3462acc in g_main_context_iteration () from /lib/x86_64-linux-gnu/libglib-2.0.so.0
#46 0x00007ffff5b09836 in QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#47 0x00007ffff5ab017b in QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#48 0x00007ffff5ab82d6 in QCoreApplication::exec() () from /lib/x86_64-linux-gnu/libQt5Core.so.5
#49 0x000055555555ce3e in ?? ()
#50 0x00007ffff564624a in ?? () from /lib/x86_64-linux-gnu/libc.so.6
#51 0x00007ffff5646305 in __libc_start_main () from /lib/x86_64-linux-gnu/libc.so.6
#52 0x000055555555e271 in ?? ()
==== Backtrace End ====

#1073054#10
Date:
2024-06-25 14:20:16 UTC
From:
To:

Hello,
I am not maintainer of krita, just trying to collect some more information.

Below are the top lines of a backtrace with debug symbols installed.

This might be related to this upstream bug, which contains a few git commits:

https://bugs.kde.org/show_bug.cgi?id=462006

I could this just reproduce with a Bookworm/stable VM (krita 1:5.1.5+dfsg-2),
a Trixie/testing VM (krita 1:5.2.2+dfsg-3+b2) did no longer show this assertion.

Kind regards,
Bernhard



(gdb) bt
#0  __pthread_kill_implementation (threadid=<optimized out>, signo=signo@entry=6, no_tid=no_tid@entry=0) at ./nptl/pthread_kill.c:44
#1  0x00007f5c0c2a9e8f in __pthread_kill_internal (signo=6, threadid=<optimized out>) at ./nptl/pthread_kill.c:78
#2  0x00007f5c0c25afb2 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
#3  0x00007f5c0c245472 in __GI_abort () at ./stdlib/abort.c:79
#4  0x00007f5c0c490c79 in qt_message_fatal (message=<synthetic pointer>..., context=...) at global/qlogging.cpp:1914
#5  QMessageLogger::fatal (this=this@entry=0x7ffdbd906d00, msg=msg@entry=0x7f5c0dacc282 "%s") at global/qlogging.cpp:893
#6  0x00007f5c0da7c8bc in kis_assert_common (assertion=<optimized out>, file=<optimized out>, line=<optimized out>, throwException=throwException@entry=true, isIgnorable=isIgnorable@entry=false) at ./libs/global/kis_assert.cpp:89
#7  0x00007f5c0da7cb1d in kis_assert_exception (assertion=<optimized out>, file=<optimized out>, line=<optimized out>) at ./libs/global/kis_assert.cpp:112
#8  0x00007f5c0e76e6d8 in KisImageFromClipboardWidget::createImage (this=0x5639d88b4080) at ./libs/ui/widgets/kis_image_from_clipboard_widget.cpp:80
#9  0x00007f5c0c6e8f4f in QtPrivate::QSlotObjectBase::call (a=0x7ffdbd906e80, r=0x5639d88b4080, this=0x5639d82be180) at ../../include/QtCore/../../src/corelib/kernel/qobjectdefs_impl.h:398
#10 doActivate<false> (sender=0x5639d8239b10, signal_index=8, argv=0x7ffdbd906e80) at kernel/qobject.cpp:3923
#11 0x00007f5c0c6e21ef in QMetaObject::activate (sender=sender@entry=0x5639d8239b10, m=m@entry=0x7f5c0d886300 <QDialogButtonBox::staticMetaObject>, local_signal_index=local_signal_index@entry=1, argv=argv@entry=0x0) at kernel/qobject.cpp:3983
#12 0x00007f5c0d4fe143 in QDialogButtonBox::accepted (this=this@entry=0x5639d8239b10) at .moc/moc_qdialogbuttonbox.cpp:287
#13 0x00007f5c0d4fe838 in QDialogButtonBoxPrivate::_q_handleButtonClicked (this=<optimized out>) at widgets/qdialogbuttonbox.cpp:878
#14 0x00007f5c0c6e8f7c in doActivate<false> (sender=0x5639d8239630, signal_index=9, argv=0x7ffdbd906fd0) at kernel/qobject.cpp:3935
#15 0x00007f5c0c6e21ef in QMetaObject::activate (sender=sender@entry=0x5639d8239630, m=m@entry=0x7f5c0d87d140 <QAbstractButton::staticMetaObject>, local_signal_index=local_signal_index@entry=2, argv=argv@entry=0x7ffdbd906fd0) at kernel/qobject.cpp:3983
#16 0x00007f5c0d454fc2 in QAbstractButton::clicked (this=this@entry=0x5639d8239630, _t1=<optimized out>) at .moc/moc_qabstractbutton.cpp:308
...

#1073054#15
Date:
2024-06-26 08:19:27 UTC
From:
To:
Control: -1 fixed 1:5.2.2+dfsg-1

I agree that the bug matches, the referenced commit likely matches, and it was
committed between those versions.

I'm not sure it is a severe enough bug to warrant a stable update for that
though, so I guess we should just mark it as done in the trixie version. A
more accurate version could be tracked down, but this is probably good enough.

/Sune

#1073054#20
Date:
2024-06-26 12:03:50 UTC
From:
To:
Hi,

As Krita allows users to open multiple documents at once, any crash can
take all other open (and potentially unsaved) work with it.

Imagine happily working on a collage/mashup, trying quickly preparing
another graphic in a new tab… And losing it all because you forgot the
select a radio button before hitting enter on the import dialog.

Just my 2¢ though.


Best regards,
Elias