Blender Git Commit Log

Git Commits -> Revision 05721cd

Revision 05721cd by Jacques Lucke (master)
September 5, 2019, 07:57 (GMT)
Mesh Batch Cache: Fix threading issue

I believed the crash I experienced happened because:
1. The `extract_pos_nor_init` function is called.
2. Tasks are added to the task pool for `extract_pos_nor`.
3. The tasks begin to be executed while more tasks are added.
4. In some rare cases, all existing tasks are finished, but not all have been added yet.
5. This let the task-counter go down to zero.
6. This triggered a call to `extract_pos_nor_finish`.
7. Then more tasks are added and in the end `extract_pos_nor_finish` is called again.

A solution is to use a task pool that is suspended when created.
Unfortunately, there was an outdated comment, that was probably the root cause of the issue.

Reviewers: fclem, sergey

Differential Revision: https://developer.blender.org/D5680

Commit Details:

Full Hash: 05721cd00ad164822e270500237fc9457d969812
Parent Commit: 17baa43
Lines Changed: +2, -4

2 Modified Paths:

/source/blender/blenlib/intern/task.c (+1, -3) (Diff)
/source/blender/draw/intern/draw_cache_extract_mesh.c (+1, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021