Maniphest T102144

Regression: Specific Geometry Nodes tree (involving curve nodes) crashes with specific input mesh
Closed, ResolvedBUG

Assigned To
Jacques Lucke (JacquesLucke)
Authored By
Will (WCN)
Oct 29 2022, 4:08 PM
Tags
  • BF Blender
  • Geometry Nodes
  • Nodes & Physics
Subscribers
Hans Goudey (HooglyBoogly)
Iliya Katueshenock (Moder)
Jesse Yurkovich (deadpin)
Philipp Oeser (lichtwerk)
Will (WCN)

Description

System Information
Operating system: Linux
Graphics card: Intel

Blender Version
Broken: blender-3.3.1-linux-x64.tar.xz, blender-3.2.2-linux-x64, blender-3.2.1-linux-x64
Worked: blender-3.1.2-linux-x64, blender-3.2.0-alpha+master.95005bbe02cf-linux.x86_64-release

Apparently caused by rB2d80f814cc24: Curves: Use copied original data for invalid NURBS curves

This is dependent both the specific node setup (mesh-to-curve, set-handle-type, set-spline-resolution [with a value of zero!] all seem to be necessary to trigger the bug) but the input mesh as well (simple plane crashes, but simple cube is fine

Exact steps for others to reproduce the error

  • open blend
  • Cube with enabled GN modifier
  • Plane with same GN modifier (disabled)
  • enable modifier on Plane >> crash
  • you can also extrude an edge from the Plane prior to enabling the modifier on the Plane >> no crash anymore

Original report

I have a project that always crashes when I try to load it in newer versions of Blender.
It has lots of drivers, modifiers, and procedural geometry.
The crash appears to be tied to a specific Geometry Nodes tree.

  1. Download the attached file:

  1. Try to open it in one of the affected Blender versions.
  1. Observe crash.

If the file is opened in an unaffected version and the CRASH_CAUSING_NODEGROUP is completely removed from it (SHIFT+LMB on the Unlink "X"), then the crash does not happen.

Also: crash.txt:

gdb bt looks like it's saying the same things.

Revisions and Commits

rB Blender

Related Objects

Mentioned Here
rB2d80f814cc24: Curves: Use copied original data for invalid NURBS curves
rB95005bbe02cf: Merge branch 'blender-v3.1-release'
T101972: Regression: GN: Crashes when setting Spline Type from NURBS to Bezier in a row.

Event Timeline

Will (WCN) created this task.Oct 29 2022, 4:08 PM
Jesse Yurkovich (deadpin) changed the task status from Needs Triage to Needs Information from User.Oct 30 2022, 2:49 AM
Jesse Yurkovich (deadpin) added a subscriber: Jesse Yurkovich (deadpin).

Unfortunately the stack trace does not tell us much. We'll need a way to reproduce the issue in order to fix it. Is is possible to modify the original file in a way that is shareable? Replace geometry with simple primitives, remove textures entirely or replace with small, solid colors, textures?

Will (WCN) renamed this task from Segfault loading file from 3.0.0. to Crash loading geometry nodes from 3.0.0..Oct 30 2022, 12:18 PM
Will (WCN) updated the task description.
Will (WCN) added a comment.Oct 30 2022, 12:26 PM

@Jesse Yurkovich (deadpin) Yeah, I find myself in this position often enough that I decided to write a quick script to mangle all the impactful data. File added.

Looks like a specific geometry nodes tree is causing the problem.

Iliya Katueshenock (Moder) added a subscriber: Iliya Katueshenock (Moder).Oct 30 2022, 12:34 PM

Potentially related.
T101972

Iliya Katueshenock (Moder) added a comment.Oct 30 2022, 12:35 PM

But it will still be better if you can simplify the example file as much as possible.

Jesse Yurkovich (deadpin) changed the task status from Needs Information from User to Confirmed.Oct 30 2022, 10:02 PM
Jesse Yurkovich (deadpin) added projects: Geometry Nodes, Nodes & Physics.

Will confirm as I can reproduce the crash here as well. The stack is sufficiently different than the Spline bug so will keep this separate.

I won't have time today to bisect the issue; it seems to go very far back. Here is the Assert that happens with a Debug build because the result span is incorrect:

blender.exe!_BLI_assert_abort() Line 47	C
blender.exe!blender::bke::curves::bezier::evaluate_segment(..., blender::MutableSpan<blender::vec_base<float,3>> result) Line 212	C++
blender.exe!blender::bke::curves::bezier::calculate_evaluated_positions(..., blender::MutableSpan<blender::vec_base<float,3>> evaluated_positions) Line 254	C++
blender.exe!blender::bke::CurvesGeometry::evaluated_positions::__l2::<lambda_1>::()::__l2::<lambda_1>::operator()(blender::IndexRange curves_range) Line 686	C++
blender.exe!blender::threading::parallel_for<``blender::bke::CurvesGeometry::evaluated_positions'::`2'::<lambda_1>::operator()'::`2'::<lambda_1>>(...) Line 72	C++
blender.exe!blender::bke::CurvesGeometry::evaluated_positions::__l2::<lambda_1>::operator()() Line 663	C++
blender.exe!tbb::interface7::internal::delegated_function<`blender::bke::CurvesGeometry::evaluated_positions'::`2'::<lambda_1> const ,void>::operator()() Line 97	C++
Iliya Katueshenock (Moder) added a comment.Oct 30 2022, 10:10 PM

Yes, I also received a stack, and because of it I realized that the error is related to the curves in the nodes. But yes, it's not the same mistake. Just a suspicion.

Will (WCN) updated the task description.Oct 30 2022, 10:52 PM
Will (WCN) updated the task description.Oct 30 2022, 11:28 PM
Will (WCN) added a comment.Oct 30 2022, 11:31 PM

3.2.1 is broken. 3.1.2 works.

In the 3.2 branch, 95005bbe02cf also works.

Philipp Oeser (lichtwerk) added subscribers: Hans Goudey (HooglyBoogly), Philipp Oeser (lichtwerk).Nov 1 2022, 11:16 AM

Apparently caused by rB2d80f814cc24: Curves: Use copied original data for invalid NURBS curves

This is dependent both the specific node setup (mesh-to-curve, set-handle-type, set-spline-resolution [with a value of zero!] all seem to be necessary to trigger the bug) but the input mesh as well (simple plane crashes, but simple cube is fine

Here is a simplified file:

  • open blend
  • Cube with enabled GN modifier
  • Plane with same GN modifier (disabled)
  • enable modifier on Plane >> crash
  • you can also extrude an edge from the Plane prior to enabling the modifier on the Plane >> no crash anymore

@Hans Goudey (HooglyBoogly) : mind checking?

Philipp Oeser (lichtwerk) renamed this task from Crash loading geometry nodes from 3.0.0. to Regression: Specific Geometry Nodes tree (involving curve nodes) crashes with specific input mesh.Nov 1 2022, 11:19 AM
Philipp Oeser (lichtwerk) triaged this task as High priority.
Philipp Oeser (lichtwerk) updated the task description.
Hans Goudey (HooglyBoogly) changed the subtype of this task from "Report" to "Bug".Nov 4 2022, 11:44 PM
Jacques Lucke (JacquesLucke) closed this task as Resolved by committing rB0697631929d9: Fix T102144: missing validation of spline resolution.Nov 6 2022, 3:37 PM
Jacques Lucke (JacquesLucke) claimed this task.
Jacques Lucke (JacquesLucke) added a commit: rB0697631929d9: Fix T102144: missing validation of spline resolution.