Regression: LightTree failing with large number of emitters #106876
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#106876
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
System Information
Operating system: MacOS 13.3.1
Graphics card: AMD Radeon Vega 20
Blender Version
Broken: latest git version
Worked: 3.5.1
Most likely broken by
17c8e0d309
Short description of error
With a large number of emitters cycles crashes in LightManager::device_update_tree. From what I can see, the left and right index stacks are hard-coded to 32 ints, and the stack_id variable eventually reaches 35
Exact steps for others to reproduce the error
I'd love to send you the blend file, but the test case is 1.3GB. Let me know if you want it. But to reproduce:
*I'm writing a converter for cycles that takes MaterialX as input and exports OSL shaders. I'm doing something stupid that makes cycles think that every object is an emitter, and tripped this bug.
In step 5
kintegrator->num_distribution
was 2 in my case.In step 6, I got stack overflow, so in either way, this looks like a bug.
LightTree failing with large number of emittersto Regression: LightTree failing with large number of emittersBroken between
84b66c5a9c
andbb2dc141f2
, will bisectI was able to bisect to point between
db762d5508
and17c8e0d309
, but there was another issue that resulted in crash in different place17c8e0d309
looks like is first bad commit. CC @weizhen @brechtHi, I don't think
17c8e0d309
caused the issue. The light tree uses a bit trail withint
type, which limits the tree depth to a maximum of 32, so it is expected that it will fail when dealing with a large number of emitters. I vaguely recall that there is an assert somewhere but I was unable to locate it.However, #106683 proposes to build a separate subtree for each unique mesh, that would probably bypass this issue by splitting the tree in smaller parts. We could revisit this report after that pull request is merged and see if it resolves the issue.
There are only 4-ish commits between mentioned revisions, only
17c8e0d309
is cycles related.I can check #106683 to see if it resolves the issue
@weizhen I can confirm, that #106683 does resolve this issue.
@iss the pull request is merged as
bfd1836861
, can you check if we can close the issue now?This can be closed indeed.