voxeltycoon / issues

17 stars 4 forks source link

Game won't close / Log file size is infinite #966

Closed DanielBarreleiro closed 2 years ago

DanielBarreleiro commented 2 years ago

Describe the bug When pressing "Close game"/click the X button on the window border while playing on a savegame, the game will stall and not close, the only option being kill it via task manager. Additionally, when the game stalls, it will throw errors to the log file, (that's expected i guess) but, it will throw thousands of lines of errors in a matter of seconds, only stopping when there is no disk memory left. I did a quick test and in ~10 seconds it generated a 500MB log file. The first time this happened, it generated a 16GB log file under 2 minutes. Log file is "only" 16GB because i ran out of disk space.*

does not happen in base game, only with mods, but I do not know which one

Steps to reproduce Press "Close game" while playing with mods.

Build version 0.87.1.10 steam

Platform Linux - Debian 12

Reproducibility Every time

Logs/saves ~500MB log file: https://mega.nz/file/IO5Ggaja#TAvEcUCL3Sy1QzpMwT-dtza-BbFP15XOKM4YE4airOE

Log file with 16GB: (most of it is thousands of lines repeating the same error, then changing some numbers and repeat) https://mega.nz/file/xGZBRTyZ#AXOg91Yb90-POEN4dNYBeo8E_HxqY35_S3kO7ntIQwE

My text editors couldn't open it so, if you also need it, this tool can open the file: http://www.readfileonline.com/

An example of whats inside:

./Modules/Audio/Public/sound/SoundChannel.cpp(152) : Error executing m_FMODChannel->isPlaying(playing) (The specified channel has been reused to play another sound. )
./Modules/Audio/Public/sound/SoundChannel.cpp(231) : Error executing m_FMODChannel->setChannelGroup(group) (The specified channel has been reused to play another sound. )
./Modules/Audio/Public/sound/SoundChannel.cpp(395) : Error executing m_FMODChannel->stop() (The specified channel has been reused to play another sound. )
andrewpey commented 2 years ago

First, can you try to run the game without any mods enabled? You can do this by using --safe launch option. Let us know if it makes any difference.

Second, please check if you have any of these apps installed: Asus Sonic Studio, Asus Sonic Radar, Hahimic apps, or any other audio related apps. If you do, try to disable/uninstall them and please let us know if it helps.

DanielBarreleiro commented 2 years ago

If i disable all mods, it works fine, but it also works fine if i just play on a different save game with the same mods (but with less playtime). It only happens in this one savegame.

Im sure i dont have any of the apps mentioned installed because I don't even know what they are 😅

Link for the savegame if needed: https://mega.nz/file/UGZm3TYA#2bKqKA2gF-7JFjQw7sdPzrgzKfrbQAaIT6aDd-ahl8Q

andrewpey commented 2 years ago

Thanks for providing the saved game. While we were able to reproduce the error, it occures not in our code but rather inside the Unity engine internals. Which makes it pretty hard to investigate. We'll keep looking into this issue and see if we can get in touch with Unity team on that.

As a temporary workaround, you can disable log writing completely, by specifiing the -nolog launch option.

DanielBarreleiro commented 2 years ago

Thanks for looking into it!

andrewpey commented 2 years ago

After further investigation, we've found that these errors can be triggered by excessive usage of compressed .ogg audio files in mods instead of uncompressed .wav. We've contacted mod authors asking them to replace these files. Mods should be updated at this point, and errors should not occur again.

For modders: following this issue, we've added advice to use uncompressed files where possible to the documentation: https://docs.voxeltycoon.xyz/guides/content-mods/using-audio-files/

Please let us know if the issue will happen again.