Weird call stack from a NPE involving Steamworks.NET and FMOD Studios


#1

What I don’t get is this stack trace:

NullReferenceException: Object reference not set to an instance of an object
  at Steamworks.CallResult`1[T].OnRunCallResult (System.IntPtr thisptr, System.IntPtr pvParam, System.Boolean bFailed, System.UInt64 hSteamAPICall_) [0x00009] in C:\devel\mvsc\musashi-vs-cthulhu\Assets\Plugins\Steamworks.NET\CallbackDispatcher.cs:314 
  at (wrapper managed-to-native) FMOD.Studio.System.FMOD_Studio_System_GetBus(intptr,byte[],intptr&)
  at FMOD.Studio.System.getBus (System.String path, FMOD.Studio.Bus& bus) [0x0001b] in C:\devel\mvsc\musashi-vs-cthulhu\Assets\Plugins\FMOD\Wrapper\fmod_studio.cs:393 
  at FMODUnity.RuntimeManager.GetBus (System.String path) [0x0000c] in C:\devel\mvsc\musashi-vs-cthulhu\Assets\Plugins\FMOD\RuntimeManager.cs:962 
  at FMODUnity.RuntimeManager.MuteAllEvents (System.Boolean muted) [0x00006] in C:\devel\mvsc\musashi-vs-cthulhu\Assets\Plugins\FMOD\RuntimeManager.cs:986 
  at FMODUnity.RuntimeManager.Update () [0x001e8] in C:\devel\mvsc\musashi-vs-cthulhu\Assets\Plugins\FMOD\RuntimeManager.cs:366 
 
(Filename: Assets/Plugins/Steamworks.NET/CallbackDispatcher.cs Line: 314)

Why would FMOD_Studio_System_GetBus ever call Steamworks.CallResult1[T].OnRunCallResult?

public RESULT getBus(string path, out Bus bus)
{
	using (StringHelper.ThreadSafeEncoding encoder = StringHelper.GetFreeHelper())
	{
		return FMOD_Studio_System_GetBus(this.handle, encoder.byteFromStringUTF8(path), out bus.handle);
	}
}

[DllImport(STUDIO_VERSION.dll)]
private static extern RESULT FMOD_Studio_System_GetBus(IntPtr studiosystem, byte[] path, out IntPtr bus);

#2

Are you able to share the full output log?
Also what version of FMOD and Unity are you using?


#3

SteamworksNET Version: 11.0.0
SteamworksSDK Version: 1.41
FMOD Studio Version: 1.10.09
Unity Version: 2018.1.6f1

Nothing else of importance in the logs.
It’s the first time it happens, so I’m still going to try to pinpoint it further.