Geometry node - setting lacunarity to 0 crashes Blender (musgrave texture) [fine in 4.1, request to ackport] #100838

Open
opened 2022-09-05 18:44:06 +02:00 by Baptiste · 14 comments

System Information
Operating system: Windows-10-10.0.19044-SP0 64 Bits
Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.93

Blender Version
Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: bcfdb14560
Worked: (newest version of Blender that worked as expected)

Short description of error
In a fairly simple geonode tree, trying to set lacunarity to 0 will crash Blender instantly.

Exact steps for others to reproduce the error

  • Use attached Blend.file
  • In the 'set position' branch, try to set 'musgrave texture' lacunarity to 0
  • Crashes everytime for me

Geonode attribute.blend

**System Information** Operating system: Windows-10-10.0.19044-SP0 64 Bits Graphics card: NVIDIA GeForce RTX 3080/PCIe/SSE2 NVIDIA Corporation 4.5.0 NVIDIA 516.93 **Blender Version** Broken: version: 3.2.2, branch: master, commit date: 2022-08-02 18:15, hash: `bcfdb14560` Worked: (newest version of Blender that worked as expected) **Short description of error** In a fairly simple geonode tree, trying to set lacunarity to 0 will crash Blender instantly. **Exact steps for others to reproduce the error** - Use attached Blend.file - In the 'set position' branch, try to set 'musgrave texture' lacunarity to 0 - Crashes everytime for me [Geonode attribute.blend](https://archive.blender.org/developer/F13461554/Geonode_attribute.blend)
Author

Added subscriber: @Deehn

Added subscriber: @Deehn

Added subscriber: @deadpin

Added subscriber: @deadpin

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

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

Confirmed and the crash seems to be coming a bit downstream from Musgrave, the Attribute transfer node is having difficulty with that incoming data:

ExceptionCode         : EXCEPTION_ACCESS_VIOLATION

Stack trace:
blender::bke::mesh_surface_sample::MeshAttributeInterpolator::ensure_barycentric_coords D:\source\blender-git\blender\source\blender\blenkernel\intern\mesh_sample.cc:175
blender::bke::mesh_surface_sample::MeshAttributeInterpolator::sample_data D:\source\blender-git\blender\source\blender\blenkernel\intern\mesh_sample.cc:237
blender::nodes::node_geo_transfer_attribute_cc::NearestInterpolatedTransferFunction::call D:\source\blender-git\blender\source\blender\nodes\geometry\nodes\node_geo_transfer_attribute.cc:433
blender::fn::MultiFunction::call_auto D:\source\blender-git\blender\source\blender\functions\intern\multi_function.cc:132
blender::fn::execute_call_instruction D:\source\blender-git\blender\source\blender\functions\intern\multi_function_procedure_executor.cc:1079
blender::fn::MFProcedureExecutor::call D:\source\blender-git\blender\source\blender\functions\intern\multi_function_procedure_executor.cc:1191
blender::fn::MultiFunction::call_auto D:\source\blender-git\blender\source\blender\functions\intern\multi_function.cc:132
blender::fn::evaluate_fields D:\source\blender-git\blender\source\blender\functions\intern\field.cc:414
blender::fn::evaluate_selection D:\source\blender-git\blender\source\blender\functions\intern\field.cc:756
blender::fn::FieldEvaluator::evaluate D:\source\blender-git\blender\source\blender\functions\intern\field.cc:767
blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component D:\source\blender-git\blender\source\blender\nodes\geometry\nodes\node_geo_instance_on_points.cc:72

Oddly enough, if you unplug the Geometry input to that Attribute Transfer (down in the FENCE frame) and re-plug it, things seem fine...

Confirmed and the crash seems to be coming a bit downstream from Musgrave, the Attribute transfer node is having difficulty with that incoming data: ``` ExceptionCode : EXCEPTION_ACCESS_VIOLATION Stack trace: blender::bke::mesh_surface_sample::MeshAttributeInterpolator::ensure_barycentric_coords D:\source\blender-git\blender\source\blender\blenkernel\intern\mesh_sample.cc:175 blender::bke::mesh_surface_sample::MeshAttributeInterpolator::sample_data D:\source\blender-git\blender\source\blender\blenkernel\intern\mesh_sample.cc:237 blender::nodes::node_geo_transfer_attribute_cc::NearestInterpolatedTransferFunction::call D:\source\blender-git\blender\source\blender\nodes\geometry\nodes\node_geo_transfer_attribute.cc:433 blender::fn::MultiFunction::call_auto D:\source\blender-git\blender\source\blender\functions\intern\multi_function.cc:132 blender::fn::execute_call_instruction D:\source\blender-git\blender\source\blender\functions\intern\multi_function_procedure_executor.cc:1079 blender::fn::MFProcedureExecutor::call D:\source\blender-git\blender\source\blender\functions\intern\multi_function_procedure_executor.cc:1191 blender::fn::MultiFunction::call_auto D:\source\blender-git\blender\source\blender\functions\intern\multi_function.cc:132 blender::fn::evaluate_fields D:\source\blender-git\blender\source\blender\functions\intern\field.cc:414 blender::fn::evaluate_selection D:\source\blender-git\blender\source\blender\functions\intern\field.cc:756 blender::fn::FieldEvaluator::evaluate D:\source\blender-git\blender\source\blender\functions\intern\field.cc:767 blender::nodes::node_geo_instance_on_points_cc::add_instances_from_component D:\source\blender-git\blender\source\blender\nodes\geometry\nodes\node_geo_instance_on_points.cc:72 ``` Oddly enough, if you unplug the Geometry input to that Attribute Transfer (down in the FENCE frame) and re-plug it, things seem fine...
Author

Odd indeed. Thanks for confirming it :)

