Bug 461631 - Whenever I click on customised Inc 25 brush (on a main screen, in settings), Krita immediately crashes. So, I can’t remove or change this brush in any way.
Summary: Whenever I click on customised Inc 25 brush (on a main screen, in settings), ...
Status: RESOLVED FIXED
Alias: None
Product: krita
Classification: Applications
Component: Brush engines (show other bugs)
Version: 5.1.3
Platform: macOS (DMG) macOS
: NOR crash
Target Milestone: ---
Assignee: Krita Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-11-09 11:20 UTC by Natalia Astafeva
Modified: 2023-04-19 13:10 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
brush file that makes krita crash (17.96 KB, image/png)
2022-11-09 11:38 UTC, Raghavendra kamath
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Natalia Astafeva 2022-11-09 11:20:25 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***
as stated in the summary, whenever I use my pencil brush, the brush will crash krita whenever I click or Right-click on it

STEPS TO REPRODUCE
1. 
2. 
3. 

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 
Qt Version: 

ADDITIONAL INFORMATION
Comment 1 Natalia Astafeva 2022-11-09 11:21:37 UTC
Krita

 Version: 5.1.3
 Hidpi: true

Qt

  Version (compiled): 5.12.12
  Version (loaded): 5.12.12

OS Information

  Build ABI: arm64-little_endian-lp64
  Build CPU: arm64
  CPU: arm64
  Kernel Type: darwin
  Kernel Version: 22.1.0
  Pretty Productname: macOS 13.0
  Product Type: osx
  Product Version: 13.0

Locale

  Languages: en_CZ
  C locale: C
  QLocale current: en
  QLocale system: en
  QTextCodec for locale: UTF-8

OpenGL Info
 
  Vendor:  "Apple" 
  Renderer:  "Apple M1" 
  Version:  "4.1 Metal - 83" 
  Shading language:  "4.10" 
  Requested format:  QSurfaceFormat(version 3.2, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 24, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples -1, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CoreProfile) 
  Current format:  QSurfaceFormat(version 4.1, options QFlags<QSurfaceFormat::FormatOption>(), depthBufferSize 32, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 8, stencilBufferSize 8, samples 0, swapBehavior QSurfaceFormat::DoubleBuffer, swapInterval 0, colorSpace QSurfaceFormat::DefaultColorSpace, profile  QSurfaceFormat::CoreProfile) 
     Version: 4.1
     Supports deprecated functions false 
     is OpenGL ES: false 
  supportsBufferMapping: true 
  supportsBufferInvalidation: false 
  forceDisableTextureBuffers: false 
  Extensions: 
     "GL_ARB_draw_indirect" 
     "GL_ARB_draw_buffers_blend" 
     "GL_ARB_sample_shading" 
     "GL_ARB_texture_rgb10_a2ui" 
     "GL_ARB_internalformat_query" 
     "GL_EXT_texture_compression_s3tc" 
     "GL_ARB_texture_cube_map_array" 
     "GL_EXT_texture_sRGB_decode" 
     "GL_ARB_blend_func_extended" 
     "GL_ARB_shader_bit_encoding" 
     "GL_EXT_texture_filter_anisotropic" 
     "GL_ARB_vertex_type_2_10_10_10_rev" 
     "GL_ARB_ES2_compatibility" 
     "GL_ARB_shading_language_include" 
     "GL_APPLE_flush_render" 
     "GL_ARB_texture_gather" 
     "GL_APPLE_client_storage" 
     "GL_NV_texture_barrier" 
     "GL_APPLE_row_bytes" 
     "GL_ARB_sampler_objects" 
     "GL_ARB_transform_feedback2" 
     "GL_ARB_transform_feedback3" 
     "GL_ARB_separate_shader_objects" 
     "GL_ARB_texture_swizzle" 
     "GL_APPLE_texture_range" 
     "GL_ARB_texture_buffer_object_rgb32" 
     "GL_ARB_texture_storage" 
     "GL_ARB_instanced_arrays" 
     "GL_ARB_gpu_shader5" 
     "GL_EXT_framebuffer_multisample_blit_scaled" 
     "GL_ARB_explicit_attrib_location" 
     "GL_ARB_texture_query_lod" 
     "GL_ARB_tessellation_shader" 
     "GL_ARB_viewport_array" 
     "GL_ARB_timer_query" 
     "GL_EXT_debug_label" 
     "GL_ARB_vertex_attrib_64bit" 
     "GL_ARB_gpu_shader_fp64" 
     "GL_APPLE_container_object_shareable" 
     "GL_ARB_shader_subroutine" 
     "GL_ARB_occlusion_query2" 
     "GL_EXT_debug_marker" 
     "GL_APPLE_rgb_422" 

