thesupersonic16 / HedgeModManager

A mod manager for Sonic Generations, Sonic Lost World, Sonic Forces, Sonic Colours Ultimate and other PC Hedgehog Engine games.
MIT License
267 stars 61 forks source link

[HedgeModManager] Crash on startup with ModsDB in an incorrect state #87

Closed pointingouttheobvious closed 4 years ago

pointingouttheobvious commented 4 years ago

HMM Info:

    Version: 7.0-7
    Args: 
    StartDir: C:\Program Files (x86)\Steam\steamapps\common\SonicForces\build\main\projects\exec
    Process Level: User
    Game: Sonic Forces
    SteamGame: Sonic Forces

Exception:

    Type: ArgumentOutOfRangeException
    Message: Index must be within the bounds of the List.
Parameter name: index
    Source: mscorlib
    Function: Void ThrowArgumentOutOfRangeException(System.ExceptionArgument, System.ExceptionResource)
    StackTrace: 
       at System.ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument argument, ExceptionResource resource)
       at System.Collections.Generic.List`1.Insert(Int32 index, T item)
       at HedgeModManager.MainWindow.RefreshMods()
       at HedgeModManager.MainWindow.Window_Loaded(Object sender, RoutedEventArgs e)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.BroadcastEventHelper.BroadcastEvent(DependencyObject root, RoutedEvent routedEvent)
       at System.Windows.BroadcastEventHelper.BroadcastLoadedEvent(Object root)
       at MS.Internal.LoadedOrUnloadedOperation.DoWork()
       at System.Windows.Media.MediaContext.FireLoadedPendingCallbacks()
       at System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
       at System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
       at System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
       at System.Windows.Interop.HwndTarget.OnResize()
       at System.Windows.Interop.HwndTarget.HandleMessage(WindowMessage msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Interop.HwndSource.HwndTargetFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
    InnerException: 
thesupersonic16 commented 4 years ago

Looks like it might have failed to sort your mod list. Is it possible for you to send your ModsDb.ini file from your mods folder (C:\Program Files (x86)\Steam\steamapps\common\SonicForces\build\main\projects\exec\mods). I will need to see what is happening to it so I can get an idea whats going wrong so I can fix it for everyone.

pointingouttheobvious commented 4 years ago

[Main] ReverseLoadOrder=0 ActiveMod0="SonicForcesBoostGauge" ActiveMod1="Unleashed Sonic" ActiveMod2="CFRRevisedMSonicPhysics" ActiveModCount=3 [Mods] SonicForcesBoostGauge="C:\Program Files (x86)\Steam\steamapps\common\SonicForces\build\main\projects\exec\mods\SonicForcesBoostGauge\mod.ini" Unleashed Sonic="C:\Program Files (x86)\Steam\steamapps\common\SonicForces\build\main\projects\exec\mods\Unleashed Sonic\mod.ini" CFRRevisedMSonicPhysics="C:\Program Files (x86)\Steam\steamapps\common\SonicForces\build\main\projects\exec\mods\CFRRevisedMSonicPhysics\mod.ini" [Codes] CodeCount=0

thesupersonic16 commented 4 years ago

I can't seem to reproduce the issue you have. I even downloaded the same mods and HMM version with the config set the same as you sent but with no issues. Was HMM working in the past? and does updating HMM to 7.1-3 help at all?

thesupersonic16 commented 4 years ago

Ah I see what went wrong. Your config got messed up because HMM wasn't handling manual mod deleting.

Try this version, should solve your issue. And let me know if it works or not. HedgeModManager.zip

pointingouttheobvious commented 4 years ago

Ah I see what went wrong. Your config got messed up because HMM wasn't handling manual mod deleting.

Try this version, should solve your issue. And let me know if it works or not. HedgeModManager.zip

Thanks it worked!

thesupersonic16 commented 4 years ago

Fixed in e4af160ece30cb074f624f711d0b907cd56f1f08