Odd indeed. Thanks for confirming it :)
Member

Added subscriber: @CharlieJolly

Added subscriber: @CharlieJolly
Philipp Oeser removed the
Interest
Nodes & Physics
label 2023-02-10 08:43:45 +01:00
Member

This seems to be fine in 4.1 beta

Can confirm it is still an issue in 3.6 and 3.3 LTS (getting NANs for z position there...)

@CharlieJolly : are you aware of a commit that fixed this? Can this be backported?

This seems to be fine in 4.1 beta Can confirm it is still an issue in 3.6 and 3.3 LTS (getting NANs for z position there...) @CharlieJolly : are you aware of a commit that fixed this? Can this be backported?
Philipp Oeser added this to the 3.6 LTS milestone 2024-02-27 14:43:51 +01:00
Philipp Oeser changed title from Geometry node - setting lacunarity to 0 crashes Blender (musgrave texture) to Geometry node - setting lacunarity to 0 crashes Blender (musgrave texture) [fine in 4.1, request to ackport] 2024-02-27 14:44:19 +01:00
Member

I believe this was fixed in #111187 when Musgrave was merged into the Noise texture or these patches.

Fix #112180: Noise with high detail and lacunarity outputs erratic values
Fix #112180. #112962

I believe this was fixed in #111187 when Musgrave was merged into the Noise texture or these patches. Fix #112180: Noise with high detail and lacunarity outputs erratic values Fix #112180. #112962
Member

So this cannot be backported, right?

So this cannot be backported, right?
Member

I discussed bug a while back with @Hoshinova and it was included in #111187

I discussed bug a while back with @Hoshinova and it was included in #111187
Member

So it is d98005da5d to be backported?

You probably have more overview/insight, could you just add the relevant commits to #109399 if appropriate?

So it is d98005da5df0e2ee6e885b795ecafefa174e3500 to be backported? You probably have more overview/insight, could you just add the relevant commits to #109399 if appropriate?
Member

@lichtwerk d98005da5d fixes the NAN problem, but only partially. Basically before d98005da5d you'd get NANs for both very low and very high Lacunarity values. d98005da5d fixes the problem for very high Lacunarity values.

However this bug report mentions "trying to set lacunarity to 0 will crash Blender instantly.", so thats the case of very low Lacunarity values.
#111187 then fixed the problem for very low Lacunarity values by eliminating the Musgrave node and any buggy code with it.
The buggy code in question would be 6481bf32b3/intern/cycles/kernel/svm/musgrave.h (L375) where 'float pwHL = powf(lacunarity, -H);' leads an high value outside the representable floating point range for very low Lacunarity values.
Since this bug is caused by the way Musgrave handles Roughness it can't be fixed.

That is about it for the NAN values. As for why it crashes, I have no ideas, might be related to the NAN values.
But regardless of that d98005da5d should be backported.

@lichtwerk d98005da5d fixes the NAN problem, but only partially. Basically before d98005da5d you'd get NANs for both very low and very high Lacunarity values. d98005da5d fixes the problem for very high Lacunarity values. However this bug report mentions "trying to set lacunarity to 0 will crash Blender instantly.", so thats the case of very low Lacunarity values. #111187 then fixed the problem for very low Lacunarity values by eliminating the Musgrave node and any buggy code with it. The buggy code in question would be https://projects.blender.org/blender/blender/src/commit/6481bf32b370a241875ff13658e5b3d79f64c721/intern/cycles/kernel/svm/musgrave.h#L375 where 'float pwHL = powf(lacunarity, -H);' leads an high value outside the representable floating point range for very low Lacunarity values. Since this bug is caused by the way Musgrave handles Roughness it can't be fixed. That is about it for the NAN values. As for why it crashes, I have no ideas, might be related to the NAN values. But regardless of that d98005da5d should be backported.
Member

Also, since the Musgrave node doesn't exist anymore from 4.1 onward this issue could be seen as resolved.

Also, since the Musgrave node doesn't exist anymore from 4.1 onward this issue could be seen as resolved.
Member

So it is d98005da5d to be backported?

You probably have more overview/insight, could you just add the relevant commits to #109399 if appropriate?

I think this could be backported but I don't have a build system at the moment to test and recommend the backport.

> So it is d98005da5df0e2ee6e885b795ecafefa174e3500 to be backported? > > You probably have more overview/insight, could you just add the relevant commits to #109399 if appropriate? I think this could be backported but I don't have a build system at the moment to test and recommend the backport.
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
5 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#100838
No description provided.