Krita 5 nightly unable to load some brushes on macOS

Only very few brushes in Krita_4_Default_Resources.bundle could be loaded. I’m using krita-nightly_d5cba49.dmg.

System version: macOS 10.15.7
Start up log:

$ /Applications/krita.app/Contents/MacOS/krita
[snip]
Could not load the resource from the bundle "paintoppresets" "paintoppresets/a)_Eraser_Circle.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/a)_Eraser_Small.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/a)_Eraser_Soft.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b)_Airbrush_Soft.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b)_Basic-2_Opacity.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b)_Basic-3_Flow.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b)_Basic-4_Flow_Opacity.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b)_Basic-5_Size_Opacity.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b)_Basic-5_Size_default.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/b)_Basic-6_Details.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/c)_Pencil-1_Hard.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/c)_Pencil-2.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/c)_Pencil-3_Large_4B.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/c)_Pencil-4_Soft.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/c)_Pencil-5_Tilted.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/c)_Pencil-6_Quick_Shade.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/d)_Ink-1_Precision.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/d)_Ink-2_Fineliner.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/d)_Ink-3_Gpen.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/d)_Ink-4_Pen_Rough.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
Could not load the resource from the bundle "paintoppresets" "paintoppresets/d)_Ink-7_Brush_Rough.kpp" "/Users/<user>/Library/Application Support/krita/Krita_4_Default_Resources.bundle"
[snip]

Can you say which brush presets could be loaded? Are you sure they are from the bundle and not from the general resources folder?

Can you say which brush presets could be loaded?

The preset is loaded, but it’s incomplete.

Are you sure they are from the bundle and not from the general resources folder?

Yes, I have tried rm -rf Library/Application\ Support/krita* Library/Preferences/krita* before starting Krita.

Could also reproduce on macOS 11.

The whole pencil family and erasers are gone, only Basic-1 is left in the basic series, etc.

I can reproduce the issue: it is macOS specfic. I’ve created a bug report and will look into it: 438209 – On macOS, bundles cannot be opened

1 Like

Looks like “paintbrush” and “duplicate” from DefaultPaintOpsPlugin are not registered. Still investigating.

Looks like the SHARED library type is not working. Changing it to MODULE fixed the problem.

diff --git a/plugins/paintops/defaultpaintops/CMakeLists.txt b/plugins/paintops/defaultpaintops/CMakeLists.txt
index 944396ddb7..19fe60251e 100644
--- a/plugins/paintops/defaultpaintops/CMakeLists.txt
+++ b/plugins/paintops/defaultpaintops/CMakeLists.txt
@@ -1,5 +1,3 @@
-add_subdirectory(brush/tests)
-
 include_directories(brush
                     duplicate
                     ${CMAKE_CURRENT_BINARY_DIR})
@@ -22,11 +20,7 @@ set(kritadefaultpaintops_SOURCES
 
 ki18n_wrap_ui(kritadefaultpaintops_SOURCES duplicate/wdgduplicateop.ui )
 
-if (APPLE)
-    add_library(kritadefaultpaintops SHARED ${kritadefaultpaintops_SOURCES})
-else()
-    add_library(kritadefaultpaintops MODULE ${kritadefaultpaintops_SOURCES})
-endif()
+add_library(kritadefaultpaintops MODULE ${kritadefaultpaintops_SOURCES})
     
 generate_export_header(kritadefaultpaintops BASE_NAME kritadefaultpaintops EXPORT_MACRO_NAME KRITADEFAULTPAINTOPS_EXPORT)

Why was the build type on macOS not changed in Create these libraries as MODULE, not SHARED on OS's other than macOS (d7683187) · Commits · Graphics / Krita · GitLab?

Probably because they were changed to shared explicitly on macos because that made the tests link. @IvanYossi can you take a look?