Bug 412278 - Assertion failure when trying to open a specific kra document
Summary: Assertion failure when trying to open a specific kra document
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: File formats (show other bugs)
Version: 4.2.6
Platform: openSUSE Linux
: NOR crash
Target Milestone: ---
Assignee: Dmitry Kazakov
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2019-09-24 13:23 UTC by Andrei Alexeyev
Modified: 2019-11-11 09:34 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Stack trace (36.64 KB, text/plain)
2019-09-24 13:23 UTC, Andrei Alexeyev
Details
Stack trace (v4.3.0-prealpha-451-g9894a20269) (30.59 KB, text/plain)
2019-09-27 02:28 UTC, Andrei Alexeyev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Andrei Alexeyev 2019-09-24 13:23:05 UTC
Created attachment 122833 [details]
Stack trace

SUMMARY
Trying to open a specific document that was previously saved with Krita triggers an assertion failure and crashes Krita.

Here is a link to the document (it's too big to attach): https://github.com/taisei-project/taisei-rawmedia/raw/062eaaa2618f7622f46f349645627c37a8cb5fa1/gfx/dialog/afens/cirno.kra

Stack trace from all threads attached.

STEPS TO REPRODUCE
1. Download the file and open it with Krita.
2. Wait.
3. Krita should crash in a few seconds.
4. Appreciate the stunning beauty and elegance of Reimu Hakurei. (optional but highly recommended)

OBSERVED RESULT
This on stderr followed by an abort:

SAFE ASSERT (krita): "newLod > 0" in file /home/abuild/rpmbuild/BUILD/krita-4.2.6/libs/image/kis_paint_device.cc, line 659
SAFE ASSERT (krita): "newLod > 0" in file /home/abuild/rpmbuild/BUILD/krita-4.2.6/libs/image/kis_paint_device.cc, line 659
ASSERT (krita): "lod > 0" in file /home/abuild/rpmbuild/BUILD/krita-4.2.6/libs/image/kis_paint_device.cc, line 705

EXPECTED RESULT
File opened normally.

SOFTWARE/OS VERSIONS
Linux distro: openSUSE Tumbleweed 20190920
KDE Plasma Version: 5.16.5
KDE Frameworks Version: 5.61.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION
N/A
Comment 1 vanyossi 2019-09-25 02:52:45 UTC
On krita master f867486c5e835cd (macOS) I only got the assert once on opening but krita never crashed. I did try to reopen the file several times but the assert never showed again in the terminal.

It is possible this bug is already fixed, or that maybe I need to paint in a certain way to trigger it as just waiting, or doing strokes on a new layer, does not cause the file to crash krita.

Could you test if you can reproduce it in latest nightly krita? (Download krita next form the download page)
Comment 2 Andrei Alexeyev 2019-09-27 02:26:59 UTC
I've built Krita from master the other day (v4.3.0-prealpha-451-g9894a20269), and unfortunately the crash still persists.
Comment 3 Andrei Alexeyev 2019-09-27 02:28:11 UTC
Created attachment 122895 [details]
Stack trace (v4.3.0-prealpha-451-g9894a20269)
Comment 4 Bug Janitor Service 2019-09-27 04:33:09 UTC
Thanks for your comment!

Automatically switching the status of this bug to REPORTED so that the KDE team
knows that the bug is ready to get confirmed.

In the future you may also do this yourself when providing needed information.
Comment 5 Halla Rempt 2019-09-28 08:08:50 UTC
I can conform the crash. The terminal output is a bit crazy too:

SAFE ASSERT (krita): "newLod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 659
SAFE ASSERT (krita): "newLod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 659
ASSERT (krita): "lod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 705
ASSERT (krita): "lod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 705
ASSERT (krita): "lod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 705
ASSERT (krita): "lod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 705
ASSERT (krita): "lod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 705
ASSERT (krita): "lod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 705
ASSERT (krita): "lod > 0" in file /home/boud/dev/krita/libs/image/kis_paint_device.cc, line 705
Re-raising signal for core dump handling.
Aborted (core dumped)
Comment 6 Dmitry Kazakov 2019-11-11 09:34:01 UTC
Git commit b18e3df355605b1332b74af494757121adda6d53 by Dmitry Kazakov.
Committed on 11/11/2019 at 09:24.
Pushed by dkazakov into branch 'master'.

Fix crash when opening image with a Clone Layer and IP active

All paint devices owned by layers should have default bounds set
correctly. Otherwise, LoD generation will not work (and some other
things, like wraparound and animation).

M  +12   -2    libs/image/kis_clone_layer.cpp
M  +2    -0    libs/image/kis_clone_layer.h

https://invent.kde.org/kde/krita/commit/b18e3df355605b1332b74af494757121adda6d53
Comment 7 Dmitry Kazakov 2019-11-11 09:34:53 UTC
Git commit eda311fc215b8edd3c169be0e8fa8b12a69bca8b by Dmitry Kazakov.
Committed on 11/11/2019 at 09:34.
Pushed by dkazakov into branch 'krita/4.2'.

Fix crash when opening image with a Clone Layer and IP active

All paint devices owned by layers should have default bounds set
correctly. Otherwise, LoD generation will not work (and some other
things, like wraparound and animation).

M  +12   -2    libs/image/kis_clone_layer.cpp
M  +2    -0    libs/image/kis_clone_layer.h

https://invent.kde.org/kde/krita/commit/eda311fc215b8edd3c169be0e8fa8b12a69bca8b