ppy / osu

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

Nvidia Shadowplay causes crash when in borderless fullscreen #10157

Closed VasilisThePikachu closed 1 year ago

VasilisThePikachu commented 4 years ago

Describe the crash: Game gets stuck at black screen and crashes or either crashes instantly Screenshots or videos showing encountered issue: Crash at startup: https://youtu.be/EgcVHdLa5JU Game stuck at black screen before crashing (originally thought it only crashed at start and I was confused so the video is kinda long): https://youtu.be/J9J2RED3qHw osu!lazer version: latest (2020.910.0) Logs: logs.zip

Computer Specifications: DxDiag.txt

Joehuu commented 4 years ago

2020-09-14 20:19:38 [error]: Failed to add ruleset osu.Game.Rulesets.Karaoke.Packed, Version=2020.802.0.0, Culture=neutral, PublicKeyToken=null

Try removing/updating that ruleset and see if that fixes the crash.

Edit: remove all custom rulesets

frenzibyte commented 4 years ago

Though custom ruleset loading failure exceptions are caught in code, and that should be happening as shown here in the logs:

image

So it shouldn't be the case..., otherwise that should be fixed asap.


@VasinklingGR can you attach logs of the case where the game runs for a very long time then crashes instantly? may potentially be helpful.

LumpBloom7 commented 4 years ago

Might be related to karaoke ruleset use of the FullscreenOverlay within settings. This failure presents itself in different ways depending on whether the user has the ruleset installed in a previous version.

Related to #10053, and more specifically this comment where I noted the differing outcomes.

Updating/removing the karaoke ruleset resolves this (albeit short term)

VasilisThePikachu commented 4 years ago

Sorry for the long wait. I opened the game after removing the rulesets to check and it fullscreen to my second screen, after removing the second screen and relaunched it started crashing again

@VasinklingGR can you attach logs of the case where the game runs for a very long time then crashes instantly? may potentially be helpful.

I will send them when it does it again (that crash has a really low chance of happening apparently) edit: i had no graphics card driver updates

VasilisThePikachu commented 4 years ago

logs2.zip logs3.zip

Crash logs for when it crashes after a long time

Edit: no errors in log2 but log3 has more in performance.log

bdach commented 4 years ago

Logs show nothing relevant. Please attach Windows Event Viewer info by performing the following steps:

  1. Type Event viewer in the Windows search bar (shortcut: Windows+S) and press Enter, or open the Run... button (Windows+R), type in eventvwr and press Enter.
  2. The Event viewer window will appear. Expand Windows Logs on the left and choose Application. It might take a while to load.
  3. In the Actions pane on the right click Save All Events As..., then choose a location to save to.
  4. On the Display Information popup, select the second option, then the checkbox to show all available languages, then English (UK) (US would also do fine).
  5. Append the resulting .evtx file to this issue.

Best bet I can offer right now is that this will be an opengl driver crash that will need to be resolved by updating graphics card drivers.

VasilisThePikachu commented 4 years ago

eventvwr.zip

seems like an OpenGL crash like you said but I don't have any updates on my driver, I will try reinstalling and edit this when done edit: reinstalling drivers didn't help, did the same behavior as I explained before

bdach commented 4 years ago

Hmm, it is an nvidia error, but not the one I was expecting, as this is a quite perplexing "out of memory" issue which should not be happening on a GTX 1070... We've seen those before (#7483) but no resolution so far I'm afraid.

As a shot in the dark, do you have shadowplay enabled? Does turning it off change anything, if so?

VasilisThePikachu commented 4 years ago

Hmm, it is an nvidia error, but not the one I was expecting, as this is a quite perplexing "out of memory" issue which should not be happening on a GTX 1070... We've seen those before (#7483) but no resolution so far I'm afraid.

As a shot in the dark, do you have shadowplay enabled? Does turning it off change anything, if so?

Turning off shadowplay makes it stop crashing. I don't know if this is a shadowplay issue or something with osu itself

