Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash after selecting a map #7216

Closed
dolkilu opened this issue Dec 15, 2019 · 34 comments · Fixed by ppy/osu-framework#3139
Closed

Crash after selecting a map #7216

dolkilu opened this issue Dec 15, 2019 · 34 comments · Fixed by ppy/osu-framework#3139
Assignees
Labels
area:gameplay osu!framework issue Can't resolve this without changes to osu!framework.

Comments

@dolkilu
Copy link

dolkilu commented Dec 15, 2019

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

@bdach
Copy link
Collaborator

bdach commented Dec 15, 2019

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 bdach added hard crash / startup crash missing details Can't move forward without more details from the reporter labels Dec 15, 2019
@dolkilu
Copy link
Author

dolkilu commented Dec 15, 2019

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()

@bdach bdach added osu!framework issue Can't resolve this without changes to osu!framework. and removed missing details Can't move forward without more details from the reporter labels Dec 15, 2019
@bdach
Copy link
Collaborator

bdach commented Dec 15, 2019

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

@dolkilu
Copy link
Author

dolkilu commented Dec 15, 2019

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 dolkilu changed the title carsh after selecting a map with DT carsh after selecting a map Dec 15, 2019
@peppy
Copy link
Member

peppy commented Dec 15, 2019

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

@smoogipoo
Copy link
Contributor

Does this happen with the default lazer skin?

@dolkilu
Copy link
Author

dolkilu commented Dec 16, 2019

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?

@peppy peppy changed the title carsh after selecting a map Crash after selecting a map Dec 16, 2019
@dolkilu
Copy link
Author

dolkilu commented Dec 16, 2019

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.

@peppy peppy added this to the Candidate Issues milestone Dec 17, 2019
@peppy
Copy link
Member

peppy commented Dec 17, 2019

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

@dolkilu
Copy link
Author

dolkilu commented Dec 17, 2019

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 :(

@mouzedrift
Copy link
Contributor

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

@smoogipoo
Copy link
Contributor

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

@mouzedrift
Copy link
Contributor

shouldnt this be fixed in version 2019.1219.0 ? im still crashing

@bdach
Copy link
Collaborator

bdach commented Dec 19, 2019

@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.

@mouzedrift
Copy link
Contributor

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

@bdach bdach reopened this Dec 19, 2019
@dolkilu
Copy link
Author

dolkilu commented Dec 19, 2019

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()

@bdach
Copy link
Collaborator

bdach commented Dec 19, 2019

Will see if I can reproduce in the near future.

@sora-jp
Copy link

sora-jp commented Dec 20, 2019

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.

@huoyaoyuan
Copy link
Contributor

So if the dispose method is called from the finalizer

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

@peppy
Copy link
Member

peppy commented Dec 20, 2019

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.

@sora-jp
Copy link

sora-jp commented Dec 20, 2019

Hmm, will try to reproduce, and see if that's the case.

@sora-jp
Copy link

sora-jp commented Dec 20, 2019

Yeah, peppy is correct. Tested with a small sample and it seems that fields are never collected before the finalizer is called. So, most likely there is a crash somewhere, that happens during the object construction. Will try to look into it more.

@a68366
Copy link

a68366 commented Dec 22, 2019

Got the same issue with https://osu.ppy.sh/beatmapsets/204020#osu/481882 .

While trying to debug the issue i found:

  • It crashes when trying to dispose() some VideoSprite, which is null.
  • Crash happens only on the Release build. Debug is fine.
  • Crash happens after getting Beatmap.Value.Video in osu.Game\Screens\Play\Player.cs
  • The only(?) place it happens is here and when I pass null instead of Beatmap.Value.Video, everything works fine
  • If we add if (path == null) return null; at the beginning of GetStream here, everything works fine

So I guess it's somehow trying to garbage collect Beatmap.Value.Video and the problem is in the GetVideo() or somewhere in the storage.

I'm bad at C# and new to osu! codebase, so idk how to properly fix the bug. Hope this info helps.

@sora-jp
Copy link

sora-jp commented Dec 22, 2019

Hmm, did you download the beatmap with or without the video? It could possibly be linked to trying to play a beatmap with video that was downloaded without the video.

@dolkilu
Copy link
Author

dolkilu commented Dec 22, 2019

I always download without video, maybe that's the problem lol

@a68366
Copy link

a68366 commented Dec 22, 2019

I always download without video too.
Tried to delete the song and re-download with a video -- still crashed.
Then i deleted the client.db, client.db-shm, client.db-wal and re-downloaded with a video -- the song played normally.
Some db corruption when downloading without a video?

@peppy
Copy link
Member

peppy commented Dec 25, 2019

@a68366 do you still have a copy of your database? also can you confirm you're using the latest release (not self-compiled)?

i can't reproduce using any of the steps you mentioned, nor can i see how this would happen from a code perspective.

@mouzedrift
Copy link
Contributor

i dont know if it helps but im just gonna leave my osu lazer database here since the game crashes for me as well. im also using the latest release build (not self compiled)
osu db.zip

@peppy
Copy link
Member

peppy commented Dec 25, 2019

thank you, very helpful.

@peppy
Copy link
Member

peppy commented Dec 25, 2019

Unfortunately I can't reproduce a crash. Are you able to also include your "files" folder?

@mouzedrift
Copy link
Contributor

Unfortunately I can't reproduce a crash. Are you able to also include your "files" folder?

sure, but its gonna take a while since its 2GB big and my internet is pretty slow.

@peppy
Copy link
Member

peppy commented Dec 25, 2019

that's also weird, since the db you sent only had one track. do you have many skins loaded? you could delete your skins, restart once and it should reduce in size.

i wouldn't expect it to be larger than 50mb.

@mouzedrift
Copy link
Contributor

i've had more beatmaps but deleted the database, skins and beatmaps to test a bit more.
anyway here is the files folder:
https://drive.google.com/file/d/1zkoIe0RDcgJp1YowiWKc831j4X2CSBEh/view?usp=sharing

@peppy
Copy link
Member

peppy commented Dec 25, 2019

Thank you. I am able to reproduce.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:gameplay osu!framework issue Can't resolve this without changes to osu!framework.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants