Bug 408927 - Segmentation fault when opening this file - with backtrace
Summary: Segmentation fault when opening this file - with backtrace
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: General (show other bugs)
Version: git master (please specify the git hash!)
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: Tiar
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-06-19 21:12 UTC by M
Modified: 2019-06-23 22:50 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Test .kra file that causes a crash (2.37 MB, application/x-krita)
2019-06-19 21:12 UTC, M
Details
gdb backtrace (21.29 KB, text/plain)
2019-06-19 21:13 UTC, M
Details

Note You need to log in before you can comment on or make changes to this bug.
Description M 2019-06-19 21:12:39 UTC
Created attachment 121014 [details]
Test .kra file that causes a crash

SUMMARY
Attempting to normally open the attached .kra file results in Krita master crashing with a segmentation fault - the file opens fine in 4.2.1 (distro package). It only contains a fill layer, a reference image and a few assistants.

Strangely enough the canvas acceleration sometimes gets disabled automatically, but the crash happens regardless of it being on or off.

STEPS TO REPRODUCE
Simply open the attached file in Krita and it should freeze or close completely.

SYSTEM INFO
Version: 4.3.0-prealpha (git 62e6d33)
 Languages: en_US
 Hidpi: true

Qt

  Version (compiled): 5.12.4
  Version (loaded): 5.12.4

OS Information

  Build ABI: x86_64-little_endian-lp64
  Build CPU: x86_64
  CPU: x86_64
  Kernel Type: linux
  Kernel Version: 5.2.0-2-MANJARO
  Pretty Productname: Manjaro Linux
  Product Type: manjaro
  Product Version: unknown


Hardware Information

  GPU Acceleration: auto
  Memory: 15950 Mb
  Number of Cores: 8
  Swap Location: /tmp
Comment 1 M 2019-06-19 21:13:19 UTC
Created attachment 121015 [details]
gdb backtrace
Comment 2 M 2019-06-20 08:29:14 UTC
Reference images seem to be the culprit, when all are removed it loads fine. Afterwards I can readd a reference image to the document, but when I close it and try to open again the same crash occurs.

Same result also with the Next appimage from yesterday.
Comment 3 Tiar 2019-06-23 22:50:47 UTC
Git commit 311d804aa23f1993ec19513cdd90ad0758627f3c by Agata Cacko.
Committed on 23/06/2019 at 21:25.
Pushed by tymond into branch 'master'.

Fix segfault when loading .kra file with a ref pic

There was a crash caused by not checking if anything is on the reference
images layer before updating it. This commit fixes this behaviour.
Reference images should still load just fine.

M  +3    -1    libs/ui/KisReferenceImagesDecoration.cpp

https://invent.kde.org/kde/krita/commit/311d804aa23f1993ec19513cdd90ad0758627f3c