Maniphest T73147

FBX vertex parent to curve export crash (python acces to matrix_local issue / 'give_parvert' misses curve_cache)
Confirmed, NormalBUG

Assigned To
None
Authored By
PawelP (Zuorion)
Jan 15 2020, 8:45 PM
Tags
  • BF Blender
  • Core
Subscribers
Bastien Montagne (mont29)
PawelP (Zuorion)
Philipp Oeser (lichtwerk)
Sergey Sharybin (sergey)

Description

System Information
Operating system: Windows-10-10.0.18362-SP0 64 Bits
Graphics card: GeForce RTX 2060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 431.72

Blender Version
Broken: version: 2.81 release
Broken: version: 2.82 (sub 6), branch: master, commit date: 2020-01-14 23:08, hash: rB3edd8d5b075a
Worked: 2.79

Short description of error
Blender crashes when trying to export mesh that is vertex parented to curve

Exact steps for others to reproduce the error

  1. Create mesh and curve
  2. Vertex parent mesh to curve control point
  3. Export mesh

Event Timeline

PawelP (Zuorion) created this task.Jan 15 2020, 8:45 PM
Philipp Oeser (lichtwerk) changed the task status from Needs Triage to Confirmed.Jan 16 2020, 12:35 PM
Philipp Oeser (lichtwerk) changed the subtype of this task from "Report" to "Bug".
Philipp Oeser (lichtwerk) edited projects, added Python API; removed BF Blender.
Philipp Oeser (lichtwerk) added a subscriber: Philipp Oeser (lichtwerk).

Can confirm.

I am already getting this message prior to the crash:

Sorry, “VERTEX” parenting type is not supported

so seems to still do something which is not supposed to be done, checking...

Philipp Oeser (lichtwerk) added a comment.Jan 16 2020, 12:53 PM

Can already be triggered outside of FBX export.

e.g. by just making a copy of the objects (the object that is vertex-parented to a curve) matrix_local

Philipp Oeser (lichtwerk) added subscribers: Bastien Montagne (mont29), Sergey Sharybin (sergey).Jan 16 2020, 1:33 PM

This all works fine with a fully evaluated object, see

If this is done for the original, we are also asserting here

/* Unless there's some weird depsgraph failure the cache should exist. */
BLI_assert(par->runtime.curve_cache != NULL);
1   raise                                                    0x7ffff1ae2e35 
2   abort                                                    0x7ffff1acd895 
3   give_parvert                     object.c           2391 0x30c6837      
4   BKE_object_get_parent_matrix     object.c           2483 0x30c6caa      
5   BKE_object_matrix_local_get      object.c           2217 0x30c60c4      
6   rna_Object_matrix_local_get      rna_object.c       341  0x380cae5      
7   Object_matrix_local_get          rna_object_gen.c   1009 0x3812a52      
8   RNA_property_float_get_array     rna_access.c       3156 0x370a93c      
9   mathutils_rna_matrix_get         bpy_rna.c          547  0x38e854f      
10  _BaseMathObject_ReadCallback     mathutils.c        618  0x820bcda      
11  Matrix_copy                      mathutils_Matrix.c 2056 0x8215767      
12  _PyMethodDef_RawFastCallKeywords                         0x7ffff79a238a 
13  _PyMethodDescr_FastCallKeywords                          0x7ffff79d3c6d 
14  call_function                                            0x7ffff79d3dfb 
15  _PyEval_EvalFrameDefault                                 0x7ffff7a0926d 
16  _PyEval_EvalCodeWithName                                 0x7ffff79c2210 
17  PyEval_EvalCodeEx                                        0x7ffff79c2f69 
18  PyEval_EvalCode                                          0x7ffff7a509db 
19  python_script_exec               bpy_interface.c    485  0x38e5b58      
20  BPY_execute_text                 bpy_interface.c    578  0x38e5de8

If I compare give_parvert with ob_parcurve, I see a relating comment there:

/* NOTE: Curve cache is supposed to be evaluated here already, however there

  • are cases where we can not guarantee that. This includes, for example,
  • dependency cycles. We can't correct anything from here, since that would
  • cause a threading conflicts. *
  • TODO(sergey): Some of the legit looking cases like T56619 need to be
  • looked into, and maybe curve cache (and other dependencies) are to be
  • evaluated prior to conversion. */
  • Maybe we should also do as in ob_parcurve (as in return a bool indicating something went wrong and act accordingly)?
  • Or at least make it not crash if we dont have a curve_cache? (just use original Curve)?
  • Or make sure in FBX exporter we are working with the evaluated object when getting the matrix_local?

CC @Bastien Montagne (mont29)
CC @Sergey Sharybin (sergey)

Philipp Oeser (lichtwerk) renamed this task from FBX vertex parent export crash to FBX vertex parent to curve export crash (python acces to matrix_local / give_parent_vert misses curve_cache).Jan 16 2020, 1:38 PM
Philipp Oeser (lichtwerk) renamed this task from FBX vertex parent to curve export crash (python acces to matrix_local / give_parent_vert misses curve_cache) to FBX vertex parent to curve export crash (python acces to matrix_local issue / 'give_parvert' misses curve_cache).
Campbell Barton (campbellbarton) moved this task from Backlog to Under Discussion on the Python API board.Jun 18 2020, 3:15 PM
Campbell Barton (campbellbarton) removed a project: Python API.Jun 18 2020, 3:47 PM
Aaron Carlisle (Blendify) added a project: BF Blender.Feb 4 2021, 7:06 AM
Philipp Oeser (lichtwerk) added a project: Core.Mar 2 2021, 11:08 AM
Bastien Montagne (mont29) moved this task from Backlog to Bugs on the Core board.Mar 2 2021, 12:34 PM