Adding vertex to a mesh with groups

I’ve been looking for some days to add vertex and faces to a mesh with groups using the API, but when I update the mesh blender hangs, I was told that may be because of the groups, then I’ve tried to remove groups and then add vertex, and later redo the groups. So blender still hangs after the groups has been removed when some vertex are added the mesh updated and u tries to enter edit mode.

here you can get an example file www.sistrans.com/breaking_blender.zip

Thanks for your help

I have observed that the transition from edit to object mode can take a long time. Try waiting a little longer…

i’ve executed the scritp and waited for 15min and then… CHRASHHHH

so, it has to be other thing…