Good news! To provide faster support and grow the community, we'll be changing the forum to "Read Only" and turn to Discord instead for support.
Join here: https://discord.gg/zjNj5zZ

Getting NullReferenceException: (null) errors since upgrade and I can't figureit out.

tcz
Posts: 6
Joined: Wed Apr 26, 2017 2:29 pm

Getting NullReferenceException: (null) errors since upgrade and I can't figureit out.

Postby tcz » Sat May 06, 2017 3:01 pm

I don't remember seeing those errors before the last update but I am not 100% sure.

Here is Unity's console output: (i get it 3 times in a row, same details):

NullReferenceException: (null)
UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs, UnityEngine.Object context) (at C:/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:87)
UnityEditor.Editor.GetSerializedObjectInternal () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:193)
UnityEditor.Editor.get_serializedObject () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:185)
Devdog.InventoryPro.Editors.InventoryEditorBase.OnEnable () (at Assets/Devdog/InventoryPro/Scripts/Other/Editor/InventoryEditorBase.cs:18)
Devdog.InventoryPro.Editors.InventoryItemBaseEditor.OnEnable () (at Assets/Devdog/InventoryPro/Scripts/Items/Editor/InventoryItemBaseEditor.cs:47)
Devdog.InventoryPro.Editors.EquippableInventoryItemEditor.OnEnable () (at Assets/Devdog/InventoryPro/Scripts/Items/Editor/EquippableInventoryItemEditor.cs:29)

Here is the output in Console Pro:

[Exception] NullReferenceException: (null)
UnityEditor.SerializedObject..ctor() C:/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:87

UnityEditor.Editor.GetSerializedObjectInternal() C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:193

UnityEditor.Editor.get_serializedObject() C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:185

InventoryEditorBase.OnEnable() Assets/Devdog/InventoryPro/Scripts/Other/Editor/InventoryEditorBase.cs:18
16: public virtual void OnEnable()
17: {
-->18: script = serializedObject.FindProperty("m_Script");
19: }

InventoryItemBaseEditor.OnEnable() Assets/Devdog/InventoryPro/Scripts/Items/Editor/InventoryItemBaseEditor.cs:47
45: public override void OnEnable()
46: {
-->47: base.OnEnable();
49: id = serializedObject.FindProperty("_id");

EquippableInventoryItemEditor.OnEnable() Assets/Devdog/InventoryPro/Scripts/Items/Editor/EquippableInventoryItemEditor.cs:29
27: public override void OnEnable()
28: {
-->29: base.OnEnable();
30: equipmentType = serializedObject.FindProperty("_equipmentType");
31: equipPosition = serializedObject.FindProperty("_equipmentPosition");


Thank you!

User avatar
jjahuijbregts
Site Admin
Posts: 2091
Joined: Wed Apr 22, 2015 7:25 pm
Contact:

Re: Getting NullReferenceException: (null) errors since upgrade and I can't figureit out.

Postby jjahuijbregts » Sat May 13, 2017 4:47 pm

tcz wrote:I don't remember seeing those errors before the last update but I am not 100% sure.

Here is Unity's console output: (i get it 3 times in a row, same details):

NullReferenceException: (null)
UnityEditor.SerializedObject..ctor (UnityEngine.Object[] objs, UnityEngine.Object context) (at C:/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:87)
UnityEditor.Editor.GetSerializedObjectInternal () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:193)
UnityEditor.Editor.get_serializedObject () (at C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:185)
Devdog.InventoryPro.Editors.InventoryEditorBase.OnEnable () (at Assets/Devdog/InventoryPro/Scripts/Other/Editor/InventoryEditorBase.cs:18)
Devdog.InventoryPro.Editors.InventoryItemBaseEditor.OnEnable () (at Assets/Devdog/InventoryPro/Scripts/Items/Editor/InventoryItemBaseEditor.cs:47)
Devdog.InventoryPro.Editors.EquippableInventoryItemEditor.OnEnable () (at Assets/Devdog/InventoryPro/Scripts/Items/Editor/EquippableInventoryItemEditor.cs:29)

Here is the output in Console Pro:

[Exception] NullReferenceException: (null)
UnityEditor.SerializedObject..ctor() C:/buildslave/unity/build/artifacts/generated/common/editor/SerializedPropertyBindings.gen.cs:87

UnityEditor.Editor.GetSerializedObjectInternal() C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:193

UnityEditor.Editor.get_serializedObject() C:/buildslave/unity/build/artifacts/generated/common/editor/EditorBindings.gen.cs:185

InventoryEditorBase.OnEnable() Assets/Devdog/InventoryPro/Scripts/Other/Editor/InventoryEditorBase.cs:18
16: public virtual void OnEnable()
17: {
-->18: script = serializedObject.FindProperty("m_Script");
19: }

InventoryItemBaseEditor.OnEnable() Assets/Devdog/InventoryPro/Scripts/Items/Editor/InventoryItemBaseEditor.cs:47
45: public override void OnEnable()
46: {
-->47: base.OnEnable();
49: id = serializedObject.FindProperty("_id");

EquippableInventoryItemEditor.OnEnable() Assets/Devdog/InventoryPro/Scripts/Items/Editor/EquippableInventoryItemEditor.cs:29
27: public override void OnEnable()
28: {
-->29: base.OnEnable();
30: equipmentType = serializedObject.FindProperty("_equipmentType");
31: equipPosition = serializedObject.FindProperty("_equipmentPosition");


Thank you!


These are issues in the Unity editor and can be safely ignored. Restarting the Unity editor should remove the errors.


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 4 guests