osu icon indicating copy to clipboard operation
osu copied to clipboard

Crash after selecting a map

Open dolkilu opened this issue 6 years ago • 34 comments

Describe the crash: crash while trying to play a map, "unhandled error, reported to devs" message has been shown, so Im reporting this issue just in case. so far Ive only encountered the crash by playing a map with DT, only happens with the newest version.

Screenshots or videos showing encountered issue:

osu!lazer version: 2019.1213.0 Logs: unable to find logs with correct time stamps related to the crash Computer Specifications: i7 9700k gtx2080 ddr4 16gb

dolkilu avatar Dec 15 '19 01:12 dolkilu

We can't proceed without logs here. Where have you checked? The locations are:

  • %AppData%/osu/logs (on Windows),
  • ~/.local/share/osu/logs (on Linux and macOS).

Also please state your OS.

bdach avatar Dec 15 '19 07:12 bdach

found it now, on windows runtime.log performance.log network.log

2019-12-15 01:20:16: Screen changed → PlayerLoader 2019-12-15 01:20:16: Unhandled exception has been allowed with 0 more allowable exceptions . 2019-12-15 01:20:16: An unhandled error has occurred. 2019-12-15 01:20:16: System.ArgumentNullException: Value cannot be null. 2019-12-15 01:20:16: at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken) 2019-12-15 01:20:16: at osu.Framework.Graphics.Drawable.dispose(Boolean isDisposing) 2019-12-15 01:20:16: at osu.Framework.Graphics.Drawable.Finalize()

dolkilu avatar Dec 15 '19 08:12 dolkilu

Thanks, that's helpful. Just for extra information, does this happen every time, or just sometimes?

bdach avatar Dec 15 '19 08:12 bdach

Turns out it's about the map not about DT, it's just a coincidence that the map I play DT on crashes, should I edit the post? It happens on maps that have the issue only, I tried to replicate the crash, the crash happens every time on the selected map. only happens after this update. example of map that crashed, I can easily find them by randoming maps https://osu.ppy.sh/beatmapsets/368985#osu/808848 Lemur diff https://osu.ppy.sh/beatmapsets/246416#osu/567607 laurier's insane https://osu.ppy.sh/beatmapsets/191471#osu/458813 gu's insane

dolkilu avatar Dec 15 '19 09:12 dolkilu

Can't reproduce with the provided beatmap links, unfortunately.

peppy avatar Dec 15 '19 15:12 peppy

Does this happen with the default lazer skin?

smoogipoo avatar Dec 16 '19 01:12 smoogipoo

Does this happen with the default lazer skin?

yes, tried with both team osu! skin and it still crashes

failed to re-import the map with and without deleting the map/from osu!direct, error shown image image

I can still import other working maps from the site/direct. Im using symbolic link because Ive limited C drive space, will it causes database issue?

dolkilu avatar Dec 16 '19 05:12 dolkilu

Just reporting that the map I had issue with still crashes ,although it seems there is no related update on the newest version's change log. Edit: after testing with the 3 maps i linked, after re-importing "weaver diamond" still crashes and the other 2 works fine. will try to test more if I find more maps with the issue while playing the game.

dolkilu avatar Dec 16 '19 17:12 dolkilu

It would be helpful if you can debug this. Not many details to work with here.

peppy avatar Dec 17 '19 06:12 peppy

It would be helpful if you can debug this. Not many details to work with here.

