Crash in render mode while removing instances #85462

Closed
opened 2021-02-08 09:58:24 +01:00 by Sergey · 9 comments

System Information
Operating system: Windows-10-10.0.19041-SP0 64 Bits
Graphics card: Intel(R) HD Graphics 630 Intel 4.5.0 - Build 25.20.100.6471

Blender Version
Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-04 00:22, hash: d30320b4f5

Short description of error
2021-02-08 12-51-02.mp4

My suspicion is that cycle still has link to instances which were removed by GN.
Another problem is that cycles does not see new instances as well.

Exact steps for others to reproduce the error
test.blend

  1. Open the file
  2. Switch 3D viewport into render mode
  3. Decrease number of box instances via density parameter of the Point distribute node.
**System Information** Operating system: Windows-10-10.0.19041-SP0 64 Bits Graphics card: Intel(R) HD Graphics 630 Intel 4.5.0 - Build 25.20.100.6471 **Blender Version** Broken: version: 2.93.0 Alpha, branch: master, commit date: 2021-02-04 00:22, hash: `d30320b4f5` **Short description of error** [2021-02-08 12-51-02.mp4](https://archive.blender.org/developer/F9721941/2021-02-08_12-51-02.mp4) My suspicion is that `cycle` still has link to instances which were removed by GN. Another problem is that `cycles` does not see new instances as well. **Exact steps for others to reproduce the error** [test.blend](https://archive.blender.org/developer/F9721944/test.blend) 1. Open the file 2. Switch 3D viewport into render mode 3. Decrease number of box instances via density parameter of the `Point distribute` node.
Author

Added subscriber: @randum

Added subscriber: @randum
Member

Added subscriber: @JacquesLucke

Added subscriber: @JacquesLucke
Member

Changed status from 'Needs Triage' to: 'Confirmed'

Changed status from 'Needs Triage' to: 'Confirmed'
Member

Your guess that there is some missing update is probably right. I'm not quite sure how and when Cycles receives updates from Blender yet.

I only seem to be able to reproduce this in master, not in the 2.92 release branch.

blender: /home/jacques/blender-git/blender/intern/cycles/kernel/../kernel/kernel_compat_cpu.h:77: const T& ccl::texture<T>::fetch(int) [with T = unsigned int]: Assertion `index >= 0 && index < width' failed.

libc.so.6!__assert_fail (Unknown Source:0)
ccl::texture<unsigned int>::fetch(int index, ccl::texture<unsigned int> * const this) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernel_compat_cpu.h:77)
ccl::shader_setup_from_ray(ccl::KernelGlobals * kg, ccl::ShaderData * sd, const ccl::Intersection * isect, const ccl::Ray * ray) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernel_shader.h:72)
ccl::kernel_path_integrate(ccl::ShaderData * emission_sd, float * buffer, ccl::PathRadiance * L, ccl::Ray * ray, ccl::float3 throughput, ccl::PathState * state, ccl::KernelGlobals * kg) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernel_path.h:561)
ccl::kernel_path_trace(ccl::KernelGlobals * kg, float * buffer, int sample, int x, int y, int offset, int stride) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernel_path.h:692)
ccl::kernel_cpu_path_trace(ccl::KernelGlobals * kg, float * buffer, int sample, int x, int y, int offset, int stride) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h:96)
ccl::CPUDevice::render(ccl::CPUDevice * const this, ccl::DeviceTask & task, ccl::RenderTile & tile, ccl::KernelGlobals * kg) (/home/jacques/blender-git/blender/intern/cycles/device/device_cpu.cpp:970)
ccl::CPUDevice::thread_render(ccl::CPUDevice * const this, ccl::DeviceTask & task) (/home/jacques/blender-git/blender/intern/cycles/device/device_cpu.cpp:1300)
ccl::CPUDevice::thread_run(ccl::CPUDevice * const this, ccl::DeviceTask & task) (/home/jacques/blender-git/blender/intern/cycles/device/device_cpu.cpp:577)
ccl::CPUDevice::task_add(ccl::DeviceTask&)::{lambda()#1}::operator()() const(const struct {...} * const __closure) (/home/jacques/blender-git/blender/intern/cycles/device/device_cpu.cpp:1460)
Your guess that there is some missing update is probably right. I'm not quite sure how and when Cycles receives updates from Blender yet. I only seem to be able to reproduce this in master, not in the 2.92 release branch. ``` blender: /home/jacques/blender-git/blender/intern/cycles/kernel/../kernel/kernel_compat_cpu.h:77: const T& ccl::texture<T>::fetch(int) [with T = unsigned int]: Assertion `index >= 0 && index < width' failed. libc.so.6!__assert_fail (Unknown Source:0) ccl::texture<unsigned int>::fetch(int index, ccl::texture<unsigned int> * const this) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernel_compat_cpu.h:77) ccl::shader_setup_from_ray(ccl::KernelGlobals * kg, ccl::ShaderData * sd, const ccl::Intersection * isect, const ccl::Ray * ray) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernel_shader.h:72) ccl::kernel_path_integrate(ccl::ShaderData * emission_sd, float * buffer, ccl::PathRadiance * L, ccl::Ray * ray, ccl::float3 throughput, ccl::PathState * state, ccl::KernelGlobals * kg) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernel_path.h:561) ccl::kernel_path_trace(ccl::KernelGlobals * kg, float * buffer, int sample, int x, int y, int offset, int stride) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernel_path.h:692) ccl::kernel_cpu_path_trace(ccl::KernelGlobals * kg, float * buffer, int sample, int x, int y, int offset, int stride) (/home/jacques/blender-git/blender/intern/cycles/kernel/kernels/cpu/kernel_cpu_impl.h:96) ccl::CPUDevice::render(ccl::CPUDevice * const this, ccl::DeviceTask & task, ccl::RenderTile & tile, ccl::KernelGlobals * kg) (/home/jacques/blender-git/blender/intern/cycles/device/device_cpu.cpp:970) ccl::CPUDevice::thread_render(ccl::CPUDevice * const this, ccl::DeviceTask & task) (/home/jacques/blender-git/blender/intern/cycles/device/device_cpu.cpp:1300) ccl::CPUDevice::thread_run(ccl::CPUDevice * const this, ccl::DeviceTask & task) (/home/jacques/blender-git/blender/intern/cycles/device/device_cpu.cpp:577) ccl::CPUDevice::task_add(ccl::DeviceTask&)::{lambda()#1}::operator()() const(const struct {...} * const __closure) (/home/jacques/blender-git/blender/intern/cycles/device/device_cpu.cpp:1460) ```

Added subscriber: @kevindietrich

Added subscriber: @kevindietrich

Since this only appears to be an issue in master, it could be caused by my device update refactor. I already had a similar bug in the same function. The fact that there is a crash tells me that the data between Blender and Cycles is properly synchronized, but a data update is missing in Cycles (the "object_flag" device array is looked up with a out of bound index). If Cycles did not receive an update from Blender, the scene would still render as it last was.

With a quick debug print in the ObjectManager, I get (before and after changing the node's density parameter):

Total 2001 objects.
Total 5 objects.

So we do remove extra objects that are deleted by Blender.

Since this only appears to be an issue in master, it could be caused by my device update refactor. I already had a similar bug in the same function. The fact that there is a crash tells me that the data between Blender and Cycles is properly synchronized, but a data update is missing in Cycles (the "object_flag" device array is looked up with a out of bound index). If Cycles did not receive an update from Blender, the scene would still render as it last was. With a quick debug print in the ObjectManager, I get (before and after changing the node's density parameter): > Total 2001 objects. > Total 5 objects. So we do remove extra objects that are deleted by Blender.
Member

Yeah, I just bisected this to bbe6d44928.

Yeah, I just bisected this to bbe6d44928.
Kévin Dietrich self-assigned this 2021-02-11 11:31:36 +01:00

This issue was referenced by 349c17cf54

This issue was referenced by 349c17cf5436d3726d22bcf61160b1e3cb320e12

Changed status from 'Confirmed' to: 'Resolved'

Changed status from 'Confirmed' to: 'Resolved'
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#85462
No description provided.