NoelFB / Celeste

Celeste Bugs & Issue Tracker + some Source Code
MIT License
3.54k stars 419 forks source link

Stuck on loading screen #23

Open liquidev opened 5 years ago

liquidev commented 5 years ago

After updating to 1.3 Celeste suddenly gets stuck at the initial loading screen when you boot up the game. Killing the game from System Monitor also requires killing an additional SDL Audio-related process.

The game didn't work initially, then it worked for a day or two, and it stopped working today again. No clue what could be the issue behind this.

Running the game on Fedora Linux, native port from Steam.

olekolek1000 commented 5 years ago

Same on Manjaro, OpenSUSE and Ubuntu.

flibitijibibo commented 5 years ago

Can't reproduce this on Fedora 30 x86_64. The audio work has changed but not significantly.

If you run ./Celeste in a terminal and wait for it to freeze you'll get full thread dump when hitting Ctrl+\.

liquidev commented 5 years ago

It seems that this only happens in certain situations and on Mesa amdgpu drivers, I'll try that when it happens again because it suddenly started working.

flibitijibibo commented 5 years ago

Turns out FMOD has a little race condition in it! If your machine is fast enough SDL init will complete faster than FMOD init, causing the audio thread to poll mixer samples from FMOD before it has a chance to finish initializing. That corruption probably bled into Mesa, so thankfully it's not them.

Here's the commit on my end to get around it, we'll get this uploaded ASAP:

https://github.com/flibitijibibo/FMOD_SDL/commit/891463181c79fae6c4a154a1665aed9876d45eb0