Although I want to help, I have very little programming knowledge :(

dolkilu avatar Dec 17 '19 14:12 dolkilu

i have the same issue and noticed that it only crashes when you compile the release version while the debug version doesnt crash

mouzedrift avatar Dec 17 '19 17:12 mouzedrift

This is caused by https://github.com/ppy/osu-framework/issues/3120, and has since been fixed (will be fixed in the next release).

smoogipoo avatar Dec 18 '19 12:12 smoogipoo

shouldnt this be fixed in version 2019.1219.0 ? im still crashing

mouzedrift avatar Dec 19 '19 15:12 mouzedrift

@mouzedrift Are you crashing in the exact same scenario, with the same exact stack trace? You'll have to attach some logs/details for us to know otherwise - we're not mind readers.

bdach avatar Dec 19 '19 15:12 bdach

Are you crashing in the exact same scenario, with the same exact stack trace?

Yup, everything is the same. I've tried these 3 maps provided by dolkilu

https://osu.ppy.sh/beatmapsets/368985#osu/808848 Lemur diff https://osu.ppy.sh/beatmapsets/246416#osu/567607 laurier's insane https://osu.ppy.sh/beatmapsets/191471#osu/458813 gu's insane

Logs: database.log network.log performance.log runtime.log updater.log

mouzedrift avatar Dec 19 '19 15:12 mouzedrift

tested with default skins and re-imported, still crashes. runtime.log

2019-12-19 15:52:55: beatmap changed from "solfa feat.Chata - I will (Fycho) [Normal]" to "solfa feat.Chata - I will (Fycho) [Laurier's Insane]" 2019-12-19 15:52:55: working beatmap updated to solfa feat.Chata - I will (Fycho) [Laurier's Insane] 2019-12-19 15:52:55: Screen changed → PlayerLoader 2019-12-19 15:52:55: Unhandled exception has been allowed with 0 more allowable exceptions . 2019-12-19 15:52:55: An unhandled error has occurred. 2019-12-19 15:52:55: System.ArgumentNullException: Value cannot be null. 2019-12-19 15:52:55: at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken) 2019-12-19 15:52:55: at osu.Framework.Graphics.Drawable.dispose(Boolean isDisposing) 2019-12-19 15:52:55: at osu.Framework.Graphics.Drawable.Finalize()

2019-12-19 15:55:51: updating selection with beatmap:24211 ruleset:0 2019-12-19 15:55:51: beatmap changed from "WEAVER - Kuchizuke Diamond (jieusieu) [Easy]" to "WEAVER - Kuchizuke Diamond (jieusieu) [Lemur]" 2019-12-19 15:55:51: working beatmap updated to WEAVER - Kuchizuke Diamond (jieusieu) [Lemur] 2019-12-19 15:55:52: Screen changed → PlayerLoader 2019-12-19 15:55:52: Unhandled exception has been allowed with 0 more allowable exceptions . 2019-12-19 15:55:52: An unhandled error has occurred. 2019-12-19 15:55:52: System.ArgumentNullException: Value cannot be null. 2019-12-19 15:55:52: at System.Threading.Monitor.ReliableEnter(Object obj, Boolean& lockTaken) 2019-12-19 15:55:52: at osu.Framework.Graphics.Drawable.dispose(Boolean isDisposing) 2019-12-19 15:55:52: at osu.Framework.Graphics.Drawable.Finalize()

dolkilu avatar Dec 19 '19 16:12 dolkilu

Will see if I can reproduce in the near future.

bdach avatar Dec 19 '19 16:12 bdach

I think i figured out the bug. Apparently, when the .NET runtime calls the finalizer during a garbage collection, the order of collection is not guaranteed. This means that sometimes, the fields in the Drawable are collected before the finalizer is run. If the loadLock field happens to be collected before the finalizer is run, then we will try to lock on a null reference, and that always fails. So if the dispose method is called from the finalizer, we need to make sure we don't use any reference fields without checking if they are null. I'll open a PR in osu-framework for this.

sora-jp avatar Dec 20 '19 11:12 sora-jp

So if the dispose method is called from the finalizer

The better choice is to avoid finalizers. See ppy/osu-framework#3118

huoyaoyuan avatar Dec 20 '19 11:12 huoyaoyuan

That's not the/an issue. The problem if there's a hard crash occurring in construction (being hidden due to being a native crash, most likely).

loadLock is never initialised.

peppy avatar Dec 20 '19 12:12 peppy