QPA OpenGL Detection Info 
  supportsDesktopGL: true 
  supportsOpenGLES: false 
  isQtPreferOpenGLES: false 

useBufferInvalidation (config option): false


Hardware Information

  GPU Acceleration: desktop
  Memory: 8192 Mb
  Number of Cores: 8
  Swap Location: /private/var/folders/k0/kp4gp4qx5tgfct1l_g7j6xmc0000gn/T
  Built for: arm64+neon
  Base instruction set: arm64+neon
  Supported instruction sets: arm64+neon arm32+neon avx512bw avx512dq avx512cd avx512f fma3+avx2 avx2 fma3+avx avx fma4 fma3+sse4.2 sse4.2 sse4.1 ssse3 sse3 sse2 

Current Settings

  Current Swap Location: /private/var/folders/k0/kp4gp4qx5tgfct1l_g7j6xmc0000gn/T
  Current Swap Location writable: true
  Undo Enabled: true
  Undo Stack Limit: 200
  Use OpenGL: true
  Use OpenGL Texture Buffer: true
  Disable Vector Optimizations: false
  Disable AVX Optimizations: false
  Canvas State: OPENGL_SUCCESS
  Autosave Interval: 420
  Use Backup Files: true
  Number of Backups Kept: 1
  Backup File Suffix: ~
  Backup Location: Same Folder as the File
  Backup Location writable: false
  Use Win8 Pointer Input: false
  Use RightMiddleTabletButton Workaround: false
  Levels of Detail Enabled: false
  Use Zip64: false


Loaded Python Plugins
	colorspace
	comics_project_management_tools
	documenttools
	exportlayers
	filtermanager
	lastdocumentsdocker
	plugin_importer
	quick_settings_docker
	scripter
	tenbrushes
	tenscripts


Display Information
Number of screens: 1
	Screen: 0
		Name: 
		Depth: 24
		Scale: 2
		Physical DPI127.5
		Logical DPI72
		Physical Size: 286.871, 179.294
		Position: 0, 0
		Resolution in pixels: 1440x900
		Manufacturer: 
		Model: 
		Refresh Rate: 60

SESSION: 09 Nov 2022 11:22:39 +0100. Executing /Volumes/krita/krita.app/Contents/MacOS/krita

Krita Version: 5.1.1, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 10125
-- -- -- -- -- -- -- --
09 Nov 2022 11:22:39 +0100: Style: fusion. Available styles: macintosh, Windows, Fusion
09 Nov 2022 11:22:41 +0100: Database is up to date. Version: 0.0.17, created by Krita 5.1.1, at Wed Oct 19 10:40:43 2022
09 Nov 2022 11:22:44 +0100: Importing image/vnd.adobe.photoshop to application/x-krita. Location: /Users/jester_nata/Documents/🎨 Art/Portrait.psd. Real location: /Users/jester_nata/Documents/🎨 Art/Portrait.psd. Batchmode: 1
09 Nov 2022 11:22:47 +0100: Loaded image from image/vnd.adobe.photoshop. Size: 2480 * 3508 pixels, 4.16667 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 24
09 Nov 2022 11:22:59 +0100: Created image "Unnamed", 2480 * 3508 pixels, 300 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 3

KRITA DID NOT CLOSE CORRECTLY
================================================================================






SESSION: 09 Nov 2022 11:23:51 +0100. Executing /Volumes/krita/krita.app/Contents/MacOS/krita

