[Bf-committers] BMesh questions while trying to fix bug: Dissolve with multiple verts crashes blender

Ahmad Luqman ahmad.luqman at gmail.com
Fri Sep 9 08:40:06 CEST 2011


I am trying to wrap my head around the BMesh datastructures and architecture
while attempting to fix this bug:

Dissolve with multiple verts crashes blender:

The crash seems to be coming when flags are tried to be set on the faces
through bmesh_systag_elements function and the BMFlagLayer flags memory is
not allocated. This only happens when BM_Join_TwoFaces calls the
BM_Join_Faces and passes the face with null flags to the
bmesh_systag_elements function. These memory are only not allocated for the
loop's faces. See the /source/blender/bmesh/intern/bmesh_mods.c function:
BM_Dissolve_Disk where f= v->e->l->f; before passing the face to
BM_Join_Faces. *Whats the 2 and 3-valence vertices concepts? Any links?*

I have noticed that in file /source/blender/bmesh/intern/bmesh_operators.c
function alloc_flag_layer(BMesh *bm) there is a comment "/*now go through
and memcpy all the flags. Loops don't get a flag layer at this time...*/". *Any
reason why*?

Ahmad Luqman

More information about the Bf-committers mailing list