Maniphest T101185

Regression: Certain mesh cause crash on render
Closed, ResolvedBUG

Assigned To
Lukas Stockner (lukasstockner97)
Authored By
Sun Kim (persun)
Sep 19 2022, 8:35 AM
Tags
  • BF Blender
  • Render & Cycles
Subscribers
Germano Cavalcante (mano-wii)
Lukas Stockner (lukasstockner97)
Sun Kim (persun)

Description

System Information
Operating system: Windows-10-10.0.19043-SP0 64 Bits
Graphics card: Radeon RX 570 Series ATI Technologies Inc. 4.5.14800 Core Profile Context 22.5.1 30.0.15021.11005

Blender Version
Broken: version: 3.4.0 Alpha, branch: master, commit date: 2022-09-07 19:33, hash: rB0a32f6b76a63
Worked: 3.4.0 September 06 build f0a36599007d

Caused by rB6951e8890ae3: Mikktspace: Optimized port to C++

Short description of error

This is from Poly Haven's pawn shop scene file. I don't know how this mesh is made but this modular_industrial_pipes_01_pipe04 has all its vertices at its origin. It causes crash when I try to preview or render the scene (both on Cycles and EEVEE).

I can recreate this issue by making my own mesh with all its vertices at its origin and connect a normal map in the material.

Based on casual bisecting and the log below, I'm guessing this is caused by Mikktspace optimization 6951e8890ae3. The mesh does not cause crash on builds before it was committed.

# backtrace
Exception Record:

ExceptionCode         : EXCEPTION_ACCESS_VIOLATION
Exception Address     : 0x00007FF77637C883
Exception Module      : blender.exe
Exception Flags       : 0x00000000
Exception Parameters  : 0x2
	Parameters[0] : 0x0000000000000000
	Parameters[1] : 0x000001C6C1512750

Stack trace:
blender.exe         :0x00007FF77637C850  ccl::MikkMeshWrapper<0>::GetTexCoord
blender.exe         :0x00007FF776381B80  mikk::Mikktspace<ccl::MikkMeshWrapper<0> >::calcTexArea
blender.exe         :0x00007FF776376F90  mikk::Mikktspace<ccl::MikkMeshWrapper<0> >::runParallel<<lambda_745021aa6c9ea81ca20b036389cc5bbd> >
blender.exe         :0x00007FF776386990  mikk::Mikktspace<ccl::MikkMeshWrapper<0> >::genTangSpace
blender.exe         :0x00007FF776388F30  ccl::mikk_compute_tangents
blender.exe         :0x00007FF77637FCE0  ccl::attr_create_uv_map
blender.exe         :0x00007FF776381C50  ccl::create_mesh
blender.exe         :0x00007FF776389C90  ccl::BlenderSync::sync_mesh
blender.exe         :0x00007FF77635DF20  <lambda_6fb83369bd0ca121397306d35acda18d>::operator()
blender.exe         :0x00007FF7796EFBB0  tbb::internal::function_task<std::function<void __cdecl(void)> >::execute
tbb.dll             :0x00007FFB1552F220  tbb::recursive_mutex::scoped_lock::internal_try_acquire
tbb.dll             :0x00007FFB1552F220  tbb::recursive_mutex::scoped_lock::internal_try_acquire
tbb.dll             :0x00007FFB15524FD0  tbb::interface7::internal::isolate_within_arena
tbb.dll             :0x00007FFB1552A120  tbb::task_scheduler_init::terminate
tbb.dll             :0x00007FFB1552D800  tbb::thread_bound_filter::try_process_item
tbb.dll             :0x00007FFB1552D800  tbb::thread_bound_filter::try_process_item
ucrtbase.dll        :0x00007FFB1C331B20  configthreadlocale
KERNEL32.DLL        :0x00007FFB1C9E7020  BaseThreadInitThunk
ntdll.dll           :0x00007FFB1E4A2680  RtlUserThreadStart

Exact steps for others to reproduce the error

  • Open the above file, and try material preview or render preview

Revisions and Commits

rB Blender

Related Objects

Mentioned In
D16028: cycles : add mikktspace to third_party
Mentioned Here
rB6951e8890ae3: Mikktspace: Optimized port to C++

Event Timeline

Sun Kim (persun) created this task.Sep 19 2022, 8:35 AM
Sun Kim (persun) updated the task description.Sep 19 2022, 8:42 AM
Germano Cavalcante (mano-wii) changed the task status from Needs Triage to Confirmed.Sep 19 2022, 10:22 PM
Germano Cavalcante (mano-wii) triaged this task as High priority.
Germano Cavalcante (mano-wii) changed the subtype of this task from "Report" to "Bug".
Germano Cavalcante (mano-wii) added a project: Render & Cycles.
Germano Cavalcante (mano-wii) added subscribers: Lukas Stockner (lukasstockner97), Germano Cavalcante (mano-wii).

Calls to Mesh.validate() did not flag any meshes as corrupt, so I'm still confused as to what is considered "Corrupted mesh" in this case.
But I can confirm the crash and it is caused by rB6951e8890ae3: Mikktspace: Optimized port to C++ (so a regression).
Cc @Lukas Stockner (lukasstockner97)

Sun Kim (persun) added a comment.Sep 20 2022, 2:55 AM
In T101185#1419694, @Germano Cavalcante (mano-wii) wrote:

Calls to Mesh.validate() did not flag any meshes as corrupt, so I'm still confused as to what is considered "Corrupted mesh" in this case.

Sorry, bad choice of word from me. I initially wondered if it was an invalid mesh or something. Maybe I could have used something more descriptive words like "mesh without volume", I'm not sure if that makes sense.

Philipp Oeser (lichtwerk) renamed this task from Corrupted mesh cause crash on render to Regression: Certain mesh cause crash on render.Sep 20 2022, 9:16 AM
Philipp Oeser (lichtwerk) updated the task description.
Brecht Van Lommel (brecht) mentioned this in D16028: cycles : add mikktspace to third_party.Sep 26 2022, 11:09 PM
Lukas Stockner (lukasstockner97) claimed this task.Oct 5 2022, 2:18 AM
Lukas Stockner (lukasstockner97) closed this task as Resolved by committing rBb804f925c70c: Fix T101185: New Mikktspace crashes on meshes without valid triangles.Oct 5 2022, 3:08 AM
Lukas Stockner (lukasstockner97) added a commit: rBb804f925c70c: Fix T101185: New Mikktspace crashes on meshes without valid triangles.