Getting many exceptions trying to render a Dictionary inspector

Issue #71 resolved
Geoff Dupuis created an issue

Hi,

I'm trying to get a simple Dictionary to display in the inspector and I'm getting continuous failures. I have included my source files. Please note that these source files had originated in one of my projects. After I ran into the errors I talk about below, I moved them into a number of fresh projects and slowly reduced their complexity to the point where they are nearly empty. I'm still encountering errors.

I am using Unity 5.6.0f3 and OdinInspector 1.0.0.3.

To reproduce:

I create a new project and include only Odin. Before I add anything else, I get the errors that you see in "InitialBuildError.PNG".

After copying in my source files, I create an empty game object and add an Inventory component (included in scripts). I do not see the Dictionary rendered in the inspector but rather some sort of null error. Please see "InspectorFailure01.PNG". If I click on one of the null strings in the inspector, I get more errors, please see "InspectorFailure02.png"

Now, lets say I try to make a simple change to one of the scripts. If I add a public int to the Inventory script, I get flooded with errors when returning to the editor and nothing gets rendered in the inspector except your warning. Please see, "SimpleChangeMajorFailure.PNG".

Finally, if I try to open the Odin preferences editor, it fails to display anything and I receive 999+ exceptions. Please see "EditorFailure.PNG".

I have downloaded Odin several times and have deleted from my project and reimported several times. Does your project persist data outside of the project structure that might have become corrupted? The original files I had been working with (before running into these errors and simplifying them) had been pretty complex. I experimented by assigning SerializedMonoBehaviour, [SerializeField], and [OdinSerialize] to various properties (both auto properties and properties implementing an observable pattern) but I keep running into problems.

Thank you in advance.

Comments (7)

  1. Bjarke Elias

    Thank you so much for all the information. Fixing this also resolved a lot of other issues!

    This happened because some of our GUIStyles was accidentally initialized outside of the Unity GUI thread which is no longer possible in newer versions of Unity.

    If you give me an email address here on bitbucket I will send you our latest build with the fix included right away.

  2. Geoff Dupuis reporter

    Very good :) Please note that I also logged issue #70 last night before I ran into these issues. Perhaps they are somehow related. I will test and see with the new build.

    You can send it to geoffdupuis@yahoo.ca; Thank you for the quick turn around.

  3. Geoff Dupuis reporter

    Great, thank you very much. I technically should be working my day job right now, so I'll test this when my day is done. Thanks again :)

  4. Geoff Dupuis reporter

    Working now as expected! Thank you for the quick turn around. I'm very pleased with your product and your support and will be sure to leave a review reflecting that.

  5. Tor Esa Vestergaard

    The patch was submitted to the asset store a few days ago now, and it could land at any moment - we really can't tell you any more than that, as we don't have any control or knowledge of the patch approval process except, "submit and wait for a random number of days".

  6. Log in to comment