ChrisNZL / Tallowmere2

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

Online null ref: T2.CreatureStruct.ApplyValuesToCreature #1001

Open ChrisNZL opened 2 years ago

ChrisNZL commented 2 years ago

Auto report, 0.3.3, feedback ID 20220205-B7N2C

Player joined game, other player interacted with object before local player was loaded, automatic resync started, but player creature object was null.

10:02:15, Frame 1477, LOG »  NETWORK HANDSHAKE: Connected.
Device is online.
Server: Vultr-Seoul-01
GameID: F54W5

10:02:16, Frame 1505, LOG »  NetworkMessage_DungeonRoomTransitionHelper: Received message.
Desire: 4 » BeginLoadingRoom

10:02:17, Frame 1512, WARNING »  WARNING: NetworkMessage_InteractWithDungeonRoomObject: Local player has not fully loaded yet.
GameState_ResyncOnlineGameStruct added to stack just now. Resyncing...

10:02:19, Frame 1519, LOG »  NetworkMessage_SyncGameStruct: Received data to resync. Syncing...

10:02:19, Frame 1523, EXCEPTION »  NullReferenceException: Object reference not set to an instance of an object
>>>>> CRITICAL ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

T2.CreatureStruct.ApplyValuesToCreature (T2.Creature creature)
T2.DungeonRoom.Update ()

GameStates: ShowingTitleScreen, TransitioningToDungeonRoom, ResyncOnlineGameStruct
OnlineGameInfo: Device is online.
Server: Vultr-Seoul-01
GameID: F54W5
GameSetupMode: NetworkCoop
Players: 2
DungeonRoomTransitioner.state: WaitingForRoomToLoad
DungeonRoom.state: PlacingPlayerCreatures
Room: 0 / 0
RoomModifiers: None
YouHaveDiedState: Null
SystemPlayer InputDevice: 键盘
HumanPlayer 1 InputDevice: 键盘
ChrisNZL commented 2 years ago

For 0.3.4, added a fallback null check when placing creatures and if resync game state is active, to do a hard disconnect back to title screen.

ChrisNZL commented 2 years ago

Still occasionally happening in 0.3.5.

Need to handle client-loading better if room has not fully loaded. Perhaps a soft disconnect and reconnect altogether.

Feedback ID: 20220428-6PRH9

10:01:00, Frame 19874, LOG »  NETWORK HANDSHAKE: Connected.
Device is online.
Server: Lightning-Beijing-01
GameID: 925PR

[[[ ^ REPEATING MESSAGE... ]]]

10:01:02, Frame 19941, WARNING »  WARNING: NetworkMessage_InteractWithDungeonRoomObject: Local player has not fully loaded yet.
GameState_ResyncOnlineGameStruct added to stack just now. Resyncing...

10:01:02, Frame 19943, LOG »  NetworkMessage_SyncGameStruct: Received data to resync. Syncing...
10:01:02, Frame 19945, WARNING »  WARNING: CreatureStruct.ApplyValuesToCreature: creature is null. Forcing disconnect.
[[[ ^ REPEATING MESSAGE... ]]]

10:01:02, Frame 19945, ERROR »  ERROR: CreatureStruct.ApplyValuesToCreature: creature is null
>>>>> CRITICAL ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

GameStates: ShowingTitleScreen, TransitioningToDungeonRoom, ResyncOnlineGameStruct, ViewingAlertBox
AlertBox.currentAlert:
- alert.id: Generic
- alert.title: 数据同步错误
- alert.description: 缺少数据

请尝试重新连接。
OnlineGameInfo: Device is offline.
Previous server: Lightning-Beijing-01
Previous GameID: 925PR
GameSetupMode: NetworkCoop
Players: 2
DungeonRoomTransitioner.state: WaitingForRoomToLoad
DungeonRoom.state: PlacingPlayerCreatures
Room: 0 / 0
RoomModifiers: None
YouHaveDiedState: Null
SystemPlayer InputDevice: 键盘
HumanPlayer 1 InputDevice: 键盘
ChrisNZL commented 1 year ago

Another feedback ID: 0.3.7j_20230110-2SPPT