What is this ?
RealtimeNativeException: Attempting to use native object (Client) after it has already been deleted.🥴
3 Replies
Hi @Trần Tiến Đạt. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:
----------------------
This error message indicates that your code is trying to access a Normcore Client object after it has been deleted in the native code layer. This is a common issue that can occur when using Normcore in Unity.
The
RealtimeNativeException
is thrown when there's an attempt to use a native pointer that's no longer valid. In this case, it's specifically related to the Client object in Normcore's native plugin layer.
This error typically happens in scenarios such as:
1. Trying to use a Realtime instance after it has been destroyed
2. Accessing Normcore functionality during application shutdown
3. Improper cleanup of Normcore resources
To fix this issue, you should:
1. Make sure you're not trying to access Normcore functionality after destroying the Realtime component
2. Check that you're properly handling connection and disconnection events
3. Ensure you're not trying to use Normcore during OnDestroy or OnApplicationQuit
If you've recently updated Unity, this could also be related to compatibility issues. In that case, you might need to update your Normcore package to the latest version that's compatible with your Unity version.
For more information about Normcore's native exceptions, you can refer to the RealtimeNativeException documentation.
----------------------
Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:
----------------------<@1152048129353461810> Kapa.ai is still learning and improving, please let me know how I did by reacting below.
hmm, I’ve never seen this in practice. what Normcore version are you using?