Blender Git Commit Log

Git Commits -> Revision 5fb93df

Revision 5fb93df by Jacques Lucke (temp-lanpr-staging)
September 12, 2019, 01:10 (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: 5fb93df76f6a2fcd70545abdda95dfd379999877
Parent Commit: a1a7fc9
Committed By: YimingWu
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