Maniphest T93574

Triangulating a mesh with overlapping tri and quad faces can cause an assertion failure
Closed, Resolved

Assigned To
Campbell Barton (campbellbarton)
Authored By
Fen (chemicalcrux)
Dec 2 2021, 3:28 PM
Tags
  • BF Blender
Subscribers
Fen (chemicalcrux)

Description

System Information
Operating system: Windows-10-10.0.19042-SP0 64 Bits
Graphics card: NVIDIA GeForce GTX 1080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 472.12

Blender Version
Broken: version: 3.1.0 Alpha. Commit hash: rB1620dcd208a915
Worked: Unsure

Short description of error
Triangulating a specific mesh in a specific object causes an assertion failure in the debug build.

Exact steps for others to reproduce the error
Without setup:

  1. Open the triangulate-bug.blend file
  2. Select Original and enter Edit Mode
  3. Run the Triangulate Faces operator
  4. Assert failure

Manual setup:

  1. Open the triangulate-bug.blend file
  2. Select DIY and enter Edit Mode
  3. Add a plane, merge at center to get a single vertex
  4. Duplicate three times to get four vertices
  5. Select all of the vertices and fill, producing a quad
  6. Select three of the vertices and fill, producing a tri
  7. Select all of the vertices and run the Triangulate Faces operator
  8. Assert failure

Creating a brand-new object and following the same steps does not cause an assertion failure. However, using a copy of the object that caused the problem (even after deleting all of its vertices, which is how I made the DIY object) causes the assertion failure.

Just adding a plane to DIY in edit mode and adding a triangle face does not cause the assertion failure. However, if I delete the face (and only the face), then fill to create a quad, then fill to create a tri, the error happens.

I don't have any modifiers on the offending object, and I can't really tell if there's anything "special" about it. It has no constraints, vertex groups, materials, etc. etc.

This does not cause a crash in the release build.

BLI_assert failed: D:\blender-git\blender\source\blender\bmesh\intern\bmesh_mesh_normals.c:523, bm_mesh_loops_calc_normals_for_loop(), at '(bm->elem_index_dirty & (BM_FACE | BM_LOOP)) == 0'

Full error output: P2637

Revisions and Commits

rB Blender

Event Timeline

Fen (chemicalcrux) created this task.Dec 2 2021, 3:28 PM
Fen (chemicalcrux) updated the task description.
Campbell Barton (campbellbarton) closed this task as Resolved by committing rBde5d36560f93: Fix T93574: Asset triangulating a mesh.Dec 3 2021, 6:57 AM
Campbell Barton (campbellbarton) claimed this task.
Campbell Barton (campbellbarton) added a commit: rBde5d36560f93: Fix T93574: Asset triangulating a mesh.
Campbell Barton (campbellbarton) mentioned this in T93479: 3.0 Potential candidates for corrective releases.Dec 3 2021, 6:58 AM
Philipp Oeser (lichtwerk) added a commit: rB580c603df08a: Fix T93574: Asset triangulating a mesh.Jan 10 2022, 5:04 PM