Jump to content

GeNa Terrain Extension: throwing NRE (The object of type 'RenderTexture' has been destroyed but you are still trying to access it.)


mroshaw

Recommended Posts

Hi!

 

Using the latest version of GeNa, 3.4.6.

 

I'm creating a Road Spline and using the Texture extension. I've noticed that once I've applied a texture, if I come off and then back on to the Texture extension, I get errors in the console and the mask preview doesn't work. I have to close the Editor and re-open it to get things working again:

 

MissingReferenceException: The object of type 'RenderTexture' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
GeNa.Core.GeNaMultiTerrainOperation.Visualize (GeNa.Core.MultiTerrainOperationType opType, UnityEngine.RenderTexture previewTexture, System.Int32 pass) (at <361843e62bb84ba983b33154c1225c7f>:0)
GeNa.Core.TerrainTools.Visualize (GeNa.Core.TerrainEntity modification) (at <361843e62bb84ba983b33154c1225c7f>:0)
GeNa.Core.GeNaTerrainExtension.Visualize () (at Assets/Procedural Worlds/GeNa/Scripts/Runtime/Extensions/GeNaTerrainExtension.cs:128)
GeNa.Core.GeNaTerrainExtension.OnSceneGUI () (at Assets/Procedural Worlds/GeNa/Scripts/Runtime/Extensions/GeNaTerrainExtension.cs:90)
GeNa.Core.GeNaSplineExtension.SceneGUI () (at <361843e62bb84ba983b33154c1225c7f>:0)
GeNa.Core.GeNaSpline.OnSceneGUI () (at <361843e62bb84ba983b33154c1225c7f>:0)
GeNa.Core.SplineEditor.OnSceneGUI () (at Assets/Procedural Worlds/GeNa/Scripts/Editor/SplineEditor.cs:157)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <75633565436c42f0a6426b33f0132ade>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <75633565436c42f0a6426b33f0132ade>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <75633565436c42f0a6426b33f0132ade>:0)
UnityEditor.SceneView.CallOnSceneGUI () (at <434908727417408abd02bbd1a0835ef8>:0)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <434908727417408abd02bbd1a0835ef8>:0)
UnityEditor.SceneView.DoOnGUI () (at <434908727417408abd02bbd1a0835ef8>:0)
UnityEditor.SceneView.OnSceneGUI () (at <434908727417408abd02bbd1a0835ef8>: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 <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <e95189d6f30b400684230df4b35c0389>:0)

 

Link to comment
Share on other sites

10 hours ago, mroshaw said:

Hi!

 

Using the latest version of GeNa, 3.4.6.

 

I'm creating a Road Spline and using the Texture extension. I've noticed that once I've applied a texture, if I come off and then back on to the Texture extension, I get errors in the console and the mask preview doesn't work. I have to close the Editor and re-open it to get things working again:

 

MissingReferenceException: The object of type 'RenderTexture' has been destroyed but you are still trying to access it.
Your script should either check if it is null or you should not destroy the object.
GeNa.Core.GeNaMultiTerrainOperation.Visualize (GeNa.Core.MultiTerrainOperationType opType, UnityEngine.RenderTexture previewTexture, System.Int32 pass) (at <361843e62bb84ba983b33154c1225c7f>:0)
GeNa.Core.TerrainTools.Visualize (GeNa.Core.TerrainEntity modification) (at <361843e62bb84ba983b33154c1225c7f>:0)
GeNa.Core.GeNaTerrainExtension.Visualize () (at Assets/Procedural Worlds/GeNa/Scripts/Runtime/Extensions/GeNaTerrainExtension.cs:128)
GeNa.Core.GeNaTerrainExtension.OnSceneGUI () (at Assets/Procedural Worlds/GeNa/Scripts/Runtime/Extensions/GeNaTerrainExtension.cs:90)
GeNa.Core.GeNaSplineExtension.SceneGUI () (at <361843e62bb84ba983b33154c1225c7f>:0)
GeNa.Core.GeNaSpline.OnSceneGUI () (at <361843e62bb84ba983b33154c1225c7f>:0)
GeNa.Core.SplineEditor.OnSceneGUI () (at Assets/Procedural Worlds/GeNa/Scripts/Editor/SplineEditor.cs:157)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <75633565436c42f0a6426b33f0132ade>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <75633565436c42f0a6426b33f0132ade>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <75633565436c42f0a6426b33f0132ade>:0)
UnityEditor.SceneView.CallOnSceneGUI () (at <434908727417408abd02bbd1a0835ef8>:0)
UnityEditor.SceneView.HandleSelectionAndOnSceneGUI () (at <434908727417408abd02bbd1a0835ef8>:0)
UnityEditor.SceneView.DoOnGUI () (at <434908727417408abd02bbd1a0835ef8>:0)
UnityEditor.SceneView.OnSceneGUI () (at <434908727417408abd02bbd1a0835ef8>: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 <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.IMGUIContainer.DoIMGUIRepaint () (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIR.RenderChainCommand.ExecuteNonDrawMesh (UnityEngine.UIElements.UIR.DrawParams drawParams, System.Single pixelsPerPoint, System.Exception& immediateException) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
Rethrow as ImmediateModeException
UnityEngine.UIElements.UIR.RenderChain.Render () (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIRRepaintUpdater.Update () (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.VisualTreeUpdater.UpdateVisualTreePhase (UnityEngine.UIElements.VisualTreeUpdatePhase phase) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.Panel.UpdateForRepaint () (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.Panel.Repaint (UnityEngine.Event e) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIElementsUtility.UnityEngine.UIElements.IUIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& eventHandled) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIEventRegistration.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.UIElements.UIEventRegistration+<>c.<.cctor>b__1_2 (System.Int32 i, System.IntPtr ptr) (at <7f21349c9161407ba80a85ddaed7fabb>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr, System.Boolean& result) (at <e95189d6f30b400684230df4b35c0389>:0)

 

Hey @mroshaw,

Thank you for reporting this issue with steps on how to replicate it. I've actually been trying to find this issue for a while now. If you could assist me in replicating it, I can have it fixed pronto. Could we start with the version of Unity you're using and the kind of Terrain textures?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Tell a friend

    Love Canopy - Procedural Worlds? Tell a friend!
  • Need help?

    We work with some of the biggest brands in global gaming, automotive, technology, and government to create environments, games, simulations, and product launches for desktop, mobile, and VR.

    Our unique expertise and technology enable us to deliver solutions that look and run better at a fraction of the time and cost of a typical project.

    Check out some of our non-NDA work in the Gallery, and then Contact Us to accelerate your next project!

×
×
  • Create New...