Bug 408927

Summary: Segmentation fault when opening this file - with backtrace
Product: [Applications] krita Reporter: M <manuel.snudl.zeidler>
Component: GeneralAssignee: Tiar <tamtamy.tymona>
Severity: normal CC: halla, tamtamy.tymona
Priority: NOR    
Version: git master (please specify the git hash!)   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Test .kra file that causes a crash
gdb backtrace

Description M 2019-06-19 21:12:39 UTC
Created attachment 121014 [details]
Test .kra file that causes a crash

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.

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

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


  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