ppy / osu

rhythm is just a *click* away!
https://osu.ppy.sh
MIT License
15.34k stars 2.28k forks source link

osu!lazer crashing when clicking the play button without a beatmap selected #1507

Closed MattiaPette closed 6 years ago

MattiaPette commented 6 years ago

Steps to replicate the crash:

  1. Open osu! and go to the solo play section
  2. Search for a beatmap that you don't so that the game shows you "no beatmaps available" image
  3. Click the play button (bottom right corner)

The thrown exception is this: image

Exception thrown: 'osu.Game.Rulesets.UI.BeatmapInvalidForRulesetException' in osu.Game.dll Exception thrown: 'System.NotImplementedException' in osu.Game.dll [runtime:error] Could not load this beatmap sucessfully (System.NotImplementedException: The method or operation is not implemented. at osu.Game.Beatmaps.DummyWorkingBeatmap.DummyRulesetInfo.DummyRuleset.CreateRulesetContainerWith(WorkingBeatmap beatmap, Boolean isForCurrentRuleset) in C:\Users\pettemat\Projects\osu\osu.Game\Beatmaps\DummyWorkingBeatmap.cs:line 59 at osu.Game.Screens.Play.Player.load(AudioManager audio, OsuConfigManager config, APIAccess api) in C:\Users\pettemat\Projects\osu\osu.Game\Screens\Play\Player.cs:line 119)! [runtime:error] Could not load this beatmap sucessfully (System.NotImplementedException: The method or operation is not implemented. at osu.Game.Beatmaps.DummyWorkingBeatmap.DummyRulesetInfo.DummyRuleset.CreateRulesetContainerWith(WorkingBeatmap beatmap, Boolean isForCurrentRuleset) in C:\Users\pettemat\Projects\osu\osu.Game\Beatmaps\DummyWorkingBeatmap.cs:line 59 at osu.Game.Screens.Play.Player.load(AudioManager audio, OsuConfigManager config, APIAccess api) in C:\Users\pettemat\Projects\osu\osu.Game\Screens\Play\Player.cs:line 119)! Exception thrown: 'System.NullReferenceException' in osu.Game.dll An exception of type 'System.NullReferenceException' occurred in osu.Game.dll but was not handled in user code Object reference not set to an instance of an object.

UselessToucan commented 6 years ago

As far as I remember, somebody fixed this problem(press play button when there is no selected beatmap => exception) before. Looks like after introducing the Rulesets, it is back.

MattiaPette commented 6 years ago

It can easily be fixed by disabling the button when the DummyWorkingBeatmap is selected. But my osu!framework knowledge is not quite good enough (for now) to push a fix

MattiaPette commented 6 years ago

Closing the issue, PR #1511 fixes it.