Bug 426172

Summary: D&D image from Firefox (as URL) into a reference image crashes Krita
Product: [Applications] krita Reporter: Dmitry Kazakov <dimula73>
Component: File formatsAssignee: Dmitry Kazakov <dimula73>
Status: RESOLVED FIXED    
Severity: crash Keywords: release_blocker
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:

Description Dmitry Kazakov 2020-09-04 07:25:51 UTC
1) Create an empty image in Krita (AppImage)
2) Start Firefox on Linux (Chromium or Firefox on Windows do not work, because they provide the image as image, not as URL).
3) D&D image into Krita, in popup menu select "As Reference Image"

First you'll see an error message telling that Krita cannot open an external URL, then a crash follows

(gdb) bt
#0  0x00007ffff2dd6438 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
#1  0x00007ffff2dd803a in __GI_abort () at abort.c:89
#2  0x00007ffff37ec3ef in QMessageLogger::fatal(char const*, ...) const () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
#3  0x00007ffff37eb9f5 in qt_assert_x(char const*, char const*, char const*, int) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
#4  0x00007ffff6d2340b in KisWeakSharedPtr<KisImage>::operator-> (this=<optimized out>) at /home/appimage/persistent/krita/libs/global/kis_shared_ptr.h:394
#5  KisReferenceImage::Private::loadFromFile (this=<optimized out>) at /home/appimage/persistent/krita/libs/ui/KisReferenceImage.cpp:90
#6  KisReferenceImage::fromFile (filename=..., converter=..., parent=parent@entry=0xd7a3d80) at /home/appimage/persistent/krita/libs/ui/KisReferenceImage.cpp:179
#7  0x00007ffff6cc7202 in KisView::dropEvent (this=<optimized out>, event=<optimized out>) at /home/appimage/persistent/krita/libs/ui/KisView.cpp:591
#8  0x00007ffff44d01c8 in QWidget::event(QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Widgets.so.5
#9  0x00007ffff448f8dc in QApplicationPrivate::notify_helper(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Widgets.so.5
#10 0x00007ffff4497730 in QApplication::notify(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Widgets.so.5
#11 0x00007ffff6c5be57 in KisApplication::notify (this=<optimized out>, receiver=0xd79c5d0, event=0x7fffffffd2f0) at /home/appimage/persistent/krita/libs/ui/KisApplication.cpp:688
#12 0x00007ffff39eb338 in QCoreApplication::notifyInternal2(QObject*, QEvent*) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
Comment 1 Dmitry Kazakov 2020-09-04 07:43:26 UTC
Git commit 32ce8a5cd219b94c189e61deaf55bcabf89c3093 by Dmitry Kazakov.
Committed on 04/09/2020 at 07:43.
Pushed by dkazakov into branch 'krita/4.3'.

Fix crash when D&D a reference image as an external URL

M  +4    -2    libs/ui/KisReferenceImage.cpp

https://invent.kde.org/graphics/krita/commit/32ce8a5cd219b94c189e61deaf55bcabf89c3093
Comment 2 Dmitry Kazakov 2020-09-04 08:15:45 UTC
Git commit 8e69178560be3d01b19897e61e90fb2fb45945f4 by Dmitry Kazakov.
Committed on 04/09/2020 at 07:49.
Pushed by dkazakov into branch 'master'.

Fix crash when D&D a reference image as an external URL

M  +4    -2    libs/ui/KisReferenceImage.cpp

https://invent.kde.org/graphics/krita/commit/8e69178560be3d01b19897e61e90fb2fb45945f4