0
Not a Bug

[1.4.0f3] Update wizard can not be run; NullReferenceException

serialkamikaze 2 years ago updated by Lazlo Bonin (Lead Developer) 2 years ago 3
  • Unity 2018.2.1f1
  • Bolt 1.4.0 --> 1.4.0f3
  • Using .NET 3.5 

Downloaded the 1.4.0f3 build and updated it to the project. It imported and did it things from the Unity's side. But then after it was ready the Bolt's Graph, Variables and Graph Inspector -windows showed the "Update Wizard"-button.

But when pressed, NullReferenceException will be shown in console. Same error will come if I try to look Ludiq's/Bolt's "About..." menus.

From the console:

NullReferenceException: Object reference not set to an instance of an object
UnityEditor.EditorStyles.get_largeLabel () (at /Users/builduser/buildslave/unity/build/Editor/Mono/GUI/EditorStyles.cs:19)
Ludiq.ChangelogPage+Styles..cctor () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/LudiqGUI.cs:1842)
Rethrow as TypeInitializationException: An exception was thrown by the type initializer for Styles
Ludiq.ChangelogPage.FormatChange (System.String change) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/LudiqGUI.cs:1732)
System.Linq.Enumerable+<CreateSelectIterator>c__Iterator10`2[System.String,Ludiq.ChangelogPage+Change].MoveNext ()
System.Collections.Generic.List`1[Ludiq.ChangelogPage+Change].AddEnumerable (IEnumerable`1 enumerable) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:128)
System.Collections.Generic.List`1[Ludiq.ChangelogPage+Change]..ctor (IEnumerable`1 collection) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Collections.Generic/List.cs:65)
System.Linq.Enumerable.ToList[Change] (IEnumerable`1 source)
Ludiq.ChangelogPage..ctor (Ludiq.PluginChangelog changelog, Boolean showPluginName) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/LudiqGUI.cs:1703)
Ludiq.ChangelogsPage..ctor (IEnumerable`1 plugins) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/LudiqGUI.cs:1854)
Ludiq.UpdateWizard.Initialize () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Platforms/AotPreBuilder.cs:167)
Ludiq.UpdateWizard.OnShow ()
Ludiq.EditorWindowWrapper.CreateWindow ()
Ludiq.EditorWindowWrapper.ShowUtility () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Reflection/MemberOptionTree.cs:308)
Ludiq.Wizard.Show ()
Ludiq.PluginContainer+<>c.<Initialize>b__16_11 () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Dependencies/SQLite/SQLite.cs:1627)
UnityEditor.EditorApplication.Internal_CallDelayFunctions () (at /Users/builduser/buildslave/unity/build/Editor/Mono/EditorApplication.cs:200)
Bolt Version:
Unity Version:
Platform(s):
Scripting Backend:
.NET Version (API Compatibility Level):
Pending Review

Do you get any other error/warning?

Can you try entering / exiting play mode?

TL;DR - After entering and exiting the Play-mode wizard and everything seems to work.

When starting Unity for that project I get two warnings besides that error:

1)
Loading Ludiq.DictionaryAsset failed:
Assets/Ludiq/Ludiq.Core/ProjectSettings.asset
UnityEngine.Debug:LogWarning(Object)
Ludiq.AssetUtility:TryLoad(String, DictionaryAsset&) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Inspection/MetadataDictionaryAdaptor.cs:33)
Ludiq.PluginConfiguration:LoadProjectSettings() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/LudiqGUIUtility.cs:775)
Ludiq.PluginConfiguration:Load() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/LudiqGUIUtility.cs:647)
Ludiq.PluginConfiguration:Initialize() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/LudiqGUIUtility.cs:622)
Ludiq.PluginContainer:Initialize() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Dependencies/SQLite/SQLite.cs:1523)
Ludiq.PluginContainer:.cctor() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Dependencies/SQLite/SQLite.cs:1278)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
2)
Loading Bolt.VariablesAsset failed:
Assets/Ludiq/Bolt.Core/Generated/Variables/Resources/ApplicationVariables.asset
UnityEngine.Debug:LogWarning(Object)
Ludiq.AssetUtility:TryLoad(String, VariablesAsset&) (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Inspection/MetadataDictionaryAdaptor.cs:33)
Bolt.EditorVariablesUtility:PrepareAsset(String) (at C:/Users/lazlo/Projects/Ludiq/Bolt.Core/Editor/Variables/EditorVariablesUtility.cs:38)
Bolt.EditorVariablesUtility:.cctor() (at C:/Users/lazlo/Projects/Ludiq/Bolt.Core/Editor/Variables/EditorVariablesUtility.cs:16)
System.Runtime.CompilerServices.RuntimeHelpers:RunClassConstructor(RuntimeTypeHandle)
Ludiq.PluginContainer:Initialize() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Dependencies/SQLite/SQLite.cs:1523)
Ludiq.PluginContainer:.cctor() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Dependencies/SQLite/SQLite.cs:1278)
UnityEditor.EditorAssemblies:ProcessInitializeOnLoadAttributes()
When I enter Play-mode I get following error in the console:
NullReferenceException: Object reference not set to an instance of an object
Ludiq.Wizard.OnClose ()
Ludiq.WrappedEditorWindow.OnDisable () (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Utilities/EditorApplicationUtility.cs:139)

But after about 30seconds game actually started (this normally takes just few seconds).

Then I exited the Play-mode. Now I tried to press the "Update wizard" button and it opened the dialog. I made backup and let it do it things.
After all was done Graph, Variables and Graph inspector no longer had the "Update wizard" button as they were now normal. But following four errors did came:

EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndVertical()
Ludiq.LudiqGUI:EndVertical() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Utilities/NameUtility.cs:11)
Ludiq.BackupPage:OnContentGUI() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/Fuzzy/FuzzyOption.cs:15)
Ludiq.Page:DrawContent()
Ludiq.Wizard:OnGUI() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Utilities/AssetBundleUtility.cs:11)
Ludiq.WrappedEditorWindow:OnGUI()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
 
EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndScrollView()
Ludiq.Page:DrawContent()
Ludiq.Wizard:OnGUI() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Utilities/AssetBundleUtility.cs:11)
Ludiq.WrappedEditorWindow:OnGUI()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUILayout:EndVertical()
Ludiq.LudiqGUI:EndVertical() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Utilities/NameUtility.cs:11)
Ludiq.Wizard:OnGUI() (at C:/Users/lazlo/Projects/Ludiq/Ludiq.Core/Editor/Utilities/AssetBundleUtility.cs:11)
Ludiq.WrappedEditorWindow:OnGUI()
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)
EndLayoutGroup: BeginLayoutGroup must be called first.
UnityEngine.GUIUtility:ProcessEvent(Int32, IntPtr)

But now everything seems to work okay for now. Those "About..." windows now opens normally without an error.

It seems that I panicked too soon. Just thought that might do more harm if I continue to Play-mode.

Not a Bug

Hi serialkamikaze,

Thanks for the in-depth investigation into the issue.

Entering/exiting play mode effectively forces Unity to reload assemblies (kind of like restarting the editor). If it works correctly after doing this once, then you should be perfectly fine.

The assets that fail to load may be related to this issue if you're using Unity 2018:

https://support.ludiq.io/communities/5/topics/2018-loading-dictionaryasset-variablesasset-failed-on-unity-2018

I'm closing this right now, but if anyone ever encounters the same issue, please feel free to comment again!