Bannerlord has encountered a problem and will close itself.
This is a community Crash Report. Please save it and use it for reporting the error. Do not provide screenshots, provide the report!
Most likely this error was caused by a custom installed module.

If you were in the middle of something, the progress might be lost.


+ Exception

Exception information
Type: System.InvalidOperationException
Message: Failed to compare two elements in the array.
Source: mscorlib
CallStack:
  1. at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)
  2. at System.Array.Sort[T](T[] array, Int32 index, Int32 length, IComparer`1 comparer)
  3. at System.Collections.Generic.List`1.Sort(Int32 index, Int32 count, IComparer`1 comparer)
  4. at TaleWorlds.Library.MBBindingList`1.Sort(IComparer`1 comparer)
  5. at TaleWorlds.CampaignSystem.ViewModelCollection.SPInventorySortControllerVM.ExecuteSortByType()
  6. at TaleWorlds.CampaignSystem.ViewModelCollection.SPInventoryVM..ctor(InventoryLogic inventoryLogic, Boolean isInCivilianModeByDefault, Func`2 getItemUsageSetFlags, String fiveStackShortcutkeyText, String entireStackShortcutkeyText)
  7. at SandBox.GauntletUI.InventoryGauntletScreen.OnInitialize()
  8. at TaleWorlds.Engine.Screens.ScreenBase.HandleInitialize()
  9. at TaleWorlds.Engine.Screens.ScreenManager.PushScreen(ScreenBase screen)
  10. at TaleWorlds.MountAndBlade.View.Screen.GameStateScreenManager.TaleWorlds.Core.IGameStateManagerListener.OnPushState(GameState gameState, Boolean isTopGameState)
  11. at TaleWorlds.Core.GameStateManager.OnPushState(GameState gameState)
  12. at TaleWorlds.Core.GameStateManager.DoGameStateJobs()
  13. at TaleWorlds.Core.GameStateManager.PushState(GameState gameState, Int32 level)
  14. at TaleWorlds.CampaignSystem.InventoryManager.OpenInventoryPresentation(TextObject leftRosterName)
  15. at TaleWorlds.CampaignSystem.InventoryManager.OpenScreenAsInventory(DoneLogicExtrasDelegate doneLogicExtrasDelegate)
  16. at SandBox.View.Map.MapNavigationHandler.TaleWorlds.CampaignSystem.INavigationHandler.OpenInventory()
  17. at SandBox.GauntletUI.AutoGenerated.MapBar__TaleWorlds_CampaignSystem_ViewModelCollection_MapVM.EventListenerOf_widget_2_0_2_0(Widget widget, String commandName, Object[] args)
  18. at TaleWorlds.GauntletUI.Widget.EventFired(String eventName, Object[] args)
  19. at TaleWorlds.GauntletUI.ButtonWidget.HandleClick()
  20. at TaleWorlds.GauntletUI.ButtonWidget.OnMouseReleased()
  21. at TaleWorlds.GauntletUI.EventManager.MouseUp()
  22. at TaleWorlds.GauntletUI.UIContext.UpdateInput(InputType handleInputs)
  23. at TaleWorlds.Engine.Screens.ScreenManager.Update()
  24. at TaleWorlds.Engine.Screens.ScreenManager.Tick_Patch1(Single dt)


Inner Exception information
Type: System.NullReferenceException
Message: Object reference not set to an instance of an object.
Source: TaleWorlds.CampaignSystem.ViewModelCollection
CallStack:
  1. at TaleWorlds.CampaignSystem.ViewModelCollection.CampaignUIHelper.GetItemObjectTypeSortIndex(ItemObject item)
  2. at TaleWorlds.CampaignSystem.ViewModelCollection.SPInventorySortControllerVM.ItemTypeComparer.Compare(SPItemVM x, SPItemVM y)
  3. at System.Collections.Generic.ArraySortHelper`1.PickPivotAndPartition(T[] keys, Int32 lo, Int32 hi, IComparer`1 comparer)
  4. at System.Collections.Generic.ArraySortHelper`1.IntroSort(T[] keys, Int32 lo, Int32 hi, Int32 depthLimit, IComparer`1 comparer)
  5. at System.Collections.Generic.ArraySortHelper`1.IntrospectiveSort(T[] keys, Int32 left, Int32 length, IComparer`1 comparer)
  6. at System.Collections.Generic.ArraySortHelper`1.Sort(T[] keys, Int32 index, Int32 length, IComparer`1 comparer)

