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

Build Settings Window

-

Steps to reproduce:

  1. Create a new unity project
  2. Open Build Profile Window
  3. Add a new Build Profile (Library/BuildProfileContext.asset should be created)
  4. Close the Editor
  5. Open Library/BuildProfileContext.asset and change the m_Script field from the valid built in reference to any invalid one, e.g. 
  6. m_Script: \{fileID: 11500000, guid: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa, type: 3}
  7. Save the file and reopen the Editor
  8. 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:

  1. Resolution Note:

    Fixed in 6000.6.0a2

  2. Resolution Note (fix version 6000.6.0a2):

    Fixed in 6000.6.0a2

  3. Resolution Note (fix version 6000.5.0b2):

    Fixed in 6000.5.0b2

  4. Resolution Note (fix version 6000.4.2f1):

    Fixed in 6000.4.2f1

  5. Resolution Note (fix version 6000.3.13f1):

    Fixed in 6000.3.13f1

  6. Resolution Note (fix version 6000.0.73f1):

    Fixed in 6000.0.73f1

Add comment

Log in to post comment

All about bugs

View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.