Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2012-07-13 17:47:13 +0400
committerSergey Sharybin <sergey.vfx@gmail.com>2012-07-13 17:47:13 +0400
commit807ad1f0e0de49711d58ade2b660e74ec5452b2b (patch)
tree06989f02b2a73b64cb89e28d79a294ac357c4206 /source/blender/nodes/composite/node_composite_util.c
parenta5e6d73d412146cf9cdd077aec0b71cb615dd361 (diff)
Fix #32087: Crash while changing values in comp editor (bt and blender included)
Issue was caused by threading conflict between compositor output node which is freeing buffers used by render result image and image draw code which could use buffers at the same time as compositor frees this buffers. Solved by adding adding lock around viewer image invalidation and image drawing. Use renamed LOCK_PREVIEW mutex for this, which si not called LOCK_DRAW_IMAGE. With new compositor locking for preview is not needed so it could be removed. Added the same lock around viewer operation which also frees buffers used by viewer image. It's actually quite difficult to check whether this is indeed needed. This code seems to be using acquire/release technique, but somehow acquiring ImBuf before invalidating it in compositor operation doesn't resolve the issue, so probably it's not actually locking acquire and things should be checked deeper.
Diffstat (limited to 'source/blender/nodes/composite/node_composite_util.c')
-rw-r--r--source/blender/nodes/composite/node_composite_util.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/nodes/composite/node_composite_util.c b/source/blender/nodes/composite/node_composite_util.c
index 98ded3ea3b3..1b9ff610e4c 100644
--- a/source/blender/nodes/composite/node_composite_util.c
+++ b/source/blender/nodes/composite/node_composite_util.c
@@ -647,7 +647,7 @@ void generate_preview(void *data, bNode *node, CompBuf *stackbuf)
if (stackbuf_use!=stackbuf)
free_compbuf(stackbuf_use);
- BLI_lock_thread(LOCK_PREVIEW);
+ // BLI_lock_thread(LOCK_PREVIEW);
if (preview->rect)
MEM_freeN(preview->rect);
@@ -655,7 +655,7 @@ void generate_preview(void *data, bNode *node, CompBuf *stackbuf)
preview->ysize= ysize;
preview->rect= rect;
- BLI_unlock_thread(LOCK_PREVIEW);
+ // BLI_unlock_thread(LOCK_PREVIEW);
}
}