Crash with python script #51014

Closed
opened 2017-03-20 22:30:50 +01:00 by Geoffrey Bantle · 6 comments

System Information:

Windows 7 Enterprise 64 bit
Blender 2.78c 64 bit official windows build

To reproduce:

Open the file crash_noise.blend

Run the python script in the text editor

On my system this results in Blender crashing with the message:
"Error: EXCEPTION_ACCESS_VIOLATION"

Note:

The python function "split_non_manifold_vertices" is called in a loop to help reproduce the crash more consistently on release builds. Without the loop it crashes very consistently the first time executing the function while running a debug build in the visual studio 2013 debugger.crash_noise.zip

System Information: Windows 7 Enterprise 64 bit Blender 2.78c 64 bit official windows build To reproduce: Open the file crash_noise.blend Run the python script in the text editor On my system this results in Blender crashing with the message: "Error: EXCEPTION_ACCESS_VIOLATION" Note: The python function "split_non_manifold_vertices" is called in a loop to help reproduce the crash more consistently on release builds. Without the loop it crashes very consistently the first time executing the function while running a debug build in the visual studio 2013 debugger.[crash_noise.zip](https://archive.blender.org/developer/F517038/crash_noise.zip)

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @gbantle-3

Added subscriber: @gbantle-3

Added subscriber: @mano-wii

Added subscriber: @mano-wii

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Germano Cavalcante self-assigned this 2017-03-20 23:36:37 +01:00

It is dangerous to work with scripts that add and delete many elements of a bmesh.
But I think the problem is in this part:

(...)
    idx_layer = bm.faces.layers.int.get("kmt_original_idx")
    for face in bm.faces:
        face.index = face[idx_layer]
(...)

Using a layer as id does not seem right.
And I'm not sure, but I think face.index is read_only.

Anyway. This seems to be a problem in the script.

It is dangerous to work with scripts that add and delete many elements of a bmesh. But I think the problem is in this part: ``` (...) idx_layer = bm.faces.layers.int.get("kmt_original_idx") for face in bm.faces: face.index = face[idx_layer] (...) ``` Using a layer as id does not seem right. And I'm not sure, but I think face.index is read_only. Anyway. This seems to be a problem in the script.

Thanks for the prompt response!

I was hoping you could clarify something, you say that face.index is read only, but there are several examples in the documentation of modifying it. Specifically the documentation for sort() and index_update() on this page shows that the face indices can be modified in much the way I am doing in the python snippet I submitted.

https://docs.blender.org/api/2.78b/bmesh.types.html#bmesh.types.BMFaceSeq

Is there an error in the documentation? If so should I file a bug report/issue for them?

Thanks for the prompt response! I was hoping you could clarify something, you say that face.index is read only, but there are several examples in the documentation of modifying it. Specifically the documentation for sort() and index_update() on this page shows that the face indices can be modified in much the way I am doing in the python snippet I submitted. https://docs.blender.org/api/2.78b/bmesh.types.html#bmesh.types.BMFaceSeq Is there an error in the documentation? If so should I file a bug report/issue for them?
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
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#51014
No description provided.