Post/mid-replication subtree addition breaking atomic models

There seems to be a relatively rare bug when parenting models into an atomic model during the replication period

I’ve found this when creating a house loading system where models of the house got loaded in as chucks at a time rather than loading the entire house at once. I would then have code run when these models loaded in (can guarantee that all the submodels should have been loaded in) and found that I was getting rare errors where sometimes the submodels would not load in. These errors went away when I removed splitting up the atomic model and instead sent the entire atomic model to be streamed in/parented together. This retained the “snapshot” properly

I also have a vehicle system where vehicles get built up after the base gets replicated to the client (adds body of the vehicle, wheels, ect). This is throwing similar errors so I think these all fall under the same issue

I don’t have an easy to replicate repo of this issue, it is very hit or miss

I’m not sure if it’s related to the bug posted here but found this when looking into it: What's Next for Streaming - We Need Your Feedback! - #109 by CorvusCoraxx

A private message is associated with this bug report

Is the bug that the new instances don’t appear atomically, or do the added instances never appear at all?

I’ll need to test to know for sure, will get an update out soon to see if yielding for the subinstance works or if it is left forever pending

Let me know if you need any other information that would help debug

Alright so I reverted my house loading back to where it did not parent the entire atomic model at once to simulate the bug

In this specific case I have a lightswitch that has a submodel, and within that submodel I have a part. I wanted to test if the submodel got loaded in, and then test is the part got loaded into the submodel

It was not able to find the submodel after a 3 second WaitForChild() yield which makes me believe that no submodels/subinstances are getting loaded in at all

Are you able to create a simple repro place for us?

I can’t create a consistent repo place but I could create a place that is essentially house loading code that constantly runs

To get these results I have to publish to my live game, wait a few hours, and wait for a random client to encounter it because I’ve never been able to replicate the issue. I’m not sure it will occur in ideal environments

Anything you can share that can reproduce the problem, even if it takes multiple hours, would be helpful for us.

1 Like