If you turn on shadowplay again after the game started it works fine it only crashes if shadowplay is turned on while the game is starting

bdach commented 4 years ago

I'm wondering if this has to do with our use of 9999x9999 as the "default" resolution. We do this to get our graphics backends to choose the native resolution of a display, but if shadowplay misinterprets that as an actual resolution, I could well see how it would lead to an "out of memory" issue.

That said it's just an educated guess and it's difficult for me to say for sure without owning the same hardware.

VasilisThePikachu commented 4 years ago

I'm wondering if this has to do with our use of 9999x9999 as the "default" resolution. We do this to get our graphics backends to choose the native resolution of a display, but if shadowplay misinterprets that as an actual resolution, I could well see how it would lead to an "out of memory" issue.

That said it's just an educated guess and it's difficult for me to say for sure without owning the same hardware.

Could be the problem, Currently hitting my head trying to make the game reproduce the crash again cause it decided to now work normally even with shadowplay on

VasilisThePikachu commented 4 years ago

Could be the problem, Currently hitting my head trying to make the game reproduce the crash again cause it decided to now work normally even with shadowplay on

Update: it started reproducing again, looks like it only happens in borderless fullscreen as #7483 suggested

a new error also appeared in eventvwr new error.txt (rename file extension to .evtx)

I'm wondering if this has to do with our use of 9999x9999 as the "default" resolution.

Is it possible to somehow force change that to another res? Tried setting SizeFullscreen and WindowedSize in framework.ini to 1920x1080 but that didn't do anything

swoolcock commented 4 years ago

9999x9999 is never used anywhere in such a way that it gets queried from the operating system. It is purely internal and used to select the highest available resolution.

MeguMario commented 4 years ago

i have a laptop with Intel iGPU here, and it crashed instantly, remove the karaoke rulesets did work tho

runtime.log

bdach commented 4 years ago

@MeguMario your issue is entirely unrelated to this one and is indeed caused in part by rulesets. somehow your database got into a bad state and a ruleset ID conflict occurred.

MeguMario commented 4 years ago

@MeguMario your issue is entirely unrelated to this one and is indeed caused in part by rulesets. somehow your database got into a bad state and a ruleset ID conflict occurred.

nice, remove the database did resolved the problem, thanks

CrooLyyCheck commented 3 years ago

the solution for my #11455 was to disable outplayed. It seems osu!lazer doesn't like screen recording.

bdach commented 3 years ago

I mean OBS or similar should work fine, but clearly looks like there's some sort of compatibility issue with shadowplay. Not sure on whose side the fault lies without having hardware to reproduce on (and even then it might be difficult to tell).

CrooLyyCheck commented 3 years ago

Outplayed has similar functions to shadowplay, detects highlights... This may indicate that recording programs using some shadowplay module are affecting the crash

Firmatorenio commented 3 years ago

I can say shadowplay (and nvidia's screen/app recording in general) refuses to record anything on a not-primary screen for me - there's a 'record desktop' mode that only ends up recording the primary screen, and if I try to record only lazer, it crashes the app if it's on a secondary screen. OBS works fine, even using NVENC, yes.

SirWaddles commented 1 year ago

Not sure if this helps, but I've been getting the same issue. Disabling Shadowplay fixes the problem.

What's really weird though is that it also seems to depend on how my monitor is connected. If I'm using HDMI, I have no problem at all, but when using DisplayPort, the game shows the intro screen for a couple seconds but then just goes completely black and displays nothing. It might be worth noting that, at least for me, the issue occurs just before the NVidia overlay would display its "press Shift F10 to open the overlay" widget.

I can't imagine this has anything to do with HDMI/DisplayPort, but could be the non-primary display issue that was mentioned earlier? (Even though in both cases for me, it's still my primary display, it's just picked up as a different device.)

peppy commented 1 year ago

Please wait for the upcoming renderer changes which will switch the game to direct x by default.

peppy commented 1 year ago

Closing as should-be-resolved.

Please feel free to reply in this thread if you can still reproduce an issue.