Fastorigin addon crashes on mesh.update() #33731

Closed
opened 2013-01-02 06:40:02 +01:00 by Gert De Roost · 4 comments
Member

%%%--- Operating System, Graphics card ---
CPU AMD Phenom II X6 1045T 2.70Ghz
4 Gb RAM
ATI Radeon 5770
Windows 7 32bit

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

crash tested on revision 53235 and 53454
no crash tested on official builds 2.65, 2.65a

- Short description of error ---

My fastorigin addon (attached) which has worked for months now crashes Blender on line 238 : mesh.update()
The line causing mesh.update() to crash afterwards is line 236 : originvert = bm.verts.new((0, 0, 0))
INFO : Bmesh structure created from_edit_mesh

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

Choose factory defaults (standard cube) and TAB into EDIT mode, then invoke addon --> crash!
Remark : when starting the addon from OBJECT mode, theres no crash, although the addon switches to EDIT mode from within the addon on lines 211 and 212...%%%

%%%--- Operating System, Graphics card --- CPU AMD Phenom II X6 1045T 2.70Ghz 4 Gb RAM ATI Radeon 5770 Windows 7 32bit - Blender version with error, and version that worked --- crash tested on revision 53235 and 53454 no crash tested on official builds 2.65, 2.65a - Short description of error --- My fastorigin addon (attached) which has worked for months now crashes Blender on line 238 : mesh.update() The line causing mesh.update() to crash afterwards is line 236 : originvert = bm.verts.new((0, 0, 0)) INFO : Bmesh structure created from_edit_mesh - Steps for others to reproduce the error (preferably based on attached .blend file) --- Choose factory defaults (standard cube) and TAB into EDIT mode, then invoke addon --> crash! Remark : when starting the addon from OBJECT mode, theres no crash, although the addon switches to EDIT mode from within the addon on lines 211 and 212...%%%
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'

%%%Whats happening is the array used to cache verts/edges/faces gets out of sync with the bmesh.
The fix is to call bmesh.update_edit_mesh with destructive=True.
http://www.blender.org/documentation/blender_python_api_2_65_3/bmesh.html#bmesh.update_edit_mesh

I had a look into making our API not crash in this case but its not so simple since the data to access isnt available to the BMesh, Ill leave open and check on this further.%%%

%%%Whats happening is the array used to cache verts/edges/faces gets out of sync with the bmesh. The fix is to call bmesh.update_edit_mesh with destructive=True. http://www.blender.org/documentation/blender_python_api_2_65_3/bmesh.html#bmesh.update_edit_mesh I had a look into making our API not crash in this case but its not so simple since the data to access isnt available to the BMesh, Ill leave open and check on this further.%%%

%%%When the mesh is freed (explicitly or through pythons garbage collection), a warning is now raised if update_edit_mesh() isnt called.

this doesnt stop the crash but points to correct api use to avoid crashing.

closing.%%%

%%%When the mesh is freed (explicitly or through pythons garbage collection), a warning is now raised if update_edit_mesh() isnt called. this doesnt stop the crash but points to correct api use to avoid crashing. closing.%%%

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sign in to join this conversation.
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#33731
No description provided.