Maniphest T96294

Regression: Crash when executing bpy.types.ShapeKey.normals_vertex_get
Closed, ResolvedBUG

Assigned To
Hans Goudey (HooglyBoogly)
Authored By
Kesk Y (icyp)
Mar 10 2022, 2:00 PM
Tags
  • BF Blender
  • Modeling
Subscribers
Chung Ka Nang (DayMtyeetung)
Hans Goudey (HooglyBoogly)
Kesk Y (icyp)
Pratik Borhade (PratikPB2123)

Description

System Information
Operating system: Windows-10-10.0.22000-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3060/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 511.79

Blender Version
Worked: 3.0.1, branch: master, commit date: 2022-01-25 17:19, hash: rBdc2d18018171
Broken: version: 3.1.0, branch: master, commit date: 2022-03-08 18:16, hash: rBc77597cd0e15
Broken: version: 3.2.0 Alpha, branch: master, commit date: 2022-03-08 23:13, hash: rB21462565632b
Caused by rBcfa53e0fbeed: Refactor: Move normals out of MVert, lazy calculation

Short description of error
Run below code with mesh has shapekey will cause crash as EXCEPTION_ACCESS_VIOLATION.
bpy.data.meshes['Cube'].shape_keys.key_blocks['Key 1'].normals_vertex_get()

Exact steps for others to reproduce the error

  1. open attached .blend
  2. press run script of text editor, or run bpy.data.meshes['Cube'].shape_keys.key_blocks['Key 1'].normals_vertex_get() in python console

or

  1. launch blender
  2. add cube
  3. add one or more shapekey to cube
  4. run bpy.data.meshes['Cube'].shape_keys.key_blocks[any_key(0,1,... or "Basis", "Key 1" and so on )].normals_vertex_get() in python console

Test File:


