SharpDX Sound Error Exceptions - from vanilla sounds

BDCarrillo shared this bug 5 months ago
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

Replies (7)

photo
1

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:

  • Right-click on Space Engineers in Steam Library → Properties → Installed Files → Verify Integrity of Game Files (wait till all the files are verified completely)

Update Sound Drivers:

  • Ensure all audio drivers are up-to-date.

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.

  • You can access your log files by typing %appdata% into your Windows search bar and you will be redirected to the hidden Roaming folder. After that just follow: \Roaming\SpaceEngineers.

Kind Regards,

Keen Software House: QA Department

photo
5

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.

photo
4

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

photo
2

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.


2024-10-23 04:12:40.549 - 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-10-23 04:12:40.549 - Thread:   1 ->  Last null written by: OnSoundVoiceStopped
2024-10-23 04:12:40.549 - Thread:   1 ->  Error: Sound error with ammo: 25mm NATO from  soundID ArcWepShipGatlingShot cuename WepShipGatlingShotFireEmitter.Entity null? False 
 Origin: X:-4764129.64631053 Y:897280.621864357 Z:366634.465999111
2024-10-23 04:12:40.563 - Thread:   1 ->  Exception: SharpDX.SharpDXException: HRESULT: [0x88960001], Module: [SharpDX.XAudio2], ApiCode: [XAUDIO2_E_INVALID_CALL/InvalidCall], Message: Unknown
   at CoreSystems.Support.AvShot.SetupSounds(Double distanceFromCameraSqr)
   at CoreSystems.Projectiles.Projectile.Start()
   at CoreSystems.Projectiles.Projectiles.GenProjectiles()
   at CoreSystems.Projectiles.Projectiles.SpawnAndMove()
   at CoreSystems.Session.Simulate()
   at Sandbox.Game.World.MySession.UpdateComponents()
   at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime)
   at Sandbox.MySandboxGame.Update()
   at Sandbox.Engine.Platform.Game.UpdateInternal()
   at Sandbox.Engine.Platform.Game.RunSingleFrame()
   at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0()
   at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
   at Sandbox.Engine.Platform.Game.RunLoop()
   at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
   at SpaceEngineers.MyProgram.Main(String[] args)
2024-10-23 04:12:40.573 - Thread:   1 ->  Exception occurred: SharpDX.SharpDXException: HRESULT: [0x88960001], Module: [SharpDX.XAudio2], ApiCode: [XAUDIO2_E_INVALID_CALL/InvalidCall], Message: Unknown
   at CoreSystems.Support.AvShot.SetupSounds(Double distanceFromCameraSqr)
   at CoreSystems.Projectiles.Projectile.Start()
   at CoreSystems.Projectiles.Projectiles.GenProjectiles()
   at CoreSystems.Projectiles.Projectiles.SpawnAndMove()
   at CoreSystems.Session.Simulate()
   at Sandbox.Game.World.MySession.UpdateComponents()
   at Sandbox.Game.World.MySession.Update(MyTimeSpan updateTime)
   at Sandbox.MySandboxGame.Update()
   at Sandbox.Engine.Platform.Game.UpdateInternal()
   at Sandbox.Engine.Platform.Game.RunSingleFrame()
   at Sandbox.Engine.Platform.FixedLoop.<>c__DisplayClass11_0.<Run>b__0()
   at Sandbox.Engine.Platform.GenericLoop.Run(VoidAction tickCallback)
   at Sandbox.Engine.Platform.Game.RunLoop()
   at Sandbox.MySandboxGame.Run(Boolean customRenderLoop, Action disposeSplashScreen)
   at SpaceEngineers.MyProgram.Main(String[] args)
   at avaness.SpaceEngineersLauncher.Program.StartSpaceEngineers(String[] args)
   at avaness.SpaceEngineersLauncher.Program.Main(String[] args)

photo
1

I also reproduced the issue with the word provided by Validpoint above and included the log below.

photo
1

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

photo
1

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.

Leave a Comment
 
Attach a file