Invalid material indices: Crash on simple mesh edit when switching to face mode. #71319

Closed
opened 2019-11-03 14:38:37 +01:00 by CarlG · 8 comments

System Information
Operating system: Linux-4.15.0-58-generic-x86_64-with-debian-buster-sid 64 Bits
Graphics card: Radeon RX Vega (VEGA10, DRM 3.23.0, 4.15.0-58-generic, LLVM 8.0.0) X.Org 4.5 (Core Profile) Mesa 19.0.8

Blender Versions
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-10-27 13:40, hash: 9b6aa740be
Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-03 00:28, hash: 93f93e6b45
Worked: 2.80

Short description of error
Blender 2.81 beta (couple of versions tried) will crash upon entering edit mode and going into face select mode. Every time. I'm able to work around it so it's no biggie for me, but thought I'd report it in case of underlying issues. Also crashed in 2019-10-27 version after trying load default startup. Appending it to clean project and attempting to edit it in face select mode will also crash, so I'm guessing it's related to mesh data. I have no issues rendering it in the main project it is used.

Exact steps for others to reproduce the error
Open the file and select the object.
Focus on it (it's isolated but in it's original project position) and enter edit mode.
If it doesn't crash immediately, I'm getting crash when switching to face select mode.
See attached: BacksplashCrash.blend

**System Information** Operating system: Linux-4.15.0-58-generic-x86_64-with-debian-buster-sid 64 Bits Graphics card: Radeon RX Vega (VEGA10, DRM 3.23.0, 4.15.0-58-generic, LLVM 8.0.0) X.Org 4.5 (Core Profile) Mesa 19.0.8 **Blender Versions** Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-10-27 13:40, hash: `9b6aa740be` Broken: version: 2.81 (sub 16), branch: master, commit date: 2019-11-03 00:28, hash: `93f93e6b45` Worked: 2.80 **Short description of error** Blender 2.81 beta (couple of versions tried) will crash upon entering edit mode and going into face select mode. Every time. I'm able to work around it so it's no biggie for me, but thought I'd report it in case of underlying issues. Also crashed in 2019-10-27 version after trying load default startup. Appending it to clean project and attempting to edit it in face select mode will also crash, so I'm guessing it's related to mesh data. I have no issues rendering it in the main project it is used. **Exact steps for others to reproduce the error** Open the file and select the object. Focus on it (it's isolated but in it's original project position) and enter edit mode. If it doesn't crash immediately, I'm getting crash when switching to face select mode. See attached: [BacksplashCrash.blend](https://archive.blender.org/developer/F7916361/BacksplashCrash.blend)
Author

Added subscriber: @CarlG

Added subscriber: @CarlG
Member

Added subscribers: @mont29, @ideasman42, @lichtwerk

Added subscribers: @mont29, @ideasman42, @lichtwerk
Member

I am also getting

BLI_assert failed: /blender/gpu/intern/gpu_element.c:197, GPU_indexbuf_set_tri_verts(), at '(elem + 1) * 3 <= builder->max_index_len' Aborted (core dumped)

This is because there is something wrong with the material indices, which can be corrected by calling

bpy.data.objects['Kitchen.Backsplash'].data.validate_material_indices()

@CarlG : do you happen to know how you have run into this situation?

  • is this some blender modeling tool causing this?
  • is this imported into blender? (if so it could help posting the original file -- before importing -- maybe there is something wrong with one of our importers...)

CC @mont29, CC @ideasman42 : since those "corrupt" meshes happen to come by once in a while, what do you think of making an operator out of validate() / validate_material_indices() and adding this to the menus? [could save a little bit of a hassle...]

I am also getting ``` BLI_assert failed: /blender/gpu/intern/gpu_element.c:197, GPU_indexbuf_set_tri_verts(), at '(elem + 1) * 3 <= builder->max_index_len' Aborted (core dumped) ``` This is because there is something wrong with the material indices, which can be corrected by calling ``` bpy.data.objects['Kitchen.Backsplash'].data.validate_material_indices() ``` @CarlG : do you happen to know how you have run into this situation? - is this some blender modeling tool causing this? - is this imported into blender? (if so it could help posting the original file -- before importing -- maybe there is something wrong with one of our importers...) CC @mont29, CC @ideasman42 : since those "corrupt" meshes happen to come by once in a while, what do you think of making an operator out of `validate() `/ `validate_material_indices()` and adding this to the menus? [could save a little bit of a hassle...]
Philipp Oeser changed title from Crash on simple mesh edit when switching to face mode. to Invalid material indices: Crash on simple mesh edit when switching to face mode. 2019-11-04 10:51:40 +01:00

Added subscriber: @brecht

Added subscriber: @brecht

I don't know if this even corrupt, given that materials can be assigned per object or per mesh, and different object with the same mesh can have different numbers of materials.

I think it's just missing clamping in extract_tris_looptri_bmesh, which extract_tris_looptri_mesh does have.

I don't know if this even corrupt, given that materials can be assigned per object or per mesh, and different object with the same mesh can have different numbers of materials. I think it's just missing clamping in `extract_tris_looptri_bmesh`, which `extract_tris_looptri_mesh` does have.

This issue was referenced by 65b414cfb2

This issue was referenced by 65b414cfb291e8ae47e92ab1b101de3fa6d19704

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Brecht Van Lommel self-assigned this 2019-11-06 16:10:11 +01:00
Author

"do you happen to know how you have run into this situation?"
Sorry, I don't really have a clue. It's part of a model that was started in 2.7x I think, so not an import.
Likely they are faces that are separated out from another object, possibly with solidify/bevel. With manual material cleanup since it's old.
I'll give the fix a try in a few days. Thanks for the quick fix.

"do you happen to know how you have run into this situation?" Sorry, I don't really have a clue. It's part of a model that was started in 2.7x I think, so not an import. Likely they are faces that are separated out from another object, possibly with solidify/bevel. With manual material cleanup since it's old. I'll give the fix a try in a few days. Thanks for the quick fix.
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
No Assignees
4 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#71319
No description provided.