[Bf-blender-cvs] [2907227db2c] master: Fix T103880: Crash with Line Art Grease-Pencil modifier
Campbell Barton
noreply at git.blender.org
Thu Jan 19 10:43:02 CET 2023
Commit: 2907227db2c91a55d9b55f5d06e82f0547200bb9
Author: Campbell Barton
Date: Thu Jan 19 20:33:44 2023 +1100
Branches: master
https://developer.blender.org/rB2907227db2c91a55d9b55f5d06e82f0547200bb9
Fix T103880: Crash with Line Art Grease-Pencil modifier
The line art modifier added a wmNotifier in it's
GpencilModifierTypeInfo.generateStrokes callback which isn't thread-safe
when called from the depsgraph. This was from the original inclusion
of the feature [0] however a more recent optimization to notifier
lookups [1] made the crash occur more frequently.
Remove the notifier as modifiers should not be adding WM level events
and it works without it.
[0]: 3e87d8a4315d794efff659e40f0bb9e34e2aec8a
[1]: 0aaff9a07d3bdf8588cef15d502aeb4fdab22e5e
===================================================================
M source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
===================================================================
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
index b33a6970d1f..88c7ab9d96c 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencillineart.c
@@ -44,9 +44,6 @@
#include "MOD_gpencil_ui_common.h"
#include "lineart/MOD_lineart.h"
-#include "WM_api.h"
-#include "WM_types.h"
-
static void initData(GpencilModifierData *md)
{
LineartGpencilModifierData *gpmd = (LineartGpencilModifierData *)md;
@@ -168,8 +165,6 @@ static void generateStrokes(GpencilModifierData *md, Depsgraph *depsgraph, Objec
* cache. */
lmd->cache = gpd->runtime.lineart_cache;
}
-
- WM_main_add_notifier(NA_EDITED | NC_GPENCIL, NULL);
}
static void bakeModifier(Main *UNUSED(bmain),
More information about the Bf-blender-cvs
mailing list