Search Issue Tracker
Fixed
Fixed in 6000.0.73f1, 6000.3.13f1, 6000.4.2f1, 6000.5.0b2, 6000.6.0a2
Under Consideration for 6000.6.X
Votes
0
Found in
6000.0.60f1
6000.3.10f1
6000.4.0b10
6000.5.0a7
6000.6.0a1
Issue ID
UUM-136377
Regression
No
NullReferenceException and empty Build Profiles window when BuildProfileContext.asset contains invalid script reference
Steps to reproduce:
- Create a new unity project
- Open Build Profile Window
- Add a new Build Profile (Library/BuildProfileContext.asset should be created)
- Close the Editor
- Open Library/BuildProfileContext.asset and change the m_Script field from the valid built in reference to any invalid one, e.g.
- m_Script: \{fileID: 11500000, guid: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, type: 3}
- Save the file and reopen the Editor
- Open Window > Build Profiles
Actual results: Console errors and classic platforms list and user-created profiles list are both empty
Expected results: The Build Profiles window should open normally with all platforms and profiles present.
Reproducible with versions: 6000.0.60f1, 6000.6.0a1
Tested on (OS): MacOS
{code:java}
BuildProfileContext asset exists but could not be loaded.
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler () (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:570)
NullReferenceException: Object reference not set to an instance of an object
UnityEditor.Build.Profile.BuildProfileContext.CreateOrLoad () (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildProfile/BuildProfileContext.cs:746)
UnityEditor.Build.Profile.BuildProfileContext.get_instance () (at /Users/bokken/build/output/unity/unity/Editor/Mono/BuildProfile/BuildProfileContext.cs:206)
UnityEditor.Build.Profile.Handlers.BuildProfileDataSource..ctor (UnityEditor.Build.Profile.BuildProfileWindow window) (at /Users/bokken/build/output/unity/unity/Modules/BuildProfileEditor/Handlers/BuildProfileDataSource.cs:20)
UnityEditor.Build.Profile.BuildProfileWindow.CreateGUI () (at /Users/bokken/build/output/unity/unity/Modules/BuildProfileEditor/BuildProfileWindow.cs:170)
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <3eb0070ec3184acfa9cdfc9616bb21ab>:0)
Rethrow as TargetInvocationException: Exception has been thrown by the target of an invocation.
System.Reflection.RuntimeMethodInfo.Invoke (System.Object obj, System.Reflection.BindingFlags invokeAttr, System.Reflection.Binder binder, System.Object[] parameters, System.Globalization.CultureInfo culture) (at <3eb0070ec3184acfa9cdfc9616bb21ab>:0)
System.Reflection.MethodBase.Invoke (System.Object obj, System.Object[] parameters) (at <3eb0070ec3184acfa9cdfc9616bb21ab>:0)
UnityEditor.UIElements.DefaultEditorWindowBackend.Invoke (System.String methodName) (at /Users/bokken/build/output/unity/unity/Modules/UIElementsEditor/WindowBackends/DefaultEditorWindowBackend.cs:387)
UnityEditor.EditorApplication:Internal_CallGlobalEventHandler() (at /Users/bokken/build/output/unity/unity/Editor/Mono/EditorApplication.cs:570)
{code}
Notes:
- Workaround: delete Library/BuildProfileContext.asset and reopen the Editor.
- I could not reproduce organically. The repro above manually corrupts the asset file to trigger the code path. But there are multiple reports of this occurring naturally in our Discussions forums
- [https://discussions.unity.com/t/my-build-profile-no-longer-shows-up/1619616]
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Texture2D hash changes inside of an AssetBundle when rebuilding a SpriteAtlas bundle with an empty AssetPostprocessor Script enabled
- Aniso Level still applies when Generate MipMap is disabled in Texture Import Settings
- Mipmap Limit Groups long names are not truncated when creating a new Mipmap Limit Group with a long name
- “ArgumentException: Invalid double parameter.” error is thrown when Infinity is typed into the Fixed Timestep field
- GameObject becomes gray when using HDRP and STP together on macOS
Resolution Note:
Fixed in 6000.6.0a2
Resolution Note (fix version 6000.6.0a2):
Fixed in 6000.6.0a2
Resolution Note (fix version 6000.5.0b2):
Fixed in 6000.5.0b2
Resolution Note (fix version 6000.4.2f1):
Fixed in 6000.4.2f1
Resolution Note (fix version 6000.3.13f1):
Fixed in 6000.3.13f1
Resolution Note (fix version 6000.0.73f1):
Fixed in 6000.0.73f1