Search Issue Tracker

Fixed in 4.2.1

Votes

0

Found in [Package]

4.1.0

Issue ID

1195261

Regression

No

ProBuilder - ProBuilderize gives a StackOverflowException with specific mesh

Package: Probuilder

-

I get a StackOverflowException when I try to ProBuilderize a mesh in the provided project.

How to Repro:
- Open provided project.
- Open new scene.
- Drag and drop asset "Level_01_Terrain_D" into the new scene.
- Open ProBuilder window.
- Select the GameObject "Level_01_Terrain_D" and click on ProBuilderize in ProBuilder window.
- A popup will ask "ProBuilderize children of selection", say "Yes".

Expected result: GameObject is properly converted to a ProBuilderMesh with the exact same mesh rendered on screen.
Actual result: I got two possible outcomes:
- Unity crashes (frequency not 100%)
- A StackOverflowException appears in the Console with a broken mesh on screen.

Reproducible with PB 4.1.0 and 4.2.0
Wasn't tested with previous version so not sure if it's a regression or it's always been there.

-----
System.StackOverflowException: The requested operation caused a stack overflow.
at UnityEngine.Vector3.Magnitude (UnityEngine.Vector3 vector) <0x22b3e85c4c0 + 0x0000b> in <5e35e4589c1948aa8af5b8e64eea8798>:0
at UnityEngine.Vector3.Normalize () [0x00001] in <5e35e4589c1948aa8af5b8e64eea8798>:0
at UnityEngine.ProBuilder.Smoothing.IsSoftEdge (UnityEngine.Vector3[] normals, UnityEngine.ProBuilder.EdgeLookup left, UnityEngine.ProBuilder.EdgeLookup right, System.Single threshold) [0x0009d] in C:\Users\thomastu\Projects\com.unity.probuilder\Runtime\Core\Smoothing.cs:180
at UnityEngine.ProBuilder.Smoothing.FindSoftEdgesRecursive (UnityEngine.Vector3[] normals, UnityEngine.ProBuilder.WingedEdge wing, System.Single angleThreshold, System.Collections.Generic.HashSet`1[T] processed) [0x00027] in C:\Users\thomastu\Projects\com.unity.probuilder\Runtime\Core\Smoothing.cs:158
at UnityEngine.ProBuilder.Smoothing.FindSoftEdgesRecursive (UnityEngine.Vector3[] normals, UnityEngine.ProBuilder.WingedEdge wing, System.Single angleThreshold, System.Collections.Generic.HashSet`1[T] processed) [0x00091] in C:\Users\thomastu\Projects\com.unity.probuilder\Runtime\Core\Smoothing.cs:165

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.