SharpDX Sound Error Exceptions - from vanilla sounds
Need More Information
The recent batch of SharpDX errors since the update has been troublesome. In the modding community some sources have been identified, such as 0kb start/stop sounds in loops, incorrect bitrates, or converting troublesome files to xmw.
Earlier today it seems that a vanilla sound file induced the error, specifically ArcWepShipGatlingShot. I also see a log line from SE showing the last null was written by OnSoundVoiceStopped. The last line was logging I added to WeaponCore to help narrow troublesome sound files.
Anecdotally the error below occurred during a grid collision.
2024-06-29 16:45:10.526 - Thread: 1 -> Exception occurred: SharpDX.SharpDXException: HRESULT: [0x88960001], Module: [SharpDX.XAudio2], ApiCode: [XAUDIO2_E_INVALID_CALL/InvalidCall], Message: Unknown at SharpDX.Result.CheckError() at SharpDX.XAudio2.SourceVoice.SubmitSourceBuffer(AudioBuffer bufferRef, Nullable`1 bufferWMARef) at SharpDX.XAudio2.SourceVoice.SubmitSourceBuffer(AudioBuffer bufferRef, UInt32[] decodedXMWAPacketInfo) at VRage.Audio.MySourceVoice.Start(Boolean skipIntro, Boolean skipToEnd) at VRage.Audio.MyXAudio2.PlaySound(MyCueId cueId, IMy3DSoundEmitter source, MySoundDimensions type, Boolean skipIntro, Boolean skipToEnd, Boolean isMusic) at VRage.Audio.MyXAudio2.VRage.Audio.IMyAudio.PlaySound(MyCueId cueId, IMy3DSoundEmitter source, MySoundDimensions type, Boolean skipIntro, Boolean skipToEnd) at Sandbox.Game.Entities.MyEntity3DSoundEmitter.PlaySoundInternal(Boolean skipIntro, Boolean skipToEnd, Boolean force2D, Boolean alwaysHearOnRealistic, Nullable`1 force3D) 2024-06-29 16:45:10.526 - Thread: 1 -> Last null written by: OnSoundVoiceStopped 2024-06-29 16:45:10.526 - Thread: 1 -> Error: Sound error with ammo: NATO_25x184mm from soundID ArcWepShipGatlingShot cuename ArcWepShipGatlingShot
Hello, engineer!
Thank you for writing to us, and we sincerely apologize for the issue you have been experiencing.
Could you please try the following steps/workarounds to resolve this issue:
Verify your game files in Steam:
Update Sound Drivers:
Update your OS to its latest version.
If the issue still persists after trying these steps, please send us the complete log file from the time the issue occurred.
Kind Regards,
Keen Software House: QA Department
Hello, engineer!
Thank you for writing to us, and we sincerely apologize for the issue you have been experiencing.
Could you please try the following steps/workarounds to resolve this issue:
Verify your game files in Steam:
Update Sound Drivers:
Update your OS to its latest version.
If the issue still persists after trying these steps, please send us the complete log file from the time the issue occurred.
Kind Regards,
Keen Software House: QA Department
I appreciate the utility of a boilerplate response, but note that this issue has been observed across many users and is highly intermittent. Your own internal logging caught the source of the error (2024-06-29 16:45:10.526 - Thread: 1 -> Last null written by: OnSoundVoiceStopped), and no driver nor OS update will resolve that.
Ash worked with Filip on this in March and we discovered one cause with mod-sourced sounds, but this is the first occurrence I've observed with original Keen sounds.
I appreciate the utility of a boilerplate response, but note that this issue has been observed across many users and is highly intermittent. Your own internal logging caught the source of the error (2024-06-29 16:45:10.526 - Thread: 1 -> Last null written by: OnSoundVoiceStopped), and no driver nor OS update will resolve that.
Ash worked with Filip on this in March and we discovered one cause with mod-sourced sounds, but this is the first occurrence I've observed with original Keen sounds.
One cause seems to be .wav files encoded to something other than 44100hz. Previously, the game could handle this (maybe with some oddities like static), but the signal update's change to some part of the audio system causes it to just crash instead. It's seemingly "random" because 10 years of mods and vanilla audio files that weren't properly set to that format are set like a landmine for clients to trip on.
The following world reproduces it 100% of the time:
https://steamcommunity.com/sharedfiles/filedetails/?id=3306037929
One cause seems to be .wav files encoded to something other than 44100hz. Previously, the game could handle this (maybe with some oddities like static), but the signal update's change to some part of the audio system causes it to just crash instead. It's seemingly "random" because 10 years of mods and vanilla audio files that weren't properly set to that format are set like a landmine for clients to trip on.
The following world reproduces it 100% of the time:
https://steamcommunity.com/sharedfiles/filedetails/?id=3306037929
I am now running into the same error. This is on a modded server but the point of failure seems to move from one to the other. Plays fine for a while, then client crashes (dedicated server I am hosting is doing just fine)
Already made sure I am fully up to date on my OS, GPU driver, DX redists and VCRedists. Multiple users have experienced this issue.
I am now running into the same error. This is on a modded server but the point of failure seems to move from one to the other. Plays fine for a while, then client crashes (dedicated server I am hosting is doing just fine)
Already made sure I am fully up to date on my OS, GPU driver, DX redists and VCRedists. Multiple users have experienced this issue.
I also reproduced the issue with the word provided by Validpoint above and included the log below.
I also reproduced the issue with the word provided by Validpoint above and included the log below.
Hello, Engineer!
Thank you for providing the logs. Unfortunately it seems like both logs in the above posts are pointing towards a mod. Please attempt to disable the WeaponCore mod on your side and let us know if the issue persists. If it doesn't, the issue will need to be fixed by the mod creator.
Kind Regards,
Keen Software House: QA Department
Hello, Engineer!
Thank you for providing the logs. Unfortunately it seems like both logs in the above posts are pointing towards a mod. Please attempt to disable the WeaponCore mod on your side and let us know if the issue persists. If it doesn't, the issue will need to be fixed by the mod creator.
Kind Regards,
Keen Software House: QA Department
The mod in question is using Keen methods to call sounds. The SharpDX Exception happens external to WeaponCore, on the Keen side. The only reason WeaponCore appears in the stack later is that I'm letting it throw the exception passed back from SharpDX.
The mod in question is using Keen methods to call sounds. The SharpDX Exception happens external to WeaponCore, on the Keen side. The only reason WeaponCore appears in the stack later is that I'm letting it throw the exception passed back from SharpDX.
Replies have been locked on this page!