I contacted the vendor and they suggested it's more than likely a Unity editor issue. I'm on Ubuntu 17.04 zesty and Unity2017.1.0xf3Linux. Happened while I was installing the new Bolt visual scripting package from the asset store. Code (csharp): NullReferenceException: Object reference not set to an instance of an object UnityEngine.GUILayout.FlexibleSpace () (at /home/builduser/buildslave/unity/build/Runtime/IMGUI/Managed/GUILayout.cs:262) Ludiq.GeneratePropertyProvidersPage.OnContentGUI () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/GeneratePropertyProvidersWindow/GeneratePropertyProvidersPage.cs:52) Ludiq.Page.DrawContent () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/Page.cs:56) Ludiq.Wizard.OnGUI () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/Wizard.cs:103) Ludiq.WrappedEditorWindow.OnGUI () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:41) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:272) UnityEditor.HostView.Invoke (System.String methodName) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:265) UnityEditor.HostView.OnGUI () (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:94)
Here's another error I keep getting I got it from one piece of code that was renaming a ScriptableObject's name in the OnGUI method, I believe. Now I have no idea why I'm getting it.
Author of Bolt here! None of my Windows or Mac users reported the issue. The null ref exception occurs from within FlexibleSpace(), which makes me think it's not anything related to my code.
Another issue I'm running into is that Bolt's search box when creating a new node is not capturing keyboard focus. It's a UI element very similar to the "Add New Component" popup you get from the inspector. The search in the inspector works fine and captures keyboard focus, but not for Bolt's. I suspect this is a Unity issue as well.
To be clear though, Bolt has its own code for the fuzzy finder, but much of the input handling for clicks and text is directly imported from the decompiled Unity source for the add component dialog.
Interesting, I switched to another application on my desktop and the bolt node search box remained open on top of the application. (Switched to Firefox) And it remains usable!
More exceptions. These happen when I try to create a new node, like I tried to click on the "Self" node in a Transition graph. It added the node, but still got this error; Code (CSharp): NullReferenceException: Object reference not set to an instance of an object Bolt.FlowCanvas.AddUnit (IUnit unit, Vector2 position) (at C:/Users/Lazlo/Projects/Ludiq/Bolt.Flow/Editor/FlowCanvas.cs:278) Bolt.FlowCanvas+<>c__DisplayClass14_0.<NewUnit>b__0 (System.Object option) (at C:/Users/Lazlo/Projects/Ludiq/Bolt.Flow/Editor/FlowCanvas.cs:317) Ludiq.LudiqGUI+<>c__DisplayClass46_0.<FuzzyDropdown>b__0 (IFuzzyOption option) (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/LudiqGUI.cs:836) Ludiq.FuzzyWindow.SelectChild (Ludiq.FuzzyOptionNode node) (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/Fuzzy/FuzzyWindow.cs:460) Ludiq.FuzzyWindow.OnOptionsGUI (Ludiq.FuzzyOptionNode parent, Single scrollViewHeight) (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/Fuzzy/FuzzyWindow.cs:947) Ludiq.FuzzyWindow.OnLevelGUI (Single anim, Ludiq.FuzzyOptionNode parent, Ludiq.FuzzyOptionNode grandParent) (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/Fuzzy/FuzzyWindow.cs:779) Ludiq.FuzzyWindow.OnGUI () (at C:/Users/Lazlo/Projects/Ludiq/Ludiq.Core/Editor/Interface/Fuzzy/FuzzyWindow.cs:665) System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:222) Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation. System.Reflection.MonoMethod.Invoke (System.Object obj, BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MonoMethod.cs:232) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at /Users/builduser/buildslave/mono/build/mcs/class/corlib/System.Reflection/MethodBase.cs:115) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:272) UnityEditor.HostView.Invoke (System.String methodName) (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:265) UnityEditor.HostView.OnGUI () (at /home/builduser/buildslave/unity/build/Editor/Mono/HostView.cs:94)
I can't reproduce the exceptions here - but for the "fuzzy finder" , the show mode for the popup window should be set to PopupMenuWithKeyboardFocus
Thanks for taking a look. I believe ludiq is on vacation, hopefully he can check out the code when he gets back. Let me know if there's anything I can do to help you find the bug.
Same problem here. After importing and set bolt to configure things automatically. NullReferenceException: Object reference not set to an instance of an object UnityEngine.GUILayout.FlexibleSpace Using windows 10. Happened when unity was already open and tried to import Bolt into a 3d project, after generation of inspectors. Not reproduced when adding Bolt during a creation of a project in a 2d project.
Hi Tak! I used a bit of reflection to have access to the overload that allows a mode and the ShowMode enum type. What's the difference with this mode exactly? Also, the flexible space issue has been reported & fixed here: https://forum.unity.com/threads/mac...ions-after-os-dialogs-have-been-shown.515421/
The difference is whether the OS should allow the popup to receive keyboard focus. On windows and mac, there's no difference between this mode and Popup, because all windows can receive keyboard focus. On linux, if you allow all popups to have keyboard focus, then it can give users very strange behavior in terms of window management and focus. Unfortunately, we have no way to autodetect in advance whether a popup should be able to receive keyboard focus...
I see! Thanks for the explanation. In that case, you should probably consider making the overload to determine the popup mode public, or at least provide a boolean overload to specify that.
i also have an error similar to that one it doesn´t let me setup bolt in 4x NET NullReferenceException: Object reference not set to an instance of an object Ludiq.GenerateDocumentationPage.OnContentGUI () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/GenerateDocumentationWindow/GenerateDocumentationPage.cs:107) Ludiq.Page.DrawContent () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Page.cs:70) Ludiq.Wizard.OnGUI () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/Wizard.cs:106) Ludiq.WrappedEditorWindow.OnGUI () (at C:/Users/lazlo/Projects/Bolt1/Package/Ludiq.Core/Editor/Windows/WrappedEditorWindow.cs:51) System.Reflection.MonoMethod.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <1f0c1ef1ad524c38bbc5536809c46b48>: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 <1f0c1ef1ad524c38bbc5536809c46b48>:0) System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <1f0c1ef1ad524c38bbc5536809c46b48>:0) UnityEditor.HostView.Invoke (System.String methodName, System.Object obj) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:345) UnityEditor.HostView.Invoke (System.String methodName) (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:339) UnityEditor.HostView.OldOnGUI () (at C:/buildslave/unity/build/Editor/Mono/HostView.cs:139) UnityEngine.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt, UnityEngine.Matrix4x4 parentTransform, UnityEngine.Rect clippingRect, System.Boolean isComputingLayout, UnityEngine.Rect layoutSize) (at C:/buildslave/unity/build/Modules/UIElements/IMGUIContainer.cs:278) UnityEngine.GUIUtility: ProcessEvent(Int32, IntPtr)