Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash at exit #862

Closed
youle31 opened this issue Oct 3, 2018 · 2 comments
Closed

Crash at exit #862

youle31 opened this issue Oct 3, 2018 · 2 comments

Comments

@youle31
Copy link
Collaborator

youle31 commented Oct 3, 2018

BGMC 22: Ecclesia

ecclesia

@youle31
Copy link
Collaborator Author

youle31 commented Oct 6, 2018

happens in a .blend named EcclesiaCharacter on an object named "Face" with a mirror modifier + armature modifier. According to panzergame explainations, the bug comes from the fact we haven't the right number of vertices in the mesh used by BL_MeshDeformer (because of the modifier). I put this in low priority because it's a particular case

panzergame added a commit that referenced this issue Oct 21, 2018
Before if an object was using a modifier and armature deformation
the deformer BL_ModifierDeformer was created and during an Update
the armature mesh was first updated. But the function responsible
to update the armature mesh is also recalculating the normals. But
the derived mesh can have an higher number of vertices and so the
update of normals was based on an incorrect number of vertices which
induced memory overflow.

When updating a derived mesh, then normals don't need to be updated.
In this case BL_SkinDeformer::UpdateInternal should informs
BGEDeformVerts or BlenderDeformVerts to not update normals.
This is achieve by introducing a "recalcNormal" argument to functions
UpdateInternal in BL_SkinDeformer and BL_ShapeDeformer levels.
When the update is directly proceeded from one of these classes,
recalcNormal is to true, if they are updated through top BL_ModifierDeformer
recalcNormal is to false.

Fix issue: #862.
@youle31
Copy link
Collaborator Author

youle31 commented Oct 21, 2018

Fixed by @panzergame in master. Thanks!

@youle31 youle31 closed this as completed Oct 21, 2018
youle31 pushed a commit that referenced this issue May 26, 2019
Before if an object was using a modifier and armature deformation
the deformer BL_ModifierDeformer was created and during an Update
the armature mesh was first updated. But the function responsible
to update the armature mesh is also recalculating the normals. But
the derived mesh can have an higher number of vertices and so the
update of normals was based on an incorrect number of vertices which
induced memory overflow.

When updating a derived mesh, then normals don't need to be updated.
In this case BL_SkinDeformer::UpdateInternal should informs
BGEDeformVerts or BlenderDeformVerts to not update normals.
This is achieve by introducing a "recalcNormal" argument to functions
UpdateInternal in BL_SkinDeformer and BL_ShapeDeformer levels.
When the update is directly proceeded from one of these classes,
recalcNormal is to true, if they are updated through top BL_ModifierDeformer
recalcNormal is to false.

Fix issue: #862.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant