anegostudios / VintageStory-Issues

Vintage Story's public issue tracker for reporting bugs, crashes and the like
46 stars 16 forks source link

Sound unpredictably fails to play, OpenAL returns OutOfMemory error #4024

Open nalal opened 2 months ago

nalal commented 2 months ago

Game Version

v1.19.8

Platform

Linux

Modded

Modded

SP/MP

Singleplayer

Description

When loading into my existing world, I noticed a number of sounds simply refusing to play, from UI interaction sounds to water to the rain to opening/closing vessels, etc. After checking the client-main.txt log, I found the following: 14.8.2024 21:16:24 [Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName 14.8.2024 21:16:24 [Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/rainwindow.ogg: InvalidName 14.8.2024 21:16:24 [Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/rainwindow.ogg: InvalidName 14.8.2024 21:16:24 [Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/rainwindow.ogg: InvalidName 14.8.2024 21:16:24 [Warning] OpenAL Error during construction of sound game:sounds/environment/fire.ogg: OutOfMemory 14.8.2024 21:16:24 [Warning] OpenAL Error during start of sound game:sounds/environment/fire.ogg: InvalidName 14.8.2024 21:16:24 [Warning] OpenAL Error during construction of sound game:sounds/environment/fire.ogg: OutOfMemory 14.8.2024 21:16:24 [Warning] OpenAL Error during start of sound game:sounds/environment/fire.ogg: InvalidName 14.8.2024 21:16:24 [Warning] OpenAL Error during construction of sound game:sounds/environment/fire.ogg: OutOfMemory 14.8.2024 21:16:24 [Warning] OpenAL Error during start of sound game:sounds/environment/fire.ogg: InvalidName 14.8.2024 21:16:24 [Warning] OpenAL Error during construction of sound game:sounds/environment/fire.ogg: OutOfMemory 14.8.2024 21:16:24 [Warning] OpenAL Error during start of sound game:sounds/environment/fire.ogg: InvalidName 14.8.2024 21:16:24 [Warning] OpenAL Error during setvolume(val) of sound game:sounds/environment/creek.ogg: OutOfMemory These errors end up being spammed throughout the log once I've loaded into the world. To be clear, the game doesn't crash/stutter, it just refuses to play certain sounds in an unpredictable way. The root cause is no doubt something to do with a mod, or series of mods, causing some sort of memory leak, as I generally haven't encountered this issue in single player. What confuses me however, is the OutOfMemory error, as the game ends up using no more than 4.8GB of RAM at most, and my system has up to 64GB available, with at most 6GB being used by background processes. I haven't seen this bug reported by anyone else as far as I can tell, but I know I've encountered it previously on older versions with a drastically different modlist. Would it be possible that it's some internal limit to the buffer for audio either put in place for failsafe reasons or by the OpenAL library itself? If so, is it possible to modify the limits for said buffer without recompiling either the library or the game?

The main reason I'm reporting it here as opposed to a specific mod's bug report page is mainly due to the fact that tracking this down to one mod would be nearly impossible and given the symptoms of the issue, may not even be inherently a problem with any mod in particular, but instead with hard memory limits within the engine or it's dependencies.

How to reproduce

  1. Install several mods
  2. Start game and generate a new world
  3. Play for a few days IRL until error occurs

Screenshots

No response

Logs

Logs: client-debug.txt client-main.txt server-debug.txt server-main.txt

Drakker commented 2 months ago

I'm having the same problem on arch Linux, but I don't have a heavily modded game. This starts happening after playing on TOPTS for over an hour:

[....] 18.8.2024 18:09:30 [Client Chat] Player exe_sleep left. @ 0 18.8.2024 18:09:31 [Client Debug] Rift weather value: calm 18.8.2024 18:09:31 [Client Audit] Drakker opened inventory harvestableContents-226058628 18.8.2024 18:09:31 [Client Audit] Drakker opened inventory harvestableContents-226058628 18.8.2024 18:09:31 [Client Audit] Drakker opened inventory harvestableContents-226058628 18.8.2024 18:09:31 [Client Audit] Drakker closed inventory harvestableContents-226058628 18.8.2024 18:09:33 [Client Debug] Rift weather value: calm 18.8.2024 18:09:36 [Client Debug] Rift weather value: calm 18.8.2024 18:09:38 [Client Debug] Rift weather value: calm 18.8.2024 18:09:41 [Client Debug] Rift weather value: calm [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa005, "Exceeding 256 source limit (256 + 1)" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" 18.8.2024 18:09:41 [Client Warning] OpenAL Error during construction of sound game:sounds/creature/bell/hurt.ogg: OutOfMemory [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" 18.8.2024 18:09:41 [Client Warning] OpenAL Error during start of sound game:sounds/creature/bell/hurt.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" 18.8.2024 18:09:42 [Client Warning] OpenAL Error during disposestop of sound game:sounds/creature/bell/hurt.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" 18.8.2024 18:09:42 [Client Warning] OpenAL Error during dispose of sound game:sounds/creature/bell/hurt.ogg: InvalidName 18.8.2024 18:09:43 [Client Debug] Rift weather value: calm 18.8.2024 18:09:46 [Client Debug] Rift weather value: calm 18.8.2024 18:09:48 [Client Debug] Rift weather value: calm 18.8.2024 18:09:49 [Client Chat] Lost 1.3 hp by a tainted drifter (Creature) @ -5 18.8.2024 18:09:49 [Client Chat] Lost 1.3 hp by a tainted drifter (Creature) @ -5 18.8.2024 18:09:49 [Client Chat] Lost 1.3 hp by a tainted drifter (Creature) @ -5 18.8.2024 18:09:50 [Client Chat] Lost 1.3 hp by a tainted drifter (Creature) @ -5 [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa005, "Exceeding 256 source limit (256 + 1)" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" 18.8.2024 18:09:50 [Client Warning] OpenAL Error during construction of sound game:sounds/creature/wolf/howl2.ogg: OutOfMemory [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" 18.8.2024 18:09:50 [Client Warning] OpenAL Error during start of sound game:sounds/creature/wolf/howl2.ogg: InvalidName 18.8.2024 18:09:50 [Client Chat] Lost 1.3 hp by a tainted drifter (Creature) @ -5 [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa005, "Exceeding 256 source limit (256 + 1)" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x5694cc058cb0, code 0xa001, "Invalid source ID 0" [....]

Eventually it starts degenerating and there's barely any sounds still playing and I have to restart the game to fix it.

[....] 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during SetPitch of sound game:sounds/block/quern.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setvolume(val) of sound game:sounds/block/quern.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during SetPitch of sound game:sounds/block/quern.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setvolume(val) of sound game:sounds/block/quern.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during stop of sound game:sounds/environment/wind.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/creature/beehive.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName [ALSOFT] (WW) Error generated on context 0x56814e8cf250, code 0xa001, "Invalid source ID 0" 21.8.2024 22:09:53 [Client Warning] OpenAL Error during setposition vec3 of sound game:sounds/environment/waterwaves.ogg: InvalidName [....]

1.19.8 EndeavourOS (arch linux) 32 GB Ram Ryzen 5600X RTX4070

Drakker commented 1 month ago

It seems to happen more when I am in my base near multiple windmills, with helve hammers and querns running. This is probably not surprising as they emit a lot of different sounds.

Entity-y commented 1 month ago

This happens to me on Windows platform as well. Noticed it happens around windmills after playing for a little bit, especially when using the Millwright mod since it speeds up the rotation. Another culprit is flowing water as it's a constant source of sound. Could also be from a large amount of nearby trees having leaves and vines rustling in the wind.

Craluminum2413 commented 1 month ago

I believe it is fixed in 1.20

Fixed: Properly fix sound loading issues (especially with RAM setting Somewhat Optimized)
Craluminum2413 commented 1 month ago

@Drakker Quern sound fixed in 1.20