Sgt-Imalas / Sgt_Imalas-Oni-Mods

All the ONI mods made by Sgt_Imalas
MIT License
23 stars 8 forks source link

[BUG]: Crash when activating Move Here Command Tiles #46

Closed jrharris42 closed 1 year ago

jrharris42 commented 1 year ago

Description of the bug/crash

I have a room with 4 Move Here Command Tiles. Each has a selected dupe already. If I activate all four of them at once, I get a crash.

The debug console says this: [13:28:27.887] [1] [INFO] "Move Here" Command Tile's assembly declared the method MoveDupeHere.MoveDupeHereSM+States:CreateChore in the stack trace, adding to referenced mods list [DebugConsole][1]: Error[Error]: Exception in: (MDH_GoHereTile).MoveDupeHere.MoveDupeHereSM+States.root.dupeAssignedStates.GreenSignal.MovingDupe. System.NullReferenceException: Object reference not set to an instance of an object at MoveChore..ctor (IStateMachineTarget target, ChoreType chore_type, System.Func2[T,TResult] get_cell_callback, System.Boolean update_cell) [0x00000] in <8d3d5debc4074b28a2c8baaa0784686c>:0 at MoveDupeHere.MoveDupeHereSM+States.CreateChore (MoveDupeHere.MoveDupeHereSM+StatesInstance smi) [0x0001d] in <82cd1e3d54704826850a6c503b3d598d>:0 at GameStateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType].SetupChore (System.Func2[T,TResult] create_chore_callback, GameStateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType] success_state, GameStateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType] failure_state, StateMachineInstanceType smi, System.Int32 chore_data_idx, System.Int32 callback_data_idx, System.Boolean is_success_state_reentrant, System.Boolean is_failure_state_reentrant) [0x0004a] in <8d3d5debc4074b28a2c8baaa0784686c>:0 at GameStateMachine4+State+<>c__DisplayClass64_0[StateMachineType,StateMachineInstanceType,MasterType,DefType].b__0 (StateMachineInstanceType smi) [0x00000] in <8d3d5debc4074b28a2c8baaa0784686c>:0 at StateMachine4+GenericInstance[StateMachineType,StateMachineInstanceType,MasterType,DefType].ExecuteActions (StateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType] state, System.Collections.Generic.List`1[T] actions) [0x00048] in <8d3d5debc4074b28a2c8baaa0784686c>:0

[DebugConsole][1]: Error[Error]: Exception in: (MDH_GoHereTile).MoveDupeHere.MoveDupeHereSM+States.root.dupeAssignedStates.GreenSignal.MovingDupe. System.NullReferenceException: Object reference not set to an instance of an object at MoveChore..ctor (IStateMachineTarget target, ChoreType chore_type, System.Func2[T,TResult] get_cell_callback, System.Boolean update_cell) [0x00000] in <8d3d5debc4074b28a2c8baaa0784686c>:0 at MoveDupeHere.MoveDupeHereSM+States.CreateChore (MoveDupeHere.MoveDupeHereSM+StatesInstance smi) [0x0001d] in <82cd1e3d54704826850a6c503b3d598d>:0 at GameStateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType].SetupChore (System.Func2[T,TResult] create_chore_callback, GameStateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType] success_state, GameStateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType] failure_state, StateMachineInstanceType smi, System.Int32 chore_data_idx, System.Int32 callback_data_idx, System.Boolean is_success_state_reentrant, System.Boolean is_failure_state_reentrant) [0x0004a] in <8d3d5debc4074b28a2c8baaa0784686c>:0 at GameStateMachine4+State+<>c__DisplayClass64_0[StateMachineType,StateMachineInstanceType,MasterType,DefType].b__0 (StateMachineInstanceType smi) [0x00000] in <8d3d5debc4074b28a2c8baaa0784686c>:0 at StateMachine4+GenericInstance[StateMachineType,StateMachineInstanceType,MasterType,DefType].ExecuteActions (StateMachine4+State[StateMachineType,StateMachineInstanceType,MasterType,DefType] state, System.Collections.Generic.List`1[T] actions) [0x00048] in <8d3d5debc4074b28a2c8baaa0784686c>:0

Steps To Reproduce

  1. Place four tiles in room.
  2. Select four dupes.
  3. Activate the tiles.

Player.log

There's no attach button and drag/drop just opens a new tab with the file's contents.

jrharris42 commented 1 year ago

Player.log

Sgt-Imalas commented 1 year ago

cannot reproduce issue.

pushed version 1.0.2 that adds a couple null checks that should prevent this crash. reopen this issue please if the crash still occurs

jrharris42 commented 1 year ago

Still crashing. May be a conflict with another mod I have (this game has a lot of mods active). I'll try to reproduce it in a more vanilla world with only this mod and see if I get the same thing.

jrharris42 commented 1 year ago

I solved it: if the chosen dupe is currently piloting a rocket (base game btw), it crashes if I try to summon them.