BannerlordCE / CEEvents

Captivity Events Source Code
https://www.nexusmods.com/mountandblade2bannerlord/mods/1226
MIT License
4 stars 6 forks source link

Exception triggered when even about companion being kidnapped triggers and ends #88

Open bicobus opened 1 year ago

bicobus commented 1 year ago

Not quite sure about this one, happen to see the exceptions in the logs just after closing the game following this event. Not sure which module the event comes from either, is it hot buttered girls?

You sometimes get a notification that your companion's been abducted. You can pay ransom, ambush with scouts or duel the leader. I chose to duel the leader.

Events ids are in the traceback. The first ANE is triggered by BC_companion_debut_f_player_f. Second one is TB_companion_kidnapped_duel_f.

Additional context

03/16/2023 19:08:01 -- Incorrect ConsequenceCompanions heroSelected: System.ArgumentNullException: Value cannot be null.
Parameter name: source
  at System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x0000d] in <5c5fa49bfcb245569447e7edd431f418>:0 
  at System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value) [0x0000a] in <5c5fa49bfcb245569447e7edd431f418>:0 
  at CaptivityEvents.Events.CECompanionSystem.ConsequenceForceMarry (CaptivityEvents.Custom.Companion companion, TaleWorlds.CampaignSystem.Hero hero) [0x00006] in <b59733b1ecdc4c51b2efb223dec2b6d1>:0 
  at CaptivityEvents.Events.CECompanionSystem.ConsequenceCompanions (TaleWorlds.CampaignSystem.CharacterObject hero, TaleWorlds.CampaignSystem.Party.PartyBase party) [0x004c3] in <b59733b1ecdc4c51b2efb223dec2b6d1>:0 BC_companion_debut_f_player_f
03/16/2023 20:16:03 -- Couldn't find  in events.
03/16/2023 20:16:04 -- Couldn't find  in events.
03/16/2023 20:45:55 -- FinalizeBattle: System.NullReferenceException: Object reference not set to an instance of an object
  at TaleWorlds.CampaignSystem.Party.PartyComponents.WarPartyComponent.OnFinalize () [0x00006] in <bab4ee595657421bbfdf456d445ca0ee>:0 
  at TaleWorlds.CampaignSystem.Party.PartyComponents.PartyComponent.Finish () [0x00000] in <bab4ee595657421bbfdf456d445ca0ee>:0 
  at TaleWorlds.CampaignSystem.Party.MobileParty.OnRemoveParty () [0x00076] in <bab4ee595657421bbfdf456d445ca0ee>:0 
  at TaleWorlds.CampaignSystem.Party.MobileParty.RemoveParty () [0x00199] in <bab4ee595657421bbfdf456d445ca0ee>:0 
  at TaleWorlds.CampaignSystem.Actions.DestroyPartyAction.ApplyInternal (TaleWorlds.CampaignSystem.Party.PartyBase destroyerParty, TaleWorlds.CampaignSystem.Party.MobileParty destroyedParty) [0x00051] in <bab4ee595657421bbfdf456d445ca0ee>:0 
  at TaleWorlds.CampaignSystem.Actions.DestroyPartyAction.Apply (TaleWorlds.CampaignSystem.Party.PartyBase destroyerParty, TaleWorlds.CampaignSystem.Party.MobileParty destroyedParty) [0x00000] in <bab4ee595657421bbfdf456d445ca0ee>:0 
  at CaptivityEvents.CESubModule.BattleStateCheck () [0x0018a] in <b59733b1ecdc4c51b2efb223dec2b6d1>:0 
03/16/2023 20:45:57 -- Incorrect ConsequenceCompanions heroSelected: System.ArgumentNullException: Value cannot be null.
Parameter name: source
  at System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value, System.Collections.Generic.IEqualityComparer`1[T] comparer) [0x0000d] in <5c5fa49bfcb245569447e7edd431f418>:0 
  at System.Linq.Enumerable.Contains[TSource] (System.Collections.Generic.IEnumerable`1[T] source, TSource value) [0x0000a] in <5c5fa49bfcb245569447e7edd431f418>:0 
  at CaptivityEvents.Events.CECompanionSystem.ConsequenceForceMarry (CaptivityEvents.Custom.Companion companion, TaleWorlds.CampaignSystem.Hero hero) [0x00006] in <b59733b1ecdc4c51b2efb223dec2b6d1>:0 
  at CaptivityEvents.Events.CECompanionSystem.ConsequenceCompanions (TaleWorlds.CampaignSystem.CharacterObject hero, TaleWorlds.CampaignSystem.Party.PartyBase party) [0x004c3] in <b59733b1ecdc4c51b2efb223dec2b6d1>:0 TB_companion_kidnapped_duel_f
SkipWestcott commented 1 year ago

This is a CE-log exception which does not bubble to the game UI.

TheBadListener commented 1 year ago

Interesting triggering a few catches.