Krita Version: 5.1.1, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 10160
-- -- -- -- -- -- -- --
09 Nov 2022 11:23:51 +0100: Style: fusion. Available styles: macintosh, Windows, Fusion
09 Nov 2022 11:23:53 +0100: Database is up to date. Version: 0.0.17, created by Krita 5.1.1, at Wed Oct 19 10:40:43 2022
09 Nov 2022 11:23:55 +0100: Importing image/vnd.adobe.photoshop to application/x-krita. Location: /Users/jester_nata/Documents/🎨 Art/Portrait.psd. Real location: /Users/jester_nata/Documents/🎨 Art/Portrait.psd. Batchmode: 1
09 Nov 2022 11:23:58 +0100: Loaded image from image/vnd.adobe.photoshop. Size: 2480 * 3508 pixels, 4.16667 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 24
09 Nov 2022 11:24:31 +0100: Created image "Unnamed", 2480 * 3508 pixels, 300 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 3
09 Nov 2022 11:28:28 +0100: CLOSING SESSION
================================================================================





SESSION: 09 Nov 2022 11:29:29 +0100. Executing /Volumes/krita 1/krita.app/Contents/MacOS/krita

Krita Version: 5.1.3, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 10206
-- -- -- -- -- -- -- --
09 Nov 2022 11:29:29 +0100: Style: fusion. Available styles: macintosh, Windows, Fusion
09 Nov 2022 11:29:30 +0100: Database is up to date. Version: 0.0.17, created by Krita 5.1.1, at Wed Oct 19 10:40:43 2022
09 Nov 2022 11:29:40 +0100: Created image "Unnamed", 2480 * 3508 pixels, 300 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 3

KRITA DID NOT CLOSE CORRECTLY
================================================================================




SESSION: 09 Nov 2022 11:41:17 +0100. Executing /Volumes/krita/krita.app/Contents/MacOS/krita

Krita Version: 5.1.1, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 10302
-- -- -- -- -- -- -- --
09 Nov 2022 11:41:17 +0100: Style: fusion. Available styles: macintosh, Windows, Fusion
09 Nov 2022 11:41:19 +0100: Database is up to date. Version: 0.0.17, created by Krita 5.1.1, at Wed Oct 19 10:40:43 2022
09 Nov 2022 11:41:21 +0100: Importing image/vnd.adobe.photoshop to application/x-krita. Location: /Users/jester_nata/Documents/🎨 Art/Portrait.psd. Real location: /Users/jester_nata/Documents/🎨 Art/Portrait.psd. Batchmode: 1
09 Nov 2022 11:41:23 +0100: Loaded image from image/vnd.adobe.photoshop. Size: 2480 * 3508 pixels, 4.16667 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 24
09 Nov 2022 11:41:24 +0100: CLOSING SESSION
================================================================================



SESSION: 09 Nov 2022 11:42:35 +0100. Executing /Volumes/krita/krita.app/Contents/MacOS/krita

Krita Version: 5.1.3, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 10328
-- -- -- -- -- -- -- --
09 Nov 2022 11:42:35 +0100: Style: fusion. Available styles: macintosh, Windows, Fusion
09 Nov 2022 11:42:36 +0100: Database is up to date. Version: 0.0.17, created by Krita 5.1.1, at Wed Oct 19 10:40:43 2022
09 Nov 2022 11:42:39 +0100: Importing application/x-krita to application/x-krita. Location: /Users/jester_nata/.krita-9510-document_1-autosave.kra. Real location: /Users/jester_nata/.krita-9510-document_1-autosave.kra. Batchmode: 0
09 Nov 2022 11:42:40 +0100: Loaded image from application/x-krita. Size: 2480 * 3508 pixels, 4.16667 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 5

KRITA DID NOT CLOSE CORRECTLY
================================================================================


SESSION: 09 Nov 2022 11:42:52 +0100. Executing /Volumes/krita/krita.app/Contents/MacOS/krita

Krita Version: 5.1.3, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 10352
-- -- -- -- -- -- -- --
09 Nov 2022 11:42:52 +0100: Style: fusion. Available styles: macintosh, Windows, Fusion
09 Nov 2022 11:42:52 +0100: Database is up to date. Version: 0.0.17, created by Krita 5.1.1, at Wed Oct 19 10:40:43 2022
09 Nov 2022 11:42:59 +0100: Created image "Unnamed", 2480 * 3508 pixels, 300 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 3
09 Nov 2022 11:45:00 +0100: CLOSING SESSION
================================================================================

SESSION: 09 Nov 2022 11:57:07 +0100. Executing /Volumes/krita/krita.app/Contents/MacOS/krita

