How to reproduce:
1. Open the attached project "ScenePathNullRepro"
2. Go to Bug -> "Build with a null entry in the scenes array"
3. Observe the Console
Expected results: An ArgumentException naming the offending parameter is thrown, the way a null locationPathName is reported
Actual results: "NullReferenceException: Object reference not set to an instance of an object" is thrown from BuildPipeline.ValidateScenePaths with no indication that a scene entry was null
Reproducible with: 6000.0.81f1, 6000.3.17f1, 6000.5.0f1, 6000.6.0f1, 6000.7.0a5
Reproducible on: macOS Tahoe 26.6 (M1 Max)
Not reproducible on: No other environment tested
First lines of error:
NullReferenceException: Object reference not set to an instance of an object
at UnityEditor.BuildPipeline.ValidateScenePaths (System.String[] scenes, System.String& errorMessage) [0x00007] in /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildPipeline.bindings.cs:352
at UnityEditor.BuildPipeline.BuildPlayer (UnityEditor.BuildPlayerOptions buildPlayerOptions) [0x0005a] in /Users/bokken/build/output/unity/unity/Editor/Mono/BuildPipeline/BuildPipeline.bindings.cs:208