Krita 5.0 is EXTREMELY unstable, constant crashes

Hi, all!

I think I have a fix for the bug (thanks to the report from @fullmontis!). Could you please help me with testing the fix?

I need two rounds of testing (with the same package). Firstly, run the package in the following way:

export ASAN_OPTIONS='new_delete_type_mismatch=0,detect_leaks=0,alloc_dealloc_mismatch=0'
./krita-5.1.0-prealpha-a08a1e5c997-x86_64.appimage

If nothing is found, try to enable “slow signal delivery” option, which introduces an artificial delay for signal delivery and makes the bugs of this type more easy to trigger a crash :wink:

export KRITA_SLOW_SIGNAL_DELIVERY=1
export ASAN_OPTIONS='new_delete_type_mismatch=0,detect_leaks=0,alloc_dealloc_mismatch=0'
./krita-5.1.0-prealpha-a08a1e5c997-x86_64.appimage

The second version should run significantly slower than normal Krita, but it is easier to crash it :slight_smile:

Test Plan

The original crash happens when an undo command for vector object creation was deleted. Therefore, to make the situation more difficult to Krita make sure you do the follwoing:

  1. Reduce undo stack limit to some lower value, e.g. 30.
  2. Make sure that while testing you also use vector objects and/or vector selections.

Package Link

AppImage: krita-5.1.0-prealpha-a08a1e5c997-x86_64.appimage — Яндекс Диск