Errors when attempting to create/edit a new Type

Discussion and help for Easy Save 3
Post Reply
Caffeen
Posts: 3
Joined: Thu Mar 07, 2019 8:32 pm

Errors when attempting to create/edit a new Type

Post by Caffeen »

Hi,

I'm very consistently receiving a nullref error when I click the name of a specific class in the type editor, which subsequently breaks the ES3 window. This is in Unity 2019.3.10f1, latest version of Easy Save.

I've put together a small repro project here: [DELETED]

Reproduction steps:
Open the Easy Save window, go to Types tab.
Type "CharacterAI" in the search window.
Click CharacterAI.

That's all it takes to get the error. It sometimes breaks the window, sometimes not. It never seems to create the ES3 Type correctly, though. Thank you for your help!

Code: Select all

NullReferenceException: Object reference not set to an instance of an object
ES3Internal.ES3Reflection.GetSerializableFields (System.Type type, System.Collections.Generic.List`1[T] serializableFields, System.Boolean safe, System.String[] memberNames, System.Reflection.BindingFlags bindings) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/ES3Reflection.cs:69)
ES3Internal.ES3Reflection.GetSerializableFields (System.Type type, System.Collections.Generic.List`1[T] serializableFields, System.Boolean safe, System.String[] memberNames, System.Reflection.BindingFlags bindings) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/ES3Reflection.cs:124)
ES3Internal.ES3Reflection.GetSerializableMembers (System.Type type, System.Boolean safe, System.String[] memberNames) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/ES3Reflection.cs:278)
ES3Types.ES3Type.GetMembers (System.Boolean safe, System.String[] memberNames) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/Types/ES3Type.cs:169)
ES3Types.ES3Type.GetMembers (System.Boolean safe) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/Types/ES3Type.cs:164)
ES3Types.ES3ReflectedObjectType..ctor (System.Type type) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/Types/Reflected Types/ES3ReflectedObjectType.cs:15)
ES3Internal.ES3TypeMgr.CreateES3Type (System.Type type, System.Boolean throwException) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/Types/ES3TypeMgr.cs:105)
ES3Internal.ES3TypeMgr.GetOrCreateES3Type (System.Type type, System.Boolean throwException) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/Types/ES3TypeMgr.cs:24)
ES3Internal.ES3Reflection.TypeIsSerializable (System.Type type) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/ES3Reflection.cs:221)
ES3Internal.ES3Reflection.GetSerializableFields (System.Type type, System.Collections.Generic.List`1[T] serializableFields, System.Boolean safe, System.String[] memberNames, System.Reflection.BindingFlags bindings) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/ES3Reflection.cs:113)
ES3Internal.ES3Reflection.GetSerializableMembers (System.Type type, System.Boolean safe, System.String[] memberNames) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Scripts/ES3Reflection.cs:278)
ES3Editor.TypesWindow.SelectType (System.Int32 typeIndex) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Editor/TypesWindow.cs:386)
ES3Editor.TypesWindow.TypeButton (System.Int32 i) (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Editor/TypesWindow.cs:330)
ES3Editor.TypesWindow.TypeList () (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Editor/TypesWindow.cs:120)
ES3Editor.TypesWindow.OnGUI () (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Editor/TypesWindow.cs:59)
ES3Editor.ES3Window.OnGUI () (at D:/Unity Stuff/ES3IssueExample - Copy/Assets/Plugins/Easy Save 3/Editor/ES3Window.cs:139)
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <437ba245d8404784b9fbab9b439ac908>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <437ba245d8404784b9fbab9b439ac908>:0)
UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at <17b72532ee2c4da1b6f632d3f1705fe0>:0)
UnityEditor.HostView.Invoke (System.String methodName) (at <17b72532ee2c4da1b6f632d3f1705fe0>:0)
UnityEditor.HostView.InvokeOnGUI (UnityEngine.Rect onGUIPosition, UnityEngine.Rect viewRect) (at <17b72532ee2c4da1b6f632d3f1705fe0>:0)
UnityEditor.DockArea.DrawView (UnityEngine.Rect viewRect, UnityEngine.Rect dockAreaRect) (at <17b72532ee2c4da1b6f632d3f1705fe0>:0)
UnityEditor.DockArea.OldOnGUI () (at <17b72532ee2c4da1b6f632d3f1705fe0>: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 <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, UnityEngine.Matrix4x4 worldTransform, UnityEngine.Rect clippingRect, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Action onGUIHandler, System.Boolean canAffectFocus) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.IMGUIContainer.HandleIMGUIEvent (UnityEngine.Event e, System.Boolean canAffectFocus) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.IMGUIContainer.SendEventToIMGUI (UnityEngine.UIElements.EventBase evt, System.Boolean canAffectFocus) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.IMGUIContainer.HandleEvent (UnityEngine.UIElements.EventBase evt) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.CallbackEventHandler.HandleEventAtTargetPhase (UnityEngine.UIElements.EventBase evt) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.MouseCaptureDispatchingStrategy.DispatchEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.EventDispatcher.ApplyDispatchingStrategies (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, System.Boolean imguiEventIsInitiallyUsed) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEventQueue () (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.EventDispatcher.OpenGate () (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.EventDispatcherGate.Dispose () (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.EventDispatcher.ProcessEvent (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.EventDispatcher.Dispatch (UnityEngine.UIElements.EventBase evt, UnityEngine.UIElements.IPanel panel, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.BaseVisualElementPanel.SendEvent (UnityEngine.UIElements.EventBase e, UnityEngine.UIElements.DispatchMode dispatchMode) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.UIElementsUtility.DoDispatch (UnityEngine.UIElements.BaseVisualElementPanel panel) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.UIElements.UIElementsUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <7be1a95b44f5474c9c1a5c5fd9c86b28>:0)
UnityEngine.GUIUtility.ProcessEvent (System.Int32 instanceID, System.IntPtr nativeEventPtr) (at <35bab3c7b0dc4999845bcfccc7758d96>:0)
User avatar
Joel
Moodkie Staff
Posts: 4826
Joined: Wed Nov 07, 2012 10:32 pm

Re: Errors when attempting to create/edit a new Type

Post by Joel »

Hi there,

I deleted your link as it contained the Easy Save package, making it publicly accessible.

This issue will be resolved in the update which is currently awaiting approval from Unity. In the meantime if you private message me your invoice number I'm happy to send the update over.

All the best,
Joel
Joel @ Moodkie Interactive
Purchase Easy Save | Contact | Guides | Docs | Getting started
Post Reply