Bug 426839 - Opening any .kra file with references crashes Krita (any OS)
Summary: Opening any .kra file with references crashes Krita (any OS)
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: nightly build (please specify the git hash!)
Platform: Other Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression, release_blocker
: 426934 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-09-21 21:22 UTC by Dmitry Kazakov
Modified: 2020-09-24 20:57 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Kazakov 2020-09-21 21:22:34 UTC
sha1: aae5df801bb345e1737b99d6cb8bac58af31e07b

Should also affect 4.4.0 Beta1

STEPS TO REPRODUCE
1. Create a file with a reference image and save it
2. Open it

(gdb) bt
#0  KisCoordinatesConverter::imageToWidgetTransform (this=0x68) at /home/appimage/persistent/krita/libs/ui/canvas/kis_coordinates_converter.cpp:303
#1  0x00007ffff6d14db9 in KisCoordinatesConverter::imageToWidget<QRectF> (obj=..., this=<optimized out>) at /home/appimage/persistent/krita/libs/ui/canvas/kis_coordinates_converter.h:117
#2  KisReferenceImagesDecoration::Private::updateBufferByImageCoordinates (dirtyImageRect=..., this=<optimized out>) at /home/appimage/persistent/krita/libs/ui/KisReferenceImagesDecoration.cpp:54
#3  KisReferenceImagesDecoration::slotReferenceImagesChanged (this=0xe50f8e0, dirtyRect=...) at /home/appimage/persistent/krita/libs/ui/KisReferenceImagesDecoration.cpp:161
#4  0x00007ffff6d151e2 in KisReferenceImagesDecoration::setReferenceImageLayer (this=this@entry=0xe50f8e0, layer=...) at /home/appimage/persistent/krita/libs/ui/KisReferenceImagesDecoration.cpp:183
#5  0x00007ffff6d15e99 in KisReferenceImagesDecoration::KisReferenceImagesDecoration (this=0xe50f8e0, parent=..., document=0x591a980)
    at /home/appimage/persistent/krita/libs/ui/KisReferenceImagesDecoration.cpp:108
#6  0x00007ffff6cbb2d1 in KisView::Private::Private (viewManager=<optimized out>, document=0x591a980, _q=0xe489110, this=0xe4e8e60) at /home/appimage/persistent/krita/libs/ui/KisView.cpp:115
#7  KisView::KisView (this=0xe489110, document=0x591a980, viewManager=<optimized out>, parent=<optimized out>) at /home/appimage/persistent/krita/libs/ui/KisView.cpp:203
#8  0x00007ffff6ca55a4 in KisPart::createView (this=0x7ffff7dd3e40 <_ZZN12_GLOBAL__N_116Q_QGS_s_instance13innerFunctionEvE6holder>, document=document@entry=0x591a980, 
    viewManager=viewManager@entry=0x6090430, parent=parent@entry=0x4aff720) at /home/appimage/persistent/krita/libs/ui/KisPart.cpp:294
#9  0x00007ffff6c85a08 in KisMainWindow::addViewAndNotifyLoadingCompleted (this=this@entry=0x4aff720, document=document@entry=0x591a980, subWindow=subWindow@entry=0x0)
    at /home/appimage/persistent/krita/libs/ui/KisMainWindow.cpp:1071
#10 0x00007ffff6c85af9 in KisMainWindow::slotLoadCompleted (this=0x4aff720) at /home/appimage/persistent/krita/libs/ui/KisMainWindow.cpp:1094
#11 0x00007ffff6c957e2 in KisMainWindow::qt_static_metacall (_o=0x4aff720, _c=<optimized out>, _id=<optimized out>, _a=0x7fffffffc670)
    at /home/appimage/appimage-workspace/krita-build/libs/ui/kritaui_autogen/include/moc_KisMainWindow.cpp:388
#12 0x00007ffff3a0b6f9 in QMetaObject::activate(QObject*, int, int, void**) () from /home/appimage/appimage-workspace/deps/usr/lib/libQt5Core.so.5
#13 0x00007ffff6c6ab90 in KisDocument::openUrlInternal (this=this@entry=0x591a980, url=...) at /home/appimage/persistent/krita/libs/ui/KisDocument.cpp:2059
#14 0x00007ffff6c6adf9 in KisDocument::openUrl (this=0x591a980, _url=..., flags=...) at /home/appimage/persistent/krita/libs/ui/KisDocument.cpp:1471
#15 0x00007ffff6c81575 in KisMainWindow::openDocumentInternal (this=this@entry=0x4aff720, url=..., flags=..., flags@entry=...) at /home/appimage/persistent/krita/libs/ui/KisMainWindow.cpp:1020
#16 0x00007ffff6c8bf8e in KisMainWindow::openDocument (this=0x4aff720, url=..., flags=flags@entry=...) at /home/appimage/persistent/krita/libs/ui/KisMainWindow.cpp:987
#17 0x00007ffff6a0e2c9 in KisWelcomePageWidget::recentDocumentClicked (this=0xa4c6780, index=...) at /home/appimage/persistent/krita/libs/ui/KisWelcomePageWidget.cpp:458
#18 0x00007ffff677b29d in KisWelcomePageWidget::qt_static_metacall (_o=<optimized out>, _c=<optimized out>, _id=<optimized out>, _a=<optimized out>)
Comment 1 Marina 2020-09-22 09:19:03 UTC
This is relevant for the Windows version too
Comment 2 Dmitry Kazakov 2020-09-22 09:36:59 UTC
Git commit b8f687a121330d81ff1cc21e068e2fc434effdcd by Dmitry Kazakov.
Committed on 22/09/2020 at 09:36.
Pushed by dkazakov into branch 'krita/4.3'.

Fix crash when loading a file with reference images

Initialization of reference images decorations should be postponed
until KisView is fully initialized.

M  +2    -2    libs/ui/KisView.cpp

https://invent.kde.org/graphics/krita/commit/b8f687a121330d81ff1cc21e068e2fc434effdcd
Comment 3 Dmitry Kazakov 2020-09-22 09:38:59 UTC
Git commit 0fcb61926705c19cafac723f76e5eee3393b091a by Dmitry Kazakov.
Committed on 22/09/2020 at 09:38.
Pushed by dkazakov into branch 'krita/4.4.0'.

Fix crash when loading a file with reference images

Initialization of reference images decorations should be postponed
until KisView is fully initialized.

M  +2    -2    libs/ui/KisView.cpp

https://invent.kde.org/graphics/krita/commit/0fcb61926705c19cafac723f76e5eee3393b091a
Comment 4 Dmitry Kazakov 2020-09-24 20:57:50 UTC
*** Bug 426934 has been marked as a duplicate of this bug. ***