+ Involved Modules

  • Bannerlord.Harmony
    • Method: static System.Int32 System.Collections.Generic.ArraySortHelper`1::PickPivotAndPartition(System.Collections.Generic.T[] keys, System.Int32 lo, System.Int32 hi, System.Collections.Generic.IComparer`1 comparer)
      Frame: PickPivotAndPartition at offset 312 in file:line:column :0:0
    • Method: static System.Void System.Collections.Generic.ArraySortHelper`1::IntroSort(System.Collections.Generic.T[] keys, System.Int32 lo, System.Int32 hi, System.Int32 depthLimit, System.Collections.Generic.IComparer`1 comparer)
      Frame: IntroSort at offset 158 in file:line:column :0:0
    • Method: static System.Void System.Collections.Generic.ArraySortHelper`1::IntrospectiveSort(System.Collections.Generic.T[] keys, System.Int32 left, System.Int32 length, System.Collections.Generic.IComparer`1 comparer)
      Frame: IntrospectiveSort at offset 84 in file:line:column :0:0
    • Method: virtual System.Void System.Collections.Generic.ArraySortHelper`1::Sort(System.Collections.Generic.T[] keys, System.Int32 index, System.Int32 length, System.Collections.Generic.IComparer`1 comparer)
      Frame: Sort at offset 161 in file:line:column :0:0
    • Method: virtual System.Void System.Collections.Generic.ArraySortHelper`1::Sort(System.Collections.Generic.T[] keys, System.Int32 index, System.Int32 length, System.Collections.Generic.IComparer`1 comparer)
      Frame: Sort at offset 407 in file:line:column :0:0
    • Method: static System.Void System.Array::Sort(System.T[] array, System.Int32 index, System.Int32 length, System.Collections.Generic.IComparer`1 comparer)
      Frame: Sort at offset 231 in file:line:column :0:0
    • Method: System.Void System.Collections.Generic.List`1::Sort(System.Int32 index, System.Int32 count, System.Collections.Generic.IComparer`1 comparer)
      Frame: Sort at offset 114 in file:line:column :0:0
  • Sandbox
    • Method: virtual System.Void SandBox.GauntletUI.InventoryGauntletScreen::OnInitialize()
      Frame: OnInitialize at offset 265 in file:line:column :0:0
    • Method: virtual System.Void SandBox.View.Map.MapNavigationHandler::TaleWorlds.CampaignSystem.INavigationHandler.OpenInventory()
      Frame: TaleWorlds.CampaignSystem.INavigationHandler.OpenInventory at offset 233 in file:line:column :0:0
    • Method: System.Void SandBox.GauntletUI.AutoGenerated.MapBar__TaleWorlds_CampaignSystem_ViewModelCollection_MapVM::EventListenerOf_widget_2_0_2_0(TaleWorlds.GauntletUI.Widget widget, System.String commandName, System.Object[] args)
      Frame: EventListenerOf_widget_2_0_2_0 at offset 62 in file:line:column :0:0
  • Native
    • Method: virtual System.Void TaleWorlds.MountAndBlade.View.Screen.GameStateScreenManager::TaleWorlds.Core.IGameStateManagerListener.OnPushState(TaleWorlds.Core.GameState gameState, System.Boolean isTopGameState)
      Frame: TaleWorlds.Core.IGameStateManagerListener.OnPushState at offset 138 in file:line:column :0:0

+ Installed Modules

  • + Harmony (Bannerlord.Harmony, v2.1.1.65)
  • + ButterLib (Bannerlord.ButterLib, v1.0.28.0)
  • + UIExtenderEx (Bannerlord.UIExtenderEx, v2.1.8.0)
  • + Mod Configuration Menu v4 (Bannerlord.MBOptionScreen, v4.3.14.0)
  • + Native (Native, e1.6.1.0)
  • + SandBox Core (SandBoxCore, e1.6.1.0)
  • + Sandbox (Sandbox, e1.6.1.0)
  • + StoryMode (StoryMode, e1.6.1.0)
  • + CustomBattle (CustomBattle, e1.6.1.0)
  • + My Little Warband (MyLittleWarband, v1.6.1.0)
  • + Open Source Armory (OpenSourceArmory, v1.4.0.0)
  • + SliceThrough (SliceThrough, v1.0.3.0)
  • + Reign of Sword (ReignOfSword, v1.1.0.0)
  • + Smith Forever (SmithForever, v1.0.3.0)
  • + Improved Garrisons (ImprovedGarrisons, v4.0.3.6)
  • + FixFastSwingMeleeContact (FixFastSwingMeleeContact, v1.0.0.0)
  • + Raise your Banner (Raiseyourbanner, e1.6.1.0)
  • + Perfect Fire Arrows (PerfectFireArrows, e1.6.1.0)

+ Assemblies

+ Harmony Patches

  • TaleWorlds.MountAndBlade.Module.FinalizeSubModules
    • Postfixes
      • Owner: Bannerlord.ButterLib.MBSubModuleBaseEx; Namespace: Bannerlord.ButterLib.Implementation.MBSubModuleBaseExtended.Patches.ModulePatchFinalizeSubModulesPostfix;

  • TaleWorlds.MountAndBlade.Module.SetInitialModuleScreenAsRootScreen
    • Transpilers
      • Owner: Bannerlord.ButterLib.MBSubModuleBaseEx; Namespace: Bannerlord.ButterLib.Implementation.MBSubModuleBaseExtended.Patches.ModulePatchTranspiler;

  • TaleWorlds.MountAndBlade.MBGameManager.OnGameStart
    • Transpilers
      • Owner: Bannerlord.ButterLib.MBSubModuleBaseEx; Namespace: Bannerlord.ButterLib.Implementation.MBSubModuleBaseExtended.Patches.MBGameManagerPatchTranspiler;

  • TaleWorlds.MountAndBlade.MBGameManager.OnGameEnd
    • Transpilers
      • Owner: Bannerlord.ButterLib.MBSubModuleBaseEx; Namespace: Bannerlord.ButterLib.Implementation.MBSubModuleBaseExtended.Patches.MBGameManagerPatchTranspiler;

  • TaleWorlds.SaveSystem.TypeExtensions.IsContainer
    • Prefixes
      • Owner: Bannerlord.ButterLib.SaveSystem; Namespace: Bannerlord.ButterLib.Implementation.SaveSystem.Patches.TypeExtensionsPatchIsContainerPrefix;

  • TaleWorlds.GauntletUI.Data.GauntletMovie.Load
    • Prefixes
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.Patches.GauntletMoviePatchLoadPrefix;

  • TaleWorlds.Library.ViewModel.ExecuteCommand
    • Prefixes
      • Owner: bannerlord.mcm.ui.viewmodelpatch; Namespace: MCM.UI.Patches.ViewModelPatchExecuteCommandPatch;
    • Transpilers
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.Patches.ViewModelPatchViewModel_ExecuteCommand_Transpiler;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetPrefab.LoadFrom
    • Transpilers
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.Patches.WidgetPrefabPatchWidgetPrefab_LoadFrom_Transpiler;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetFactory.Initialize
    • Transpilers
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.Patches.WidgetFactoryPatchInitializeTranspiler;

  • TaleWorlds.GauntletUI.BrushFactory.get_Brushes
    • Postfixes
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.BrushFactoryManagerGetBrushesPostfix;

  • TaleWorlds.GauntletUI.BrushFactory.GetBrush
    • Prefixes
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.BrushFactoryManagerGetBrushPrefix;

  • TaleWorlds.GauntletUI.PrefabSystem.ConstantDefinition.GetValue
    • Transpilers
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.BrushFactoryManagerBlankTranspiler;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetExtensions.SetWidgetAttributeFromString
    • Transpilers
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.BrushFactoryManagerBlankTranspiler;

  • TaleWorlds.GauntletUI.UIContext.GetBrush
    • Transpilers
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.BrushFactoryManagerBlankTranspiler;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetExtensions.ConvertObject
    • Transpilers
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.BrushFactoryManagerBlankTranspiler;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetFactory.GetCustomType
    • Prefixes
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.WidgetFactoryManagerGetCustomTypePrefix;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetFactory.CreateBuiltinWidget
    • Prefixes
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.WidgetFactoryManagerCreateBuiltinWidgetPrefix;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetFactory.GetWidgetTypes
    • Prefixes
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.WidgetFactoryManagerGetWidgetTypesPostfix;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetFactory.IsCustomType
    • Prefixes
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.WidgetFactoryManagerIsCustomTypePrefix;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetFactory.OnUnload
    • Prefixes
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.WidgetFactoryManagerOnUnloadPrefix;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetTemplate.CreateWidgets
    • Transpilers
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.WidgetFactoryManagerBlankTranspiler;

  • TaleWorlds.GauntletUI.PrefabSystem.WidgetTemplate.OnRelease
    • Transpilers
      • Owner: bannerlord.uiextender.ex; Namespace: Bannerlord.UIExtenderEx.ResourceManager.WidgetFactoryManagerBlankTranspiler;

  • TaleWorlds.TwoDimension.EditableText.GetCursorPosition
    • Finalizers
      • Owner: bannerlord.mcm.ui.editabletextpatch; Namespace: MCM.UI.Patches.EditableTextPatchGetCursorPosition;

  • TaleWorlds.MountAndBlade.MBSubModuleBase.OnSubModuleLoad
    • Postfixes
      • Owner: butterlib.delayedsubmoduleloader.static; Namespace: Bannerlord.ButterLib.DelayedSubModule.DelayedSubModuleManagerBaseSubModuleLoadPostfix;

  • TaleWorlds.MountAndBlade.MBSubModuleBase.OnSubModuleUnloaded
    • Postfixes
      • Owner: butterlib.delayedsubmoduleloader.static; Namespace: Bannerlord.ButterLib.DelayedSubModule.DelayedSubModuleManagerBaseOnSubModuleUnloadedPostfix;

  • TaleWorlds.MountAndBlade.MBSubModuleBase.OnBeforeInitialModuleScreenSetAsRoot
    • Postfixes
      • Owner: butterlib.delayedsubmoduleloader.static; Namespace: Bannerlord.ButterLib.DelayedSubModule.DelayedSubModuleManagerBaseOnBeforeInitialModuleScreenSetAsRootPostfix;

  • TaleWorlds.MountAndBlade.MBSubModuleBase.OnGameStart
    • Postfixes
      • Owner: butterlib.delayedsubmoduleloader.static; Namespace: Bannerlord.ButterLib.DelayedSubModule.DelayedSubModuleManagerBaseOnGameStartPostfix;

  • TaleWorlds.MountAndBlade.MBSubModuleBase.OnGameEnd
    • Postfixes
      • Owner: butterlib.delayedsubmoduleloader.static; Namespace: Bannerlord.ButterLib.DelayedSubModule.DelayedSubModuleManagerBaseOnGameEndPostfix;

  • SandBox.SandBoxSubModule.OnSubModuleLoad
    • Prefixes
      • Owner: butterlib.delayedsubmoduleloader.sandboxsubmodule; Namespace: Bannerlord.ButterLib.DelayedSubModule.DelayedSubModuleManagerSubModuleLoadPrefix;
    • Postfixes
      • Owner: butterlib.delayedsubmoduleloader.sandboxsubmodule; Namespace: Bannerlord.ButterLib.DelayedSubModule.DelayedSubModuleManagerSubModuleLoadPostfix;

  • MCM.IntegratedLoaderSubModule..ctor
    • Prefixes
      • Owner: bannerlord.mcm.implementation.mcmv3.loaderpreventer; Namespace: MCM.Adapter.MCMv3.Patches.MCMv3IntegratedLoaderSubModulePatchStopIntegratedLoaderSubModuleCtor;

  • TaleWorlds.MountAndBlade.ViewModelCollection.GameOptions.OptionsVM..ctor
    • Transpilers
      • Owner: bannerlord.uiextender.ex.viewmodels.MCM.UI; Namespace: Bannerlord.UIExtenderEx.Patches.ViewModelWithMixinPatchViewModel_Constructor_Transpiler;

  • TaleWorlds.MountAndBlade.ViewModelCollection.GameOptions.OptionsVM..ctor
    • Transpilers
      • Owner: bannerlord.uiextender.ex.viewmodels.MCM.UI; Namespace: Bannerlord.UIExtenderEx.Patches.ViewModelWithMixinPatchViewModel_Constructor_Transpiler;

  • TaleWorlds.MountAndBlade.ViewModelCollection.GameOptions.OptionsVM.OnFinalize
    • Transpilers
      • Owner: bannerlord.uiextender.ex.viewmodels.MCM.UI; Namespace: Bannerlord.UIExtenderEx.Patches.ViewModelWithMixinPatchViewModel_Finalize_Transpiler;

  • TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.RecruitmentCampaignBehavior.GetRecruitActionsForParty
    • Prefixes
      • Owner: MyLittleWarband; Namespace: MyLittleWarband.ClanRecruitPatch2Prefix;
    • Postfixes
      • Owner: MyLittleWarband; Namespace: MyLittleWarband.ClanRecruitPatch1Postfix;

  • TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.RecruitmentCampaignBehavior.UpdateVolunteersOfNotables
    • Postfixes
      • Owner: MyLittleWarband; Namespace: MyLittleWarband.RecruitProductionPatchPostfix;

  • TaleWorlds.CampaignSystem.ViewModelCollection.Encyclopedia.EncyclopediaItems.EncyclopediaUnitVM.ExecuteLink
    • Prefixes
      • Owner: MyLittleWarband; Namespace: MyLittleWarband.EnyclopediaEditUnitPatchPrefix;

  • TaleWorlds.CampaignSystem.ViewModelCollection.GameMenu.RecruitmentVM.Deactivate
    • Postfixes
      • Owner: MyLittleWarband; Namespace: MyLittleWarband.RecruitPatch1Postfix;

  • TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.Towns.PlayerTownVisitCampaignBehavior.game_menu_recruit_volunteers_on_consequence
    • Prefixes
      • Owner: MyLittleWarband; Namespace: MyLittleWarband.RecruitPatch2Prefix;

  • TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.CampaignBehaviorManager.OnGameLoaded
    • Prefixes
      • Owner: Bannerlord.ButterLib.ObjectSystem; Namespace: Bannerlord.ButterLib.Implementation.ObjectSystem.Patches.CampaignBehaviorManagerPatchOnGameLoadedPrefix;

  • TaleWorlds.CampaignSystem.SandBox.CampaignBehaviors.CampaignBehaviorManager.OnBeforeSave
    • Postfixes
      • Owner: Bannerlord.ButterLib.ObjectSystem; Namespace: Bannerlord.ButterLib.Implementation.ObjectSystem.Patches.CampaignBehaviorManagerPatchOnBeforeSavePostfix;

  • TaleWorlds.MountAndBlade.ViewModelCollection.InitialMenuVM.RefreshMenuOptions
    • Postfixes
      • Owner: bannerlord.mcm.mainmenuscreeninjection_v4; Namespace: MCM.UI.Functionality.Post158GameMenuScreenHandlerRefreshMenuOptionsPostfix; Priority: 300;

  • TaleWorlds.MountAndBlade.Mission.UpdateMomentumRemaining
    • Prefixes
      • Owner: com.SliceThrough.akdombrowski; Namespace: SliceThrough.SubModuleUpdateMomentumRemaining;