Append
This crash affect to addon of export .vrm file with VRM_Addon_for_Blender. (https://github.com/saturday06/VRM_Addon_for_Blender)
Thanks.

Revisions and Commits

rB Blender
D14317
D14317

Related Objects

Mentioned In
T96241: 3.1: Potential candidates for corrective releases
P2839 3.1 R
Mentioned Here
rBcfa53e0fbeed: Refactor: Move normals out of MVert, lazy calculation

Event Timeline

Kesk Y (icyp) created this task.Mar 10 2022, 2:00 PM
Pratik Borhade (PratikPB2123) added a subscriber: Pratik Borhade (PratikPB2123).Mar 10 2022, 2:46 PM
Pratik Borhade (PratikPB2123) changed the task status from Needs Triage to Confirmed.Mar 10 2022, 2:49 PM
Pratik Borhade (PratikPB2123) triaged this task as High priority.
Pratik Borhade (PratikPB2123) added a project: Modeling.
Pratik Borhade (PratikPB2123) added a subscriber: Hans Goudey (HooglyBoogly).

Thanks for the report. I can confirm.
Crash came with rBcfa53e0fbeed: Refactor: Move normals out of MVert, lazy calculation
@Hans Goudey (HooglyBoogly) , can you check?

>	blender.exe!BKE_keyblock_mesh_calc_normals(KeyBlock * kb, Mesh * mesh, float[3] * r_vertnors, float[3] * r_polynors, float[3] * r_loopnors) Line 2226	C
 	blender.exe!rna_KeyBlock_normals_vert_calc(ID * id, KeyBlock * data, int * normals_len, float * * normals) Line 212	C
 	blender.exe!ShapeKey_normals_vertex_get_call(bContext * C, ReportList * reports, PointerRNA * _ptr, ParameterList * _parms) Line 737	C
 	blender.exe!RNA_function_call(bContext * C, ReportList * reports, PointerRNA * ptr, FunctionRNA * func, ParameterList * parms) Line 7329	C
 	blender.exe!pyrna_func_call(BPy_FunctionRNA * self, _object * args, _object * kw) Line 6298	C
 	[External Code]	
 	blender.exe!python_script_exec(bContext * C, const unsigned char * fn, Text * text, ReportList * reports, const bool do_jump) Line 121	C
 	blender.exe!BPY_run_text(bContext * C, Text * text, ReportList * reports, const bool do_jump) Line 217	C
 	blender.exe!text_run_script(bContext * C, ReportList * reports) Line 773	C
 	blender.exe!text_run_script_exec(bContext * C, wmOperator * op) Line 814	C
 	blender.exe!wm_operator_invoke(bContext * C, wmOperatorType * ot, wmEvent * event, PointerRNA * properties, ReportList * reports, const bool poll_only, bool use_last_properties) Line 1350	C
 	blender.exe!wm_operator_call_internal(bContext * C, wmOperatorType * ot, PointerRNA * properties, ReportList * reports, const wmOperatorCallContext context, const bool poll_only, wmEvent * event) Line 1543	C
 	blender.exe!WM_operator_name_call_ptr(bContext * C, wmOperatorType * ot, wmOperatorCallContext context, PointerRNA * properties) Line 1591	C
 	blender.exe!WM_operator_name_call_ptr_with_depends_on_cursor(bContext * C, wmOperatorType * ot, wmOperatorCallContext opcontext, PointerRNA * properties, const unsigned char * drawstr) Line 1779	C
 	blender.exe!ui_apply_but_funcs_after(bContext * C) Line 1013	C
 	blender.exe!ui_handler_region_menu(bContext * C, const wmEvent * event, void * UNUSED_userdata) Line 11390	C
 	blender.exe!wm_handler_ui_call(bContext * C, wmEventHandler_UI * handler, const wmEvent * event, int always_pass) Line 707	C
 	blender.exe!wm_handlers_do_intern(bContext * C, wmWindow * win, wmEvent * event, ListBase * handlers) Line 3042	C
 	blender.exe!wm_handlers_do(bContext * C, wmEvent * event, ListBase * handlers) Line 3161	C
 	blender.exe!wm_event_do_handlers(bContext * C) Line 3715	C
 	blender.exe!WM_main(bContext * C) Line 625	C
 	blender.exe!main(int argc, const unsigned char * * UNUSED_argv_c) Line 548	C
Pratik Borhade (PratikPB2123) renamed this task from bpy.types.ShapeKey.normals_vertex_get is Broken with crash on Blender 3.1. to Crash when executing bpy.types.ShapeKey.normals_vertex_get.Mar 10 2022, 2:52 PM
Pratik Borhade (PratikPB2123) updated the task description.
Hans Goudey (HooglyBoogly) claimed this task.Mar 11 2022, 4:21 AM
Hans Goudey (HooglyBoogly) changed the subtype of this task from "Report" to "Bug".Mar 11 2022, 7:02 PM
Pratik Borhade (PratikPB2123) mentioned this in P2839 3.1 R.Mar 20 2022, 12:20 PM
Hans Goudey (HooglyBoogly) closed this task as Resolved by committing rBb0aaf6ff4a97: Fix T96294: Crash and error with shape key normal calculation.Mar 22 2022, 3:43 PM
Hans Goudey (HooglyBoogly) added a commit: rBb0aaf6ff4a97: Fix T96294: Crash and error with shape key normal calculation.
Philipp Oeser (lichtwerk) renamed this task from Crash when executing bpy.types.ShapeKey.normals_vertex_get to Regression: Crash when executing bpy.types.ShapeKey.normals_vertex_get.Mar 22 2022, 4:07 PM
Hans Goudey (HooglyBoogly) added a commit: rBb89437c27e4c: Fix T96294: Crash and error with shape key normal calculation.Mar 24 2022, 2:58 PM
Chung Ka Nang (DayMtyeetung) added a subscriber: Chung Ka Nang (DayMtyeetung).Apr 3 2022, 7:46 PM