Cxr function crashing call with a 'null pointer dereferenced - cloudXR ver 3.0 sdk

Working in Unity I’ve managed to get the right native android EGL pointers with the library I wrote, as far as I can tell, but now it’s crashing on the cxr function call with a ‘null pointer dereferenced’ error message.
We don’t have source for the underlying function call itself, so I’m not sure what exactly is causing it to spin out. Open to ideas re: debugging- Stack trace attached here
stack_trace.txt (3.6 KB)

I don’t know much about Unity CS->native bridging, but if you send me a snippet of your descriptor setup and call into native, I can take a quick look and see if anything jumps out.

cxrCreateReceiver itself is fairly lightweight. For the most part, it does a ton of sanity checking of the receiverDesc + deviceDesc (and callbacks), then allocates an internal object and returns it as a void*. I don’t see many places we’d be dereferencing a null pointer, but if we were getting a ** instead of a * for instance that would obviously blow up. :)

The other possibility might be the shareContext. But I don’t think we use it until later calls.

Hi Here is a stripped back version of the wrapper code that just tries to call the function giving us problemsHere is a stripped back version of the wrapper code that just tries to call the function giving us problems
CloudXRWrapperThin.cs (14.8 KB)

a few quick thoughts.

  • try turning off audio (set both to zero)
  • try setting debugFlags to zero. maxint might do something bad…

otherwise best guess is one of the pointers isn’t getting marshalled properly (like one is a ** and the other is a *…).

Alternative approach is to develop your own shim around cloudxr, and do all the interesting bits in your own C++ code/plugin. So the surface exposed in C# becomes minimalist.

Thanks will try it out and get back to you