Facepunch / sbox-sdf

Library providing marching cubes / squares mesh generation
MIT License
14 stars 7 forks source link

"CallbackBatch.Add called outside batch for awake" error when joining an sdf world from a client #27

Closed Nolankicks closed 5 months ago

Nolankicks commented 5 months ago

When joining from another client, the SDF world has to regenerate on the second client and spits errors. Here's the link to the discord convo about it:https://discord.com/channels/833983068468936704/895597253316714497/12383112487103BoxSdf3D(Vector3.Zero, new Vector3(WorldSize, WorldSize, WorldHeight)), Grass); await OnWorldSpawned?.Invoke(this); await Task.Delay(1000); GameNetworkSystem.CreateLobby(); }`

Nolankicks commented 5 months ago

I also get this error as well. Not sure if its related: 11:50:33 Generic [1] Collection was modified; enumeration operation may not execute.

Metapyziks commented 5 months ago

Pushed / published a possible fix.

Nolankicks commented 5 months ago

Yeah still getting this issue. The world is not spawned in when the player joins. Some things seem to be more stable though. image

Metapyziks commented 5 months ago

Investigating now.

Metapyziks commented 5 months ago

I haven't been able to repro this in my own project, I assume you're getting it in sbox-OpenWorld? Testing sdf_staging.scene I just get stuck on this:

image

How long should I wait for it to generate? Maybe it's because I'm missing the materials for your sdfvol assets.

Metapyziks commented 5 months ago

Closing because the original error is fixed, feel free to open another ticket if you're still getting the new error.