Page MenuHome

2.67 ; python script triggers Memoryblock tnorms mesh.c: end corrupt
Closed, ArchivedPublic

Description

--- Operating System, Graphics card ---
Linux dakhla 3.0.6-gentoo #3 SMP Fri Apr 26 14:15:35 EDT 2013 i686 Intel(R) Core(TM) i3 CPU M 380 @ 2.53GHz GenuineIntel GNU/Linux

01:00.0 VGA compatible controller: NVIDIA Corporation GT218M [NVS 3100M] (rev a2
) (prog-if 00 [VGA controller])
Subsystem: Dell Latitude E6510
Flags: bus master, fast devsel, latency 0, IRQ 16
Memory at d2000000 (32-bit, non-prefetchable) [size=16M]
Memory at c0000000 (64-bit, prefetchable) [size=256M]
Memory at d0000000 (64-bit, prefetchable) [size=32M]
I/O ports at 7000 [size=128]
[virtual] Expansion ROM at d3000000 [disabled] [size=512K]
Capabilities: [60] Power Management version 3
Capabilities: [68] MSI: Enable- Count=1/1 Maskable- 64bit+
Capabilities: [78] Express Endpoint, MSI 00
Capabilities: [b4] Vendor Specific Information: Len=14 <?>
Capabilities: [100] Virtual Channel
Capabilities: [128] Power Budgeting <?>
Capabilities: [600] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
Kernel driver in use: nvidia
Kernel modules: nvidia

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

2.66 (from gentoo ebuild) and 2.67 (binary download) both crash

--- Short description of error ---

When I execute a python script to fabricate a mesh and armature, it crashes blender. The following shows up in the xterm blender is running in.

Memoryblock tnorms mesh.c: end corrupt
Memoryblock tnorms mesh.c: end corrupt
Memoryblock tnorms mesh.c: end corrupt
Memoryblock tnorms mesh.c: end corrupt

If I run the full python script blender reliably crashes. I have trimmed it down to a script that triggers the error (but doesn't always crash blender right away) for the bug report.

I would not be surprised if the script is trying to do something wrong, but blender should give a good diagnostic, not crash.

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

Paste the attached python script into a text buffer in a fresh blender and run it

Event Timeline

I was able to trim it down some more. The real problem is that the face list refers to nonexistent vertex indices. This should probably trigger an exception within the from_pydata() function.

The rule at the moment is that you have to call mesh.validate if you want to make sure there is no invalid mesh data.
http://www.blender.org/documentation/blender_python_api_2_66_6/bpy.types.Mesh.html#bpy.types.Mesh.validate

Ideally blender would never crash due to python operations but for performance and other reasons we can't guarantee this at the moment, so not considered a bug.

Brecht Van Lommel (brecht) changed the task status from Unknown Status to Archived.May 10 2013, 11:52 PM