Error on startup after creating a OdinEditorWindow subclass

Issue #502 resolved
Zoee Silcock created an issue

What happened

Multiple errors show up after starting Unity. I haven't seen any ill effects from these errors but they should obviously not be happening. This is what the stack trace looks like:

Recursive Serialization is not supported. You can't dereference a PPtr while loading. (Constructors of C# classes may not load objects either. See stacktrace.)
Microsoft.Win32.Win32RegistryApi:GetValue(RegistryKey, String, Object, RegistryValueOptions)
Microsoft.Win32.RegistryKey:GetValue(String, Object)
Microsoft.Win32.RegistryKey:GetValue(String)
System.DateTime:get_Now()
Sirenix.Serialization.PrefabModificationCache:CachePrefabModifications(Object, List`1) (at X:/Repositories/sirenix-development-framework/OdinSerializer/OdinSerializer/Unity Integration/UnitySerializationUtility.cs:2337)
Sirenix.Serialization.UnitySerializationUtility:ApplyPrefabModifications(Object, List`1, List`1) (at X:/Repositories/sirenix-development-framework/OdinSerializer/OdinSerializer/Unity Integration/UnitySerializationUtility.cs:2076)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext, Boolean, List`1) (at X:/Repositories/sirenix-development-framework/OdinSerializer/OdinSerializer/Unity Integration/UnitySerializationUtility.cs:1436)
Sirenix.Serialization.UnitySerializationUtility:DeserializeUnityObject(Object, SerializationData&, DeserializationContext) (at X:/Repositories/sirenix-development-framework/OdinSerializer/OdinSerializer/Unity Integration/UnitySerializationUtility.cs:1147)
Sirenix.OdinInspector.Editor.OdinEditorWindow:UnityEngine.ISerializationCallbackReceiver.OnAfterDeserialize()
UnityEditorInternal.InternalEditorUtility:LoadSerializedFileAndForget()
UnityEditor.WindowLayout:LoadWindowLayout(String, Boolean)

How to reproduce it

Simply creating a subclass of OdinEditorWindow seems to be enough to reproduce it. Example project included has a very small OdinEditorWindow that reproduces the issue.

Steps to reproduce with example project

  • Open reproduction project.
  • Open the Sample Scene (it's empty, but the errors don't occur when starting Unity with a new scene).
  • Add Odin Inspector.
  • Enable Editor Only mode.
  • Open the custom window (Custom -> Custom window).
  • Close Unity.
  • Re-open Unity and the errors should show in the console.

Version details

  • Unity Version: 2018.3.0f2
  • Odin Version: 2.0.15
  • Editor Only Mode: Yes
  • OS: Windows 10 Version 10.0.17763 Build 17763

Comments (2)

  1. Zoee Silcock reporter

    This issue persists despite updating OS, Unity and Odin. Here are the versions I am running now:

    • Unity Version: 2018.4.0f1
    • Odin Version: 2.0.20.0
    • Editor Only Mode: Yes
    • OS: Windows 10 Version 10.0.17763 Build 17763.503
  2. Zoee Silcock reporter

    This issue resolved itself when I updated from version 2.1.0 to version 2.1.4. Not clear from the Patch Notes what actually fixed it.

  3. Log in to comment