ChrisNZL / Tallowmere2

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

Couch Co-op game over null ref: T2.LastUsedPlayerInfo..ctor #847

Closed ChrisNZL closed 3 years ago

ChrisNZL commented 3 years ago

Auto report. 0.2.3. Feedback ID: 20210130-2NYXB

Looks like an issue with: couch co-op, game-over screen, controller disconnected, and game is prompting to reassign controllers but failing to read last-used player info.

Probably need to cater better for handling disconnected controllers during game-over screen.

Also note: YouHaveDiedState is AnimatingStat3

2:26:01, Frame 91768, EXCEPTION »  NullReferenceException: Object reference not set to an instance of an object
>>>>> CRITICAL ERROR >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

T2.LastUsedPlayerInfo..ctor (T2.Creature creature, System.String newName)
T2.InputDeviceAssigner.BeginFlow (System.Int32 newTotalPlayers, T2.InputDeviceAssignerIntention newIntention, T2.Action newActionToExecute)
T2.Action_ShowInputDeviceAssigner.ExecuteAction ()
T2.AlertBox.PerformAction (T2.Action action)
T2.AlertBox.ProcessInputForPlayer (T2.Player player)
T2.Player.Update ()

GameStates: RompingThroughDungeon, GameOverScreen, PausingDueToDisconnectedController, ViewingAlertBox
OnlineGameInfo: Device is offline.
No previous server nor online game info.
GameSetupMode: CouchCoop
Players: 2
DungeonRoomTransitionerState: Null
Room: 11 / 11
RoomModifiers: BulletHell (Bullet Hell), HealthRegen (Healthy Monsters)
YouHaveDiedState: AnimatingStat3
SystemPlayer InputDevice: XInput Controller
HumanPlayer 1 InputDevice: XInput Controller
HumanPlayer 2 InputDevice: None

Additional feedback ID: 20210205-CGR62

ChrisNZL commented 3 years ago

Fixed in 0.2.4. Was an issue with input device assigner clearing player info and failing to recreate info if a player's creature was obliterated, which happens to the last player.

Players would AFK, come back, and game would error on device reassignment since an expected creature was dead.