Shapes example Procedural Tree crashes Unity

Avatar
  • updated
  • Under Review

Just brought your package.  I was hoping there would be more examples :(  Anywhere I can find more?

It freezes and crashes the Unity Editor, using Unity 2020.3.2f1 when you use the Procedural Tree example, when setting the line count above 1050ish.

Also importing the package in package Manager doesnt work correctly?  It says after clicking Import "This Unity Package has package manager depencies. Click "Install/Upgrade".. Import Unity Package window appears with "Nothing to import!" reported.  The Package Manager shows Shapes as not installed but the Assets are imported into the project view?

Reporting a bug? please specify Unity version:
2020.3.2f1
Reporting a bug? please specify Shapes version:
3.2.2
Reporting a bug? please specify Render Pipeline:
Built-in render pipeline
Avatar
tim s

Infinite Loop?  Havent experienced this before, relatively new to Unity.

Avatar
Freya Holmér
  • Under Review

it sounds like you might have a broken installation, because this used to be an issue in 3.0.0. I usually recommend deleting shapes entirely when updating to get as clean of an install as possible

as for the tree example, it's possible that maybe my code is a little broken at certain seeds in that scene, but using seed 2353 should work with the max number of lines, so I'd recommend trying that as well!

also where did the infinite loop happen? if it's in the package manager, it's likely out of my control

Avatar
tim s

Windows user here, Im not sure where Unity stores this stuff, but I deleted the folder  "C:\Users\%username%\AppData\Roaming\Unity\Asset Store-5.x\Freya Holmr" manually, which seemed  to enforce a fresh download.

Started a new empty URP 2020.3.2f1, opened Package Manager, clicked "Download", then "Import", got the dependencies message box, clicked Install/Upgrade button, import window appeared with all assets ticked, clicked Import. All assets get imported but the project still doesnt register in the package manager, still shows a "Import" button?  

This is what I meant by infinite loop, import forever. The shapes asset doesnt seem to register in the package manager and you cant remove it /update it. 

I didnt upgrade shapes, Im a new user, brought your asset 12 hours ago. The asset files/folders are imported into the project, it just doesnt register in Package Manager.

Avoiding certain seeds isnt a solution, if im developing my own projects using shapes and tweening for animations and shapes crashes unexpectedly like this, then how do I mitigate the issue other than removing the asset from use?  Id prefer to know that if I start utilizing shapes heavily, the codebase in it is supported and stable so Im not caught down the track having to find an alternative because the problem was in the too hard basket for the developer to fix.  I dont mean to sound rude here, Im just being realistic, thats a legitimate risk if I/others become heavily dependant on using shapes for animations, needing to find an alternative later because of stability issues, then that becomes a cost factor for me/other buyers of shapes. I brought shapes to have an out of box solution without needing to understand and fix the codebase myself so I can focus on other areas.

 

More than happy to work with you to solve these problems, fire away with anything you want me to do that may help you identify the causes of these 

faults with Shapes.

Lastly, as a new user, is there somewhere to see more examples that you are aware of. Id love to see more code examples of how people are using your asset.

Avatar
Freya Holmér
Quote from tim s

Windows user here, Im not sure where Unity stores this stuff, but I deleted the folder  "C:\Users\%username%\AppData\Roaming\Unity\Asset Store-5.x\Freya Holmr" manually, which seemed  to enforce a fresh download.

Started a new empty URP 2020.3.2f1, opened Package Manager, clicked "Download", then "Import", got the dependencies message box, clicked Install/Upgrade button, import window appeared with all assets ticked, clicked Import. All assets get imported but the project still doesnt register in the package manager, still shows a "Import" button?  

This is what I meant by infinite loop, import forever. The shapes asset doesnt seem to register in the package manager and you cant remove it /update it. 

I didnt upgrade shapes, Im a new user, brought your asset 12 hours ago. The asset files/folders are imported into the project, it just doesnt register in Package Manager.

Avoiding certain seeds isnt a solution, if im developing my own projects using shapes and tweening for animations and shapes crashes unexpectedly like this, then how do I mitigate the issue other than removing the asset from use?  Id prefer to know that if I start utilizing shapes heavily, the codebase in it is supported and stable so Im not caught down the track having to find an alternative because the problem was in the too hard basket for the developer to fix.  I dont mean to sound rude here, Im just being realistic, thats a legitimate risk if I/others become heavily dependant on using shapes for animations, needing to find an alternative later because of stability issues, then that becomes a cost factor for me/other buyers of shapes. I brought shapes to have an out of box solution without needing to understand and fix the codebase myself so I can focus on other areas.

 

More than happy to work with you to solve these problems, fire away with anything you want me to do that may help you identify the causes of these 

faults with Shapes.

Lastly, as a new user, is there somewhere to see more examples that you are aware of. Id love to see more code examples of how people are using your asset.

Started a new empty URP 2020.3.2f1, opened Package Manager, clicked "Download", then "Import", got the dependencies message box, clicked Install/Upgrade button, import window appeared with all assets ticked, clicked Import. All assets get imported but the project still doesnt register in the package manager, still shows a "Import" button? 
This is what I meant by infinite loop, import forever. The shapes asset doesnt seem to register in the package manager and you cant remove it /update it.
I didnt upgrade shapes, Im a new user, brought your asset 12 hours ago. The asset files/folders are imported into the project, it just doesnt register in Package Manager

I'm not entirely sure what is going wrong here, it sounds like the package manager might be struggling for some reason. Shapes only has a single package dependency on Text Mesh Pro, so if you have that then you don't need to import anything.

Avoiding certain seeds isnt a solution, if im developing my own projects using shapes and tweening for animations and shapes crashes unexpectedly like this, then how do I mitigate the issue other than removing the asset from use? Id prefer to know that if I start utilizing shapes heavily, the codebase in it is supported and stable so Im not caught down the track having to find an alternative because the problem was in the too hard basket for the developer to fix. I dont mean to sound rude here, Im just being realistic, thats a legitimate risk if I/others become heavily dependant on using shapes for animations, needing to find an alternative later because of stability issues, then that becomes a cost factor for me/other buyers of shapes. I brought shapes to have an out of box solution without needing to understand and fix the codebase myself so I can focus on other areas.

oh! I wasn't saying Shapes itself, as a plugin, has infinite loops or is broken under some circumstances. I was saying it's possible that that specific example scene might have code that might in rare circumstances with specific seeds lock up because of a potential mistake in that code, unrelated to Shapes as a plugin

It freezes and crashes the Unity Editor, using Unity 2020.3.2f1 when you use the Procedural Tree example, when setting the line count above 1050ish.

So this is something that used to happen in 3.0.0, if it's happening in 3.1.1 or later then something is wrong!
Does it happen with the default configuration of that scene? as in, not changing seed or anything, only changing line count

Lastly, as a new user, is there somewhere to see more examples that you are aware of. Id love to see more code examples of how people are using your asset.

Unfortunately most people don't publish their work with assets publicly, since they're mostly used in proprietary projects and whatnot. You can find some people's shared tweets using Shapes here, otherwise it's mostly the included code examples and the ones shown on the asset store page you have as a reference. I do have plans to make a longer tutorial video though, so that is coming in the future!

Avatar
Guillem Poy

I did a clean import of Shapes 4.1.0 into a project and once I open the Procedural Tree demo, Unity crashes instantly.

I imported it from GitHub as a submodule.

Avatar
Freya Holmér
Quote from Guillem Poy

I did a clean import of Shapes 4.1.0 into a project and once I open the Procedural Tree demo, Unity crashes instantly.

I imported it from GitHub as a submodule.

since you've got github access - can you try the dev branch

Avatar
Guillem Poy
Quote from Freya Holmér

since you've got github access - can you try the dev branch

I did some testing. The latest commit in dev does not crash the scene, BUT: the demos do not work as expected. The only one that worked was "Shapes Gallery". "FPS HUD" was all pink, the "procedural tree" and "spinning color discs" didn't show anything...


I went back to master and the scene "procedural tree" crashed unity instantly again and the rest worked as expected (I think).

Another thing I noticed was that with the dev branch I did not see this pop-up after importing, but I saw it every time I used the master.

Avatar
Freya Holmér

it sounds like you might have some cursed render pipeline setup

are you using the URP 2D renderer?

if so, try going to the Shapes settings (on the dev branch) - what does the render pipeline status say there? and if you force it to compile shaders for the built-in render pipeline, do the examples work again?

Avatar
Guillem Poy
Quote from Freya Holmér

it sounds like you might have some cursed render pipeline setup

are you using the URP 2D renderer?

if so, try going to the Shapes settings (on the dev branch) - what does the render pipeline status say there? and if you force it to compile shaders for the built-in render pipeline, do the examples work again?

:(


I am using the standard URP for a 3D game, so I don't think so.

In the dev branch, going to settings leads to... nothing and 2 errors:


ArgumentException: Object at index 0 is null
UnityEditor.SerializedObject..ctor (UnityEngine.Object obj) (at <208f92fc783546f9abbe643bfc23920c>:0)
ShapesConfigWindow.OnEnable () (at Assets/Shapes/Scripts/Editor/Windows/ShapesConfigWindow.cs:48)
UnityEditor.EditorWindow:GetWindow(String)
Shapes.MenuItems:OpenCsharpSettings() (at Assets/Shapes/Scripts/Editor/Utils/MenuItems.cs:35)


and


NullReferenceException: Object reference not set to an instance of an object
ShapesConfigWindow.OnGUI () (at Assets/Shapes/Scripts/Editor/Windows/ShapesConfigWindow.cs:89)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <208f92fc783546f9abbe643bfc23920c>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <208f92fc783546f9abbe643bfc23920c>:0)
UnityEditor.DockArea.OldOnGUI () (at <208f92fc783546f9abbe643bfc23920c>:0)
UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <4c8a9874288b4fb78fa7fdbcd8065b00>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <00a477ed1abf4030be646c3244bd3667>:0)