Hello users of SimEthereal
Happy new year, hope you all got through it safely.
I’m trying to track down a bug that I hope you can help me with. As I’m flying through my game world adding forces to my avatar body, suddenly my avatar ship is removed from view. I’m thinking, what the… It seemingly happens at random, I can’t seem to find a pattern when re-trying, but it does happen ever game session at some point - trying to track this down, I work my way backwards and find that the reason it disappears from view is that the BodyPosition is null - This is weird, because I’m moving about, adding forces to the body etc.
I switch on DEBUG level logging for SimEthereal and I get this out in the console just before my ModelViewState removes the avatar:
10:08:46,362 DEBUG [com.simsilica.ethereal.NetworkStateListener] Object no longer in active zones, marking removed:3
10:08:46,312 DEBUG [com.simsilica.ethereal.SharedObject] applyNetworkState(37547218300, com.simsilica.ethereal.net.ObjectState[id=10, positionBits=244402b555017c])
10:08:46,312 DEBUG [com.simsilica.ethereal.net.StateReceiver] ** frame begin:37563884900
10:08:46,312 DEBUG [com.simsilica.ethereal.SharedObject] applyNetworkState(37563884900, com.simsilica.ethereal.net.ObjectState[id=10, positionBits=2437b2b555025b])
10:08:46,362 DEBUG [com.simsilica.ethereal.NetworkStateListener] Object no longer in active zones, marking removed:3
10:08:46,362 DEBUG [com.simsilica.ethereal.net.RemoteTimeSource] ======== Time delta:-43,808,844,000,100 nanos (-43,808,844 ms) drift:-43,808,844,080,715 nanos (-43,808,844.08 ms) windowSize:100
10:08:46,362 DEBUG [com.simsilica.ethereal.net.RemoteTimeSource] === oldDrift:-43808844081522 drift change:807 nanos (0 ms)
10:08:46,362 DEBUG [com.simsilica.ethereal.net.StateReceiver] Update state:ObjectStateMessage[id=652, time=37616485800, size=116]
10:08:46,362 DEBUG [com.simsilica.ethereal.net.StateReceiver] State:SentState[messageId=652, created=43846460593100, acked=[[IntRange[651:651]]], frames=[FrameState[time=37580551600, legacySequence=37580551424, columnId=1, states=[com.simsilica.ethereal.net.ObjectState[id=10, positionBits=242b32b555033c]]], FrameState[time=37597218200, legacySequence=37597218048, columnId=2097151, states=[com.simsilica.ethereal.net.ObjectState[id=10, REMOVED, positionBits=242b32b555033c]]], FrameState[time=37613885000, legacySequence=37613884928, columnId=2097151, states=[com.simsilica.ethereal.net.ObjectState[id=10, REMOVED, positionBits=242b32b555033c]]]]]
10:08:46,362 DEBUG [com.simsilica.ethereal.net.StateReceiver] Updating baseline for message:651
10:08:46,362 DEBUG [com.simsilica.ethereal.net.StateReceiver] ** frame begin:37580551600
10:08:46,362 DEBUG [com.simsilica.ethereal.SharedObject] applyNetworkState(37580551600, com.simsilica.ethereal.net.ObjectState[id=10, positionBits=242b32b555033c])
10:08:46,362 DEBUG [com.simsilica.ethereal.net.StateReceiver] ** frame begin:37597218200
10:08:46,362 DEBUG [com.simsilica.ethereal.SharedObject] applyNetworkState(37597218200, com.simsilica.ethereal.net.ObjectState[id=10, REMOVED, positionBits=242b32b555033c])
10:08:46,362 DEBUG [infinity.client.SharedObjectUpdater] ****** Object removed[t=37597218200]:3 netId:10
10:08:46,363 DEBUG [infinity.client.SharedObjectUpdater] Setting entity to invisible for:3
10:08:46,363 DEBUG [com.simsilica.ethereal.net.StateReceiver] ** frame begin:37613885000
10:08:46,363 DEBUG [com.simsilica.ethereal.SharedObject] applyNetworkState(37613885000, com.simsilica.ethereal.net.ObjectState[id=10, REMOVED, positionBits=242b32b555033c])
Dec 31, 2020 10:08:46 AM infinity.systems.ContactSystem newContact
INFO: Collided: RigidBody{id=EntityId[3], position=Vec3d[17.105671480493076, 0.5, 204.04641399952402], orientation=Quatd[0.0, -0.9664444674277064, 0.0, -0.25687563406905156], linearVelocity=Vec3d[10.02710515014478, 0.0, -9.3764282165319], rotationalVelocity=Vec3d[0.0, 0.0, 0.0], rawTemperature=1.0, temperature=1.0, shape=MBlockShape{part=CellArrayPart{name=cellArray, type=Sphere, center=Vec3d[0.0, 0.0, 0.0], radius=1.0, bodyMass=BodyMass{inverseMass=1.0, inverseMassTensor=Matrix3d[{2.5, 0.0, 0.0}, {0.0, 2.5, 0.0}, {0.0, 0.0, 2.5}], cog=Vec3d[0.0, 0.0, 0.0], radius=1.0}}}} with null
10:08:46,414 DEBUG [com.simsilica.ethereal.NetworkStateListener] State entry is removed for:3
10:08:46,414 DEBUG [com.simsilica.ethereal.net.RemoteTimeSource] ======== Time delta:-43,808,844,041,600 nanos (-43,808,844.04 ms) drift:-43,808,844,080,327 nanos (-43,808,844.08 ms) windowSize:100
10:08:46,414 DEBUG [com.simsilica.ethereal.net.RemoteTimeSource] === oldDrift:-43808844080715 drift change:388 nanos (0 ms)
10:08:46,414 DEBUG [com.simsilica.ethereal.net.StateReceiver] Update state:ObjectStateMessage[id=653, time=37668025600, size=36]
10:08:46,414 DEBUG [com.simsilica.ethereal.net.StateReceiver] State:SentState[messageId=653, created=43846512190100, acked=[[IntRange[652:652]]], frames=[FrameState[time=37630551900, legacySequence=37630551808, columnId=2097151, states=[com.simsilica.ethereal.net.ObjectState[id=10]]]]]
10:08:46,414 DEBUG [com.simsilica.ethereal.net.StateReceiver] Updating baseline for message:652
10:08:46,414 DEBUG [com.simsilica.ethereal.net.StateReceiver] ** frame begin:37630551900
10:08:46,414 DEBUG [com.simsilica.ethereal.SharedObject] applyNetworkState(37630551900, com.simsilica.ethereal.net.ObjectState[id=10])
10:08:46,426 INFO [infinity.server.BodyVisibility] done collectChanges() []
10:08:46,428 INFO [infinity.client.view.ModelViewState] remove mob for:EntityId[3], e:Entity[EntityId[3], values=[null, ShapeInfo[shape=0, scale=1.0]]]
10:08:46,428 WARN [infinity.client.view.ModelViewState] Releasing avatar!
10:08:46,428 INFO [infinity.client.view.ModelViewState] Updating relative position for model from (20.0, 0.5, 20.0)
10:08:46,428 INFO [infinity.client.view.ModelViewState] – to (20.0, 0.5, -172.0)
For some reason, the zone of my entity is being marked inactive. Now, from here I’m not sure where to go. If you have any idea where I should look I’d be grateful. I can’t remember setting zones decidedly inactive/active in my code - that I leave for SimEthereal (I think)
I’ll try to work out how SimEthereal keeps track of active zones
This is where the log message comes from:
Cheers