Vivox 16.0.0-pre.1 Client.Uninitialize isn't available

Good day

In Vivox 16.0.0-pre.1 we cannot manually call Client.Uninitialize from Vivox SDK api for Unity.
Seems like its a bug because documentation for 16.0 says that we definitely can

https://docs.unity3d.com/Packages/com.unity.services.vivox@16.0/manual/index.html#uninitialize

I think the Client API is deprecated and no longer exposed, so I think the documentation is outdated.

There seems to be a lot of holes around the Vivox initialization states and exceptions not being thrown when they should. For example, I just found that if the project has not been properly linked and VivoxService.Instance?.InitializeAsync() is called, an error is logged out but no exception is thrown:

Is a project linked at "Edit > Project Settings > Services"? Head to the "Services > Vivox" window to populate your Vivox credentials once a project is linked.```

Unfortunately, there also doesn't seem to be a property I can check to ensure that the Vivox client has been initialized. As such, I'm unable to explicitly and carefully manage my Vivox client states within the application.

Thanks for bringing this to our attention. This is indeed a documentation issue with that page being visible in the v16 docs and it’s expected that Client.Uninitialize isn’t available. We’ve started tracking this internally to get it fixed.

NickFromVivox thanks you for a reply about this issue.
But how to uninitailzie Vivox Client right now at version 16+? Previously Client.Uninitialize was a 100% solution for the correct uninitialization at any moment of time.

What scenario are you encountering where you want to uninitialize? It was deprecated because it’s quite rare to need to do so and was a known source of application crashes.

NickFromVivox good day!
In some cases when application has ANR or something like this using Client.Uninitialize is a 100% solution to terminate Vivox without a crash.

Some examples in a google dev console look like this:

backtrace:
  #00  pc 0x00000000002f760c  /data/app/~~****==/com****-****==/lib/arm64/libvivox-sdk.so
  #01  pc 0x00000000002d4204  /data/app/~~****==/com****-****==/lib/arm64/libvivox-sdk.so (VivoxStro::StroSessionState::CreateMucPresenceInternal(_xmpp_stanza_t*, bool)+60)
  #02  pc 0x00000000002d5300  /data/app/~~****==/com****-****==/lib/arm64/libvivox-sdk.so (VivoxStro::StroSessionState::Connect(bool, bool, VivoxSystem::String const&, VivoxSystem::String const&, VivoxClient::SessionCredentials const&, Set<VivoxCore::SipUri, 8u> const&, Set<Pair<VivoxCore::SipUri, vx_mute_scope>, 8u> const&)+612)
  #03  pc 0x00000000002aa7f4  /data/app/~~****==/com****-*****==/lib/arm64/libvivox-sdk.so

or

backtrace:
  #00  pc 0x000000000008a074  /apex/com.android.runtime/lib64/bionic/libc.so (abort+180)
  #01  pc 0x00000000000b32bc  /apex/com.android.runtime/lib64/bionic/libc.so (__check_buffer_access(char const*, char const*, unsigned long, unsigned long))
  #02  pc 0x00000000000b31d8  /apex/com.android.runtime/lib64/bionic/libc.so (__FD_SET_chk+120)
  #03  pc 0x00000000002f1ab8  /data/app/~~******==/com****-******==/lib/arm64/libvivox-sdk.so

All this issue were because of an incorrect Vivox terminate process. Usual Logout/DIsconnect don’t help so we used Client.Uninitialize and have solved the problem.

1 Like