mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
5a7d339cc8
Not only does this combine the check into one location, but it also adds a check on the global `WorkingBeatmap` being updated, which is the only way I can see the following failure happening: ```csharp 05:19:07 osu.Game.Tests: osu.Game.Tests.Visual.Editing.TestSceneEditorBeatmapCreation.TestAddAudioTrack 05:19:07 Failed TestAddAudioTrack [161 ms] 05:19:07 Error Message: 05:19:07 TearDown : System.NullReferenceException : Object reference not set to an instance of an object. 05:19:07 Stack Trace: 05:19:07 --TearDown 05:19:07 at osu.Game.Database.ModelManager`1.<>c__DisplayClass7_0.<AddFile>b__0(TModel managed) in C:\BuildAgent\work\ecd860037212ac52\osu.Game\Database\ModelManager.cs:line 36 05:19:07 at osu.Game.Database.ModelManager`1.<>c__DisplayClass8_0.<performFileOperation>b__0(Realm realm) in C:\BuildAgent\work\ecd860037212ac52\osu.Game\Database\ModelManager.cs:line 49 05:19:07 at osu.Game.Database.RealmExtensions.Write(Realm realm, Action`1 function) in C:\BuildAgent\work\ecd860037212ac52\osu.Game\Database\RealmExtensions.cs:line 14 05:19:07 at osu.Game.Database.ModelManager`1.performFileOperation(TModel item, Action`1 operation) in C:\BuildAgent\work\ecd860037212ac52\osu.Game\Database\ModelManager.cs:line 46 05:19:07 at osu.Game.Database.ModelManager`1.AddFile(TModel item, Stream contents, String filename) in C:\BuildAgent\work\ecd860037212ac52\osu.Game\Database\ModelManager.cs:line 36 05:19:07 at osu.Game.Screens.Edit.Setup.ResourcesSection.ChangeAudioTrack(FileInfo source) in C:\BuildAgent\work\ecd860037212ac52\osu.Game\Screens\Edit\Setup\ResourcesSection.cs:line 115 05:19:07 at osu.Game.Tests.Visual.Editing.TestSceneEditorBeatmapCreation.<TestAddAudioTrack>b__13_0() in C:\BuildAgent\work\ecd860037212ac52\osu.Game.Tests\Visual\Editing\TestSceneEditorBeatmapCreation.cs:line 101 05:19:07 at osu.Framework.Testing.Drawables.Steps.AssertButton.checkAssert() 05:19:07 at osu.Framework.Testing.Drawables.Steps.StepButton.PerformStep(Boolean userTriggered) 05:19:07 at osu.Framework.Testing.TestScene.runNextStep(Action onCompletion, Action`1 onError, Func`2 stopCondition) ``` |
||
---|---|---|
.. | ||
.vscode | ||
Editor | ||
Mods | ||
Resources | ||
LegacyMainCirclePieceTest.cs | ||
osu.Game.Rulesets.Osu.Tests.csproj | ||
OsuBeatmapConversionTest.cs | ||
OsuDifficultyCalculatorTest.cs | ||
OsuLegacyModConversionTest.cs | ||
OsuSkinnableTestScene.cs | ||
StackingTest.cs | ||
TestPlayfieldBorder.cs | ||
TestSceneAccuracyHeatmap.cs | ||
TestSceneCursorParticles.cs | ||
TestSceneCursorTrail.cs | ||
TestSceneDrawableJudgement.cs | ||
TestSceneFollowPoints.cs | ||
TestSceneGameplayCursor.cs | ||
TestSceneHitCircle.cs | ||
TestSceneHitCircleApplication.cs | ||
TestSceneHitCircleArea.cs | ||
TestSceneHitCircleComboChange.cs | ||
TestSceneHitCircleHidden.cs | ||
TestSceneHitCircleKiai.cs | ||
TestSceneHitCircleLongCombo.cs | ||
TestSceneLegacyBeatmapSkin.cs | ||
TestSceneMissHitWindowJudgements.cs | ||
TestSceneNoSpinnerStacking.cs | ||
TestSceneObjectOrderedHitPolicy.cs | ||
TestSceneOsuFlashlight.cs | ||
TestSceneOsuHitObjectSamples.cs | ||
TestSceneOsuPlayer.cs | ||
TestSceneResumeOverlay.cs | ||
TestSceneShaking.cs | ||
TestSceneSkinFallbacks.cs | ||
TestSceneSlider.cs | ||
TestSceneSliderApplication.cs | ||
TestSceneSliderComboChange.cs | ||
TestSceneSliderHidden.cs | ||
TestSceneSliderInput.cs | ||
TestSceneSliderSnaking.cs | ||
TestSceneSpinner.cs | ||
TestSceneSpinnerApplication.cs | ||
TestSceneSpinnerHidden.cs | ||
TestSceneSpinnerRotation.cs | ||
TestSceneStartTimeOrderedHitPolicy.cs |