Search Issue Tracker
Fixed in 2017.1.X
Votes
0
Found in
2017.1.0b2
Issue ID
900419
Regression
Yes
NullReferenceException when pressing Play with the Sprite Editor open, on OSX
NullReferenceException when pressing Play with the Sprite Editor open, on OSX
See attached gif
1. Open attached project
2. Expand the texture
3. Drag any sliced sprite onto the scene
4. Open the Sprite Editor, and keep it on the same screen as the editor
5. Press Play
NullReferenceException: Object reference not set to an instance of an object
UnityEngine.GUILayoutUtility.LayoutFromContainer (Single w, Single h) (at /Users/weswong/Work/trunk/unity/Runtime/IMGUI/Managed/GUILayoutUtility.cs:182)
UnityEngine.Experimental.UIElements.UIElementsUtility.EndContainerGUI () (at /Users/weswong/Work/trunk/unity/Runtime/UIElements/Managed/UIElementsUtility.cs:173)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoOnGUI (UnityEngine.Event evt) (at /Users/weswong/Work/trunk/unity/Runtime/UIElements/Managed/IMGUIContainer.cs:110)
UnityEngine.Experimental.UIElements.IMGUIContainer.HandleEvent (UnityEngine.Event evt, UnityEngine.Experimental.UIElements.VisualElement finalTarget) (at /Users/weswong/Work/trunk/unity/Runtime/UIElements/Managed/IMGUIContainer.cs:137)
UnityEngine.Experimental.UIElements.IMGUIContainer.DoRepaint (IStylePainter painter) (at /Users/weswong/Work/trunk/unity/Runtime/UIElements/Managed/IMGUIContainer.cs:36)
UnityEngine.Experimental.UIElements.Panel.PaintSubTree (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, Matrix4x4 offset, Rect currentClip, Matrix4x4 clipTransform, Rect currentGlobalClip) (at /Users/weswong/Work/trunk/unity/Runtime/UIElements/Managed/Panel.cs:390)
UnityEngine.Experimental.UIElements.Panel.PaintSubTree (UnityEngine.Event e, UnityEngine.Experimental.UIElements.VisualElement root, Matrix4x4 offset, Rect currentClip, Matrix4x4 clipTransform, Rect currentGlobalClip) (at /Users/weswong/Work/trunk/unity/Runtime/UIElements/Managed/Panel.cs:398)
UnityEngine.Experimental.UIElements.Panel.Repaint (UnityEngine.Event e) (at /Users/weswong/Work/trunk/unity/Runtime/UIElements/Managed/Panel.cs:411)
UnityEngine.Experimental.UIElements.UIElementsUtility.DoDispatch (IVisualElementPanel panel) (at /Users/weswong/Work/trunk/unity/Runtime/UIElements/Managed/UIElementsUtility.cs:203)
UnityEngine.Experimental.UIElements.UIElementsUtility.ProcessEvent (Int32 instanceID, IntPtr nativeEventPtr) (at /Users/weswong/Work/trunk/unity/Runtime/UIElements/Managed/UIElementsUtility.cs:67)
UnityEngine.GUIUtility.ProcessEvent (Int32 instanceID, IntPtr nativeEventPtr) (at /Users/weswong/Work/trunk/unity/Runtime/IMGUI/Managed/GUIUtility.cs:186)
Note: on 5.6 versions, you have to enter Play, exit, enter Play to repro this NullReferenceException
Cannot repro on Win10
Possibly related to https://fogbugz.unity3d.com/f/cases/895220/
Occurring on: 5.6.0a5 onwards till 2017.1.0b2 (current latest)
Not occurring: 5.6.0a4 and older
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Mono Windows Builds don't produce full log callstacks when generating logs
- AssetBundles fail to load when running in Built Players for Mobile Devices
- UI elements with text gets bigger and grey when Player window is moved to another screen with different resolution
- System name accepts multiline text but crops it on confirmation, duplicates input, and shrinks the field when empty
- UI element scale and position are wrong in project build when DRS is changed with HDR and Software Dynamic Resolution enabled
Add comment