NeuroGoblin
NeuroGoblin•3mo ago

Unity Crashing ~10 seconds after loading realtime with a certain name.

Hey guys, Having a rather strange issue. Recently all of our developers started reporting crashes about ~10 sec after a scene with Realtime in it loads (it connects on start). The room name is 'Cyboracle_Persistent'. - When changing the room name to anything else, even 'Cyboracle_Persistent2', it works fine. I disabled all other gameobjects other than the realtime room gameobject. - When making a new scene in the same project, importing the cube example and setting the room to 'Cyboracle_Persistent', it crashes. - When changing the room in the above test scene to anything else, it works fine. - When starting a brand new project, importing normcore and the cube player, and setting the room to 'Cyboracle_Persistent', it works fine. (same app key) So the issue seems to be isolated to this particular room string, in this particular project. I'm happy to just use a different string, but I'm nervous that the same thing would eventually happen with that string in production. At various times there have been other devs connecting to that room, but in this instance it should just join the pre-existing room if i'm not mistaken. Given that I disabled basically everything in the original project except the realtime, i'm not sure what the difference between the projects is. Cached stuff? Build settings? We are using WebGL on Unity 2022.2.19f1. Let me know if you need any more info! Thanks in advance 🙂
17 Replies
kapa.ai
kapa.ai•3mo ago
Hi @NeuroGoblin. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave: ---------------------- Hmm, I don't know enough to give you a confident answer yet. However, I can provide some general troubleshooting steps based on the information provided in the knowledge sources. 1. Check for Compilation Errors: Make sure your project has no compilation errors. If your project has any errors, any changes you make to the model will not be visible to the model editor. source (https://normcore.io/documentation/room/common-questions#i-made-changes-to-my-properties-but-when-i-recompile-the-freshly-compiled-model-isnt-updated-why) 2. Check RealtimeComponent's Model: The model is set by Realtime when you connect to the room. This will only fail if Realtime doesn't receive a reference to the RealtimeComponent. There are several reasons why this could happen, such as using Unity’s Instantiate API instead of Normcore’s Realtime.Instantiate(), the prefab in Unity is corrupt, a RealtimeView parent/child relationship is not saved correctly by Unity, etc. source (https://normcore.io/documentation/realtime/common-questions#why-would-a-realtimecomponents-model-remain-null) 3. Check Room Server Shutdown: When the last player leaves a room, the room server will remain running for about 30 seconds before it's shut down. When this happens, any objects that are not flagged to destroy will be written to persistent storage. The next time someone joins this room, they will be restored instantly. source (https://normcore.io/documentation/realtime/common-questions#what-happens-to-my-objects-when-a-room-server-shuts-down) 4. Check Realtime Settings: Make sure the settings for the Realtime component are correct. This includes the room to join on start, whether Realtime will try to automatically connect on Start(), the app settings object reference used when Realtime connects, etc. source (https://normcore.io/documentation/reference/classes/Normal.Realtime.Realtime) If none of these steps help, I recommend reaching out to the NormalVR support team for further assistance. ---------------------- Note: you can ask me a follow up question by @ mentioning me again :speech_balloon: ----------------------
kapa.ai
kapa.ai•3mo ago
<@196555254496493568> kapa.ai is still learning and improving, please let us know how it did by reacting below
Mechabit
Mechabit•3mo ago
probably some persistent data in that room there's currently no way to clear all the persistent data in a room so you either change the room name or change the app key
NeuroGoblin
NeuroGoblin•3mo ago
Thanks for the response. I'm still unsure why connecting to that room in a new project with the same app key works fine though? And is it possible this would eventually happen again with a new string?
Mechabit
Mechabit•3mo ago
maybe model property mismatch the new project would ignore models it doesn't have so long as you are carfeul with more model updates if you wanted to make a non-breaking model change you can just use a different property ID
NeuroGoblin
NeuroGoblin•3mo ago
Do you mean like this?
No description
NeuroGoblin
NeuroGoblin•3mo ago
We have a few instances of this pattern model.X = Y
Mechabit
Mechabit•3mo ago
in the model definition there is a property ID if you wanted to change property 1 from a string to an int you might run into trouble so instead you make property 2 into an int and ignore property 1
NeuroGoblin
NeuroGoblin•3mo ago
yep - i have redesigned everything to just have a single primitive type and single property to avoid any confusion
No description
No description
NeuroGoblin
NeuroGoblin•3mo ago
the property names are unique within that model as I understand there have been some times where I changed the types but I followed the docs guide on how to do this and everything compiled correctly and worked functionally
Mechabit
Mechabit•3mo ago
it might compile correctly but the server might contain old data I'm saying don't make model changes reusing old IDs just use a different ID or update the app key every time you release a model changing update
NeuroGoblin
NeuroGoblin•3mo ago
ok makes sense. If I make a new room string (with no data on the server yet) and the models are all using just 1 property i should be fine right? (provided the models don't change) as the new room will be provided with clean data or is that corrupted data stored on the app key level?
Mechabit
Mechabit•3mo ago
the data isn't corrupted it's just the local version mismatch, but changing the room name is the easy fix
NeuroGoblin
NeuroGoblin•3mo ago
i see yeah so then the new room should just store what's in my local from the get go, and as long as that doesn't change, we should be good
Mechabit
Mechabit•3mo ago
yeah
NeuroGoblin
NeuroGoblin•3mo ago
cool, thanks for your help!
Mechabit
Mechabit•3mo ago
hopefully normcore gives us the ability to delete rooms soon