Dubs Bad Hygiene causing AudioSource.cpp/SoundChannel.cpp errors

Started by Inggo, January 15, 2020, 09:21:59 AM

Previous topic - Next topic

Inggo

This is related to this thread: https://ludeon.com/forums/index.php?topic=49923.msg469095

Basically, if you have too many items that create ambient sounds, the following error occurs:

C:/buildslave/unity/build/Runtime/Audio/AudioSource.cpp(944) : Error executing channel->set3DPanLevel(spatialBlendLevel) (The specified channel has been reused to play another sound. )

(Filename:  Line: 16)

C:/buildslave/unity/build/Runtime/Audio/sound/SoundChannel.cpp(240) : Error executing m_FMODChannel->set3DSpread(spread) (The specified channel has been reused to play another sound. )

(Filename:  Line: 16)

C:/buildslave/unity/build/Runtime/Audio/AudioSource.cpp(945) : Error executing channel->set3DSpread(spread * 360.0f) (The specified channel has been reused to play another sound. )

(Filename:  Line: 16)

C:/buildslave/unity/build/Runtime/Audio/sound/SoundChannel.cpp(286) : Error executing m_FMODChannel->setPan(pan) (The specified channel has been reused to play another sound. )

(Filename:  Line: 16)

C:/buildslave/unity/build/Runtime/Audio/AudioSource.cpp(946) : Error executing channel->setPan(stereoPan) (The specified channel has been reused to play another sound. )

(Filename:  Line: 16)

C:/buildslave/unity/build/Runtime/Audio/sound/SoundChannel.cpp(313) : Error executing m_FMODChannel->getReverbProperties(reverbproperties) (The specified channel has been reused to play another sound. )

(Filename:  Line: 16)

C:/buildslave/unity/build/Runtime/Audio/AudioSource.cpp(960) : Error executing channel->getReverbProperties(&props) (The specified channel has been reused to play another sound. )

(Filename:  Line: 16)


This continuously floods output_log.txt and on exit, it will hang the game because it keeps writing endlessly the following in a loop:


C:/buildslave/unity/build/Runtime/Audio/sound/SoundChannel.cpp(447) : Error executing m_FMODChannel->stop() (The specified channel has been reused to play another sound. )

(Filename:  Line: 16)

C:/buildslave/unity/build/Runtime/Audio/sound/SoundChannel.cpp(447) : Error executing m_FMODChannel->stop() (The specified channel has been reused to play another sound. )

(Filename:  Line: 16)


This is the worst part of the problem because it produces an output_log.txt that can be as large as hundreds of gigabytes depending on how long you've been playing or how long you let it hang while exiting the game.

When I renamed HygieneSounds.xml to HygieneSounds.xml.bak, the errors no longer happen. Of course, the ambient sounds also do not play, but they weren't playing anyway in the first place because of the problem itself.

It may be a specific item only, which is what I'm trying to find out at the moment. The culprit I'm looking at is the sewage_Ambience, because I have quite a few of them in my biggest colony, so maybe just removing these specific SoundDefs will resolve the issue while the other sounds still be working.

fetusthebard

This might be the issue that I was looking at in my request for help as well. We were getting sound issues, and originally I thought it had to do with Hospitality and Slave interactions (because it seemingly fired when visitors happened), but I'll try to use your fix and see if it works.

Edit: After attempting this fix, no, it did not fix my issue in particular. Thank you for bringing it to my attention still, I'll look into whether or not Hygiene is the mod crashing me.

Edit 2: It is most certainly Hygiene. I removed it, have had 0 problems.