Maniphest T60401

Shapekey transfer cause the crash of blender
Closed, Resolved

Assigned To
None
Authored By
AB (abdelmatinboulbayam)
Jan 10 2019, 7:39 PM
Tags
  • BF Blender
Subscribers
AB (abdelmatinboulbayam)
Bastien Montagne (mont29)
Nick Z (ngzaharias)
Philipp Oeser (lichtwerk)
Tokens
"Like" token, awarded by abdelmatinboulbayam.

Description

System Information
Operating system: Window 10 64bit
Graphics card: PNY Nvidia GTX 1060

Blender Version
Broken:
blender-2.80-80ffa73b3f87-win64

Short description of error
I attached a blend file that contains the problem , so basically i am trying to transfer shapekeys from a model named "Pattern" to another model named "Pattern1" that have no shapekeys that cause the crash of blender and outputs this in the console :

Error : EXCEPTION_ACCESS_VIOLATION
Address : 0x00007FF76B4C0963
Module : C:\Users\test\Downloads\blender-2.80-80ffa73b3f87-win64\blender-2.80.0-git.80ffa73b3f87-windows64\blender.exe

This problem happens for those models only for some reason

Exact steps for others to reproduce the error
Selecting the model "Pattern" first then selecting the model "Pattern1"
On shapekeys panel i press on arrow and select "Transfer Shape key"
and it crashes

Revisions and Commits

rB Blender

Event Timeline

AB (abdelmatinboulbayam) created this task.Jan 10 2019, 7:39 PM
Philipp Oeser (lichtwerk) lowered the priority of this task from 90 to 50.Jan 11 2019, 10:54 AM
Philipp Oeser (lichtwerk) added subscribers: Bastien Montagne (mont29), Philipp Oeser (lichtwerk).

Confirmed.

key->from is NULL here

1   rna_ShapeKey_data_begin                   rna_key.c         544  0x2d12194      
2   ShapeKey_data_begin                       rna_key_gen.c     445  0x2d1349d      
3   RNA_property_collection_begin             rna_access.c      3650 0x2ca2dba      
4   pyrna_prop_collection_iter_CreatePyObject bpy_rna.c         6606 0x23416a7      
5   pyrna_prop_collection_iter                bpy_rna.c         6613 0x23416d4      
6   PyObject_GetIter                                                 0x7ffff79777b6 
7   _PyEval_EvalFrameDefault                                         0x7ffff7a2feb2 
8   _PyEval_EvalCodeWithName                                         0x7ffff79748e6 
9   _PyFunction_FastCallKeywords                                     0x7ffff79bc931 
10  _PyEval_EvalFrameDefault                                         0x7ffff7a2f38c 
11  _PyEval_EvalCodeWithName                                         0x7ffff79748e6 
12  _PyFunction_FastCallKeywords                                     0x7ffff79bc931 
13  _PyEval_EvalFrameDefault                                         0x7ffff7a34436 
14  _PyEval_EvalCodeWithName                                         0x7ffff79748e6 
15  _PyFunction_FastCallDict                                         0x7ffff7975cab 
16  bpy_class_call                            bpy_rna.c         7926 0x2344428      
17  rna_operator_execute_cb                   rna_wm.c          1233 0x2e55e12      
18  wm_operator_invoke                        wm_event_system.c 1337 0x1c7744a      
19  wm_operator_call_internal                 wm_event_system.c 1534 0x1c77ad0      
20  WM_operator_name_call_ptr                 wm_event_system.c 1582 0x1c77cf3      
... <More>

@Bastien Montagne (mont29): is this for you?

Bastien Montagne (mont29) lowered the priority of this task from 50 to 30.Jan 11 2019, 11:11 AM

Seems to be exact same issue as T60249, so answer will be the same. :)

That file is invalid (NULL back-pointer from shape key to its owner geometry). Afraid we cannot do much unless we get precise reproducible steps to create such a file.

Two people getting same exact issue “that should not happen” is kinda serious, so would be really nice to know how those invalid files can be generated. :|

AB (abdelmatinboulbayam) added a comment.Jan 11 2019, 4:03 PM

Ok will try to use some backup that i have of the files and look for how those file get generated and do some debugging .
This python command also cause the crash : "C.object.data.shape_keys.key_blocks[0].relative_key.data[vertex_index]" i don't know if this helps to give any idea about the source of the issue .

AB (abdelmatinboulbayam) added a comment.Jan 11 2019, 4:04 PM

And i didn't get any message of the response you did on my email for some reason

Bastien Montagne (mont29) added a comment.Jan 11 2019, 7:23 PM

@AB (abdelmatinboulbayam) source of the issue in current file is very well known (NULL pointer that should never be NULL, ever). Many different kind of accesses/operations on shapekeys will henceforth crash Blender. So current file is corrupted. Question is, how to get to that point? ;)

PS: some mail services/client tend to tag messages from this tool/website as spam, this could explain your lack of mail notification maybe.

AB (abdelmatinboulbayam) added a comment.Jan 11 2019, 9:25 PM

@Bastien Montagne (mont29) I believe i found why it happens to those models ,so basically if you have a model with no shapekey at all not even the basis if you used the "apply as shapekey" from simple deform modifier for example the basis created from this will be corrupted and will cause the crash of blender when you try an operation related to it , but if the model have a basis and you click on "apply as shapekey" from simple deform modifier for example it will work with no problem .
So i think the basis created from apply as shapekey of a modifier is corrupted .

Please let me know if this is correct and if it have a workaround to make it work because i have a model for a client with 8 shapekeys that have the same problem and want to know should i recreate everything from scratch or wait for a solution.

Bastien Montagne (mont29) raised the priority of this task from 30 to 50.Jan 11 2019, 10:10 PM

Thanks, can confirm indeed, in fact we are setting C.object.data.shape_keys.user to evaluated (hence temp, never saved) version of the object, instead of the actual original object (that’s thanks to CoW ;) ). Should be easy to fix.

Bastien Montagne (mont29) added a subscriber: Nick Z (ngzaharias).
Bastien Montagne (mont29) changed the task status from Unknown Status to Resolved by committing rB47be4e9a3379: Fix T60401: Shape key's from pointer being set to evaluated CoW ID..Jan 11 2019, 11:17 PM
Bastien Montagne (mont29) added a commit: rB47be4e9a3379: Fix T60401: Shape key's from pointer being set to evaluated CoW ID..
AB (abdelmatinboulbayam) awarded a token.Jan 11 2019, 11:51 PM