ChrisNZL / Tallowmere2

Changelog, issue tracker, and development knowledge for Tallowmere 2.
https://tallowmere2.com
13 stars 0 forks source link

Online Co-op / Null ref: T2.DungeonRoom.Update #986

Closed ChrisNZL closed 2 years ago

ChrisNZL commented 2 years ago

With v0.3 and v0.3.0a, despite having added measures to try and counter uncommon issues of data-loading sometimes failing when loading rooms, there are still errors happening sometimes.

Example feedback ID: 20211226-F24JG

Typical client logs show:

7:54:15, Frame 699284, LOG »  NetworkMessage_DungeonRoomTransitionHelper:
Desire_EnterCorridor: Entering corridor...

7:54:15, Frame 699284, LOG »  DungeonRoomTransitioner.BeginTransitioningToRoom: Departing room 44, going to room 45...
7:54:16, Frame 699333, LOG »  NetworkMessage_SetDoorState: Closing door. doorStructNetID Master6124. doorState Closed. RoomNumber 0
7:54:16, Frame 699333, LOG »  NetworkMessage_SetDoorState: Closing door. doorStructNetID Master532. doorState Closed. RoomNumber 35
7:54:16, Frame 699333, LOG »  NetworkMessage_SetDoorState: Closing door. doorStructNetID Master6124. doorState Closed. RoomNumber 0

7:54:16, Frame 699333, LOG »  NetworkMessage_DungeonRoomTransitionHelper: Received message.
Desire: 4 » BeginLoadingRoom

7:54:16, Frame 699338, LOG »  WARNING: DungeonRoomStruct.GetAppropriatePlayerSpawnPointNetID: spawnPointStruct is null for room Master2420
7:54:16, Frame 699338, WARNING »  WARNING: DungeonRoomTransitioner: Room data is invalid. Resyncing...
7:54:16, Frame 699341, LOG »  NetworkMessage_SyncGameStruct: Received data to resync. Syncing...
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID HeartPiece_Small ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID AttackPowerSword_Rank2 ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID AttackPowerSword_Rank1 ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID HeartPiece_Small ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID HeartPiece_Large ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID AttackPowerSword_Rank3 ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID HeartPiece_Small ... Timestamp 1640433256
[[[ ^ REPEATING MESSAGE... ]]]

7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID AttackPowerSword_Rank2 ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID AttackPowerSword_Rank1 ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID HeartPiece_Small ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID HeartPiece_Large ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID AttackPowerSword_Rank3 ... Timestamp 1640433256
7:54:16, Frame 699341, LOG »  GameStruct.AcceptOffering: Accepting offeringID HeartPiece_Small ... Timestamp 1640433256

7:54:16, Frame 699352, LOG »  NetworkMessage_DungeonRoomTransitionHelper: Received message.
Desire: 4 » BeginLoadingRoom

7:54:16, Frame 699366, EXCEPTION »  NullReferenceException: Object reference not set to an instance of an object
>>>>> CRITICAL ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

T2.DungeonRoom.Update ()

GameStates: RompingThroughDungeon, ResyncOnlineGameStruct, TransitioningToDungeonRoom
OnlineGameInfo: Device is online.
Server: Lightning-Beijing-01
GameID: NC82X
GameSetupMode: NetworkCoop
Players: 2
DungeonRoomTransitionerState: WaitingForRoomToLoad
Room: 45 / 45
RoomModifiers: None
YouHaveDiedState: Null
SystemPlayer InputDevice: 键盘
HumanPlayer 1 InputDevice: 键盘

Proposed tasks:

ChrisNZL commented 2 years ago

I hope fixing Online Co-op / Keys: Extra key spawned client-side, but not interactable #681 has resolved this issue.

Will re-open if it still occurs.

ChrisNZL commented 2 years ago

Re-opening. Still some null ref reports coming in in v0.3.1a. Mainly from online co-op, but couch co-op too.

T2.DungeonRoom.Update -- going to break this method down into smaller parts for better logging.

Suspect this is an issue with Gibs or DungeonRoomObjects, but better logging will help tell.

Have had a couple auto report null refs for the newly-added Decal.ParentOntoDungeonRoomObject method (which should be fixed now), but makes me think a DungeonRoomObject is not being saved or spawned correctly during room load.

ChrisNZL commented 2 years ago

0.3.2: Adding a lot of debug logging and assertion checking within:

Hope this all helps figure out where the root of these errors are.