Page MenuHome

crash when reinitializing bmesh from mesh
Closed, ResolvedPublic

Description

--- Operating System, Graphics card ---

win 7 prof. 64 bit

--- Blender version with error, and version that worked ---

2.68a official release windows 64bit (all releases checked have same problem. Checked back til 2.63)

--- Short description of error ---

when a bmesh object is initialized a second time with from_mesh() after changing the source mesh, Blender crashes without any diagnostic message. For this to happen is appears necessary to access (but not alter) the bmesh before it it reinitialized.

--- Steps for others to reproduce the error (preferably based on attached .blend file) ---

open attached .blend and click run script in text editor

Event Timeline

i can reproduce that behavior on my computer...
but i don't think that this is a bug - it is more a situation that you should avoid in your code...
it is a kind of misuse of API.
http://www.blender.org/documentation/blender_python_api_2_68_release/info_gotcha.html#edit-mode-memory-access
i mean, that i also read somewhere, that <BMesh>.from_mesh() can be called only once per <BMesh> instance.

http://www.blender.org/documentation/blender_python_api_2_68_release/bmesh.html?highlight=bmesh#mesh-access

http://www.blender.org/documentation/blender_python_api_2_68_release/bmesh.html?highlight=Example#example-script

Campbell Barton (campbellbarton) changed the task status from Unknown Status to Resolved.Aug 27 2013, 2:40 AM

thank you Campbell Barton...
and Michel Anders, sorry that i opened my *smart-ass* mouth... ;)