**Blender Version**
Broken: development version (after 2.76)
**Short description of error**
I have 3 objects A, B, C
data transfer modifier on A transfers data from B
data transfer modifier on C transfers data from B
When i move one of the objects around in object mode then occasionally Blender crashes.
I can reproduce this behavior when all addons are disabled.
And the problem goes away when i disable the data transfer modifiers.
**Exact steps for others to reproduce the error**
Open the included blend file {F249844}
select the middle object and move it around a bit.
what seems to work "best" is:
G z then move the mouse frantically on your desk.
Sometimes the crash happens right away, sometimes it takes minutes to get it to appear.
The crash takes longer to show up when blender is in debug mode,
but i can get it to break there within a minuite.
The crash happens always here:
static void customData_update_offsets(CustomData *data)
{
const LayerTypeInfo *typeInfo;
int i, offset = 0;
for (i = 0; i < data->totlayer; ++i) {
typeInfo = layerType_getInfo(data->layers[i].type);
data->layers[i].offset = offset;
offset += typeInfo->size; /*<== Crash because typeinfo is NULL */
}
data->totsize = offset;
CustomData_update_typemap(data);
}
The reason for this is the last data layer (5) is not initialized or contains broken data.
Here is the content of data->layers[5] when the crash happens:
data->layers[5] {type=-33686019 offset=64 flag=-1414812757 ...} CustomDataLayer
type -33686019 int
offset 64 int
flag -1414812757 int
active -1414812757 int
active_rnd -1414812757 int
active_clone -17891602 int
active_mask -17891602 int
uid -17891602 int
name 0x0000000010a30030 "" char[64]
data 0xfeeefeeefeeefeee void *
The Main thread works on Object A (which has a data transfer modifier defined with source Object B)
The Stack of the Blender Main Thread is:
blender-app.exe!customData_update_offsets(CustomData * data) Line 1619 C
blender-app.exe!customData_add_layer__internal(CustomData * data, ...) Line 1925 C
blender-app.exe!CustomData_add_layer(CustomData * data, int type, int alloctype, void * layerdata, int totelem) Line 1935 C
blender-app.exe!dm_getLoopArray(DerivedMesh * dm) Line 155 C
blender-app.exe!CDDM_calc_loop_normals_spacearr(DerivedMesh * dm, ...) Line 2620 C
blender-app.exe!CDDM_calc_loop_normals(DerivedMesh * dm, ...) Line 2611 C
blender-app.exe!data_transfer_dtdata_type_preprocess(Object * UNUSED_ob_src, ...) Line 279 C
blender-app.exe!BKE_object_data_transfer_dm(Scene * scene, Object * ob_src, ...) Line 1171 C
blender-app.exe!applyModifier(ModifierData * md, Object * ob, ...) Line 211 C
blender-app.exe!modwrap_applyModifier(ModifierData * md, ...) Line 745 C
blender-app.exe!mesh_calc_modifiers(Scene * scene, Object * ob, ...) Line 2037 C
blender-app.exe!mesh_build_data(Scene * scene, Object * ob, ...) Line 2582 C
blender-app.exe!makeDerivedMesh(Scene * scene, Object * ob, BMEditMesh * em, ...) Line 2676 C
blender-app.exe!BKE_object_handle_data_update(EvaluationContext * eval_ctx, Scene * scene, ...) Line 203 C
blender-app.exe!BKE_object_handle_update_ex(EvaluationContext * eval_ctx, Scene * scene, Object * ob, ...) Line 3144 C
blender-app.exe!scene_update_object_func(TaskPool * pool, ...) Line 1471 C
blender-app.exe!task_scheduler_thread_run(void * thread_p) Line 164 C
Besides this there is another concurrent thread that currently executes BKE_mesh_calc_normals_poly()
This thread works on object C (which has a data transfer modifier defined with source Object B)
The Stack of the concurrent Thread is:
blender-app.exe!BKE_mesh_calc_poly_normal(const MPoly * mpoly, ...) Line 1797
blender-app.exe!BKE_mesh_calc_normals_poly$omp$1() Line 242
blender-app.exe!BKE_mesh_calc_normals_poly(MVert * mverts, ...) Line 244
blender-app.exe!CDDM_calc_loop_normals_spacearr(DerivedMesh * dm, ...) Line 2652
blender-app.exe!CDDM_calc_loop_normals(DerivedMesh * dm, ...) Line 2611
blender-app.exe!data_transfer_dtdata_type_preprocess(Object * UNUSED_ob_src, ...) Line 279
blender-app.exe!BKE_object_data_transfer_dm(Scene * scene, Object * ob_src, ...) Line 1171
blender-app.exe!applyModifier(ModifierData * md, Object * ob, ...) Line 211
blender-app.exe!modwrap_applyModifier(ModifierData * md, ...) Line 745
blender-app.exe!mesh_calc_modifiers(Scene * scene, Object * ob, ...) Line 2037
blender-app.exe!mesh_build_data(Scene * scene, Object * ob, ...) Line 2582
blender-app.exe!makeDerivedMesh(Scene * scene, Object * ob, BMEditMesh * em, ...) Line 2676
blender-app.exe!BKE_object_handle_data_update(EvaluationContext * eval_ctx, ...) Line 203
blender-app.exe!BKE_object_handle_update_ex(EvaluationContext * eval_ctx, ...) Line 3144
blender-app.exe!scene_update_object_func(TaskPool * pool, ...) Line 1471
blender-app.exe!task_scheduler_thread_run(void * thread_p) Line 164
I hope this is enough to reproduce the issue.