Page MenuHome

Crash in render mode while removing instances
Closed, ResolvedPublicBUG

Description

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: rBd30320b4f59d

Short description of error

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

  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.

Event Timeline

Jacques Lucke (JacquesLucke) changed the task status from Needs Triage to Confirmed.EditedFeb 10 2021, 5:55 PM

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)
Jacques Lucke (JacquesLucke) changed the subtype of this task from "Report" to "Bug".Feb 10 2021, 6:01 PM

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.