Krita Version: 5.1.3, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 10518
-- -- -- -- -- -- -- --
09 Nov 2022 11:57:07 +0100: Style: fusion. Available styles: macintosh, Windows, Fusion
09 Nov 2022 11:57:09 +0100: Database is up to date. Version: 0.0.17, created by Krita 5.1.1, at Wed Oct 19 10:40:43 2022
09 Nov 2022 11:57:15 +0100: Importing application/x-krita to application/x-krita. Location: /Users/jester_nata/.krita-9510-document_1-autosave.kra. Real location: /Users/jester_nata/.krita-9510-document_1-autosave.kra. Batchmode: 0
09 Nov 2022 11:57:15 +0100: Loaded image from application/x-krita. Size: 2480 * 3508 pixels, 4.16667 dpi. Color model: 8-bit integer/channel RGB/Alpha (sRGB-elle-V2-srgbtrc.icc). Layers: 5

KRITA DID NOT CLOSE CORRECTLY
================================================================================
SESSION: 09 Nov 2022 12:14:49 +0100. Executing /Volumes/krita/krita.app/Contents/MacOS/krita

Krita Version: 5.1.3, Qt version compiled: 5.12.12, loaded: 5.12.12. Process ID: 10742
-- -- -- -- -- -- -- --
09 Nov 2022 12:14:49 +0100: Style: fusion. Available styles: macintosh, Windows, Fusion
09 Nov 2022 12:14:50 +0100: Database is up to date. Version: 0.0.17, created by Krita 5.1.1, at Wed Oct 19 10:40:43 2022

---------------------
Comment 2 Natalia Astafeva 2022-11-09 11:34:07 UTC
kpp. file of this brush: https://drive.google.com/file/d/1bAneKFAVkgoEFUsuVSwfd2OLttwluS6t/view?usp=share_link
Comment 3 Raghavendra kamath 2022-11-09 11:38:00 UTC
Created attachment 153619 [details]
brush file that makes krita crash
Comment 4 Raghavendra kamath 2022-11-09 11:38:47 UTC
I can confirm that the brush attached here crashes krita on my system.

The discussion is here on KA - https://krita-artists.org/t/brush-bug-and-krita-crash/51346/7
Comment 5 Freya Lupen 2022-11-09 16:17:01 UTC
For some reason KisPropertiesConfiguration::getCubicCurve "SizecommonCurve" tries to create a curve from an empty string (QVariant(QString, "")), then Krita crashes trying to read the nonexistent points from this curve (in KisCurveWidget::Private::syncIOControls).
For reference the brush XML contains this value:
> <param type="string" name="SizecommonCurve"><![CDATA[0,0.0839732;0.311943,0.311038;0.65,0.728643;0.85,0.884422;0.99,0.79397;]]></param>
Comment 6 Dmitry Kazakov 2023-04-19 13:10:17 UTC
Git commit e272e53a4665dd24e3c775e718f60b65dd5c06f8 by Dmitry Kazakov.
Committed on 19/04/2023 at 13:09.
Pushed by dkazakov into branch 'master'.

Fix locked brush properties leaking into .kpp files

Locked properties have "_previous" suffix in the property key, these
properties should not be saved into .kpp files, because it results
in confusing state on loading. The brush should be saved in the "current"
state.

M  +14   -0    libs/image/brushengine/kis_locked_properties_proxy.cpp
M  +2    -0    libs/image/brushengine/kis_locked_properties_proxy.h
M  +2    -2    libs/image/kis_properties_configuration.cc
M  +1    -1    libs/image/kis_properties_configuration.h

https://invent.kde.org/graphics/krita/commit/e272e53a4665dd24e3c775e718f60b65dd5c06f8
Comment 7 Dmitry Kazakov 2023-04-19 13:10:41 UTC
Git commit 0092bb7b0d047c38dea87b52f63d1652514c723b by Dmitry Kazakov.
Committed on 19/04/2023 at 13:09.
Pushed by dkazakov into branch 'master'.

Make sure that "common curve" property of the brush is never empty

It seems like there are brush presets in the wild which have it
empty. The preset in the bug report was saved with "Locked Properties"
feature active, which makes the preset loading code very confused.

M  +3    -0    plugins/paintops/libpaintop/KisKritaSensorPack.cpp

https://invent.kde.org/graphics/krita/commit/0092bb7b0d047c38dea87b52f63d1652514c723b