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/blenlib/BLI_threads.h
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/blenlib/BLI_threads.h')
-rw-r--r--source/blender/blenlib/BLI_threads.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_threads.h b/source/blender/blenlib/BLI_threads.h
index 3b75797a3a9..902373bcd6b 100644
--- a/source/blender/blenlib/BLI_threads.h
+++ b/source/blender/blenlib/BLI_threads.h
@@ -70,7 +70,7 @@ int BLI_system_thread_count(void); /* gets the number of threads the system
* One custom lock available now. can be extended. */
#define LOCK_IMAGE 0
-#define LOCK_PREVIEW 1
+#define LOCK_DRAW_IMAGE 1
#define LOCK_VIEWER 2
#define LOCK_CUSTOM1 3
#define LOCK_RCACHE 4