marzent / IINACT

A Dalamud plugin to run the FFXIV_ACT_Plugin in an ACT-like enviroment with a heavily modified port of Overlay Plugin
https://www.iinact.com
GNU General Public License v3.0
183 stars 42 forks source link

IINACT randomly fails to load #61

Closed sersorrel closed 1 year ago

sersorrel commented 1 year ago

Relatively frequently I'll launch the game only to discover that IINACT didn't load properly:

2023-07-04 12:41:48.475 +01:00 [ERR] [LOCALPLUGIN] Error while loading IINACT
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
 ---> System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
   at System.Collections.Generic.List`1.get_Item(Int32 index)
   at FFXIV_ACT_Plugin.Memory.MemoryReader.ReadVtable.Read(Dictionary`2 pointers, List`1 signatureTypes)
   at FFXIV_ACT_Plugin.Memory.SignatureManager.RefreshVtable()
   at FFXIV_ACT_Plugin.Memory.ProcessManager.Verify()
   at IINACT.FfxivActPluginWrapper.SetupSettingsMediator() in /home/runner/work/IINACT/IINACT/IINACT/FfxivActPluginWrapper.cs:line 208
   at IINACT.FfxivActPluginWrapper..ctor(Configuration configuration, ClientLanguage dalamudClientLanguage, ChatGui chatGui, Framework framework, Condition condition) in /home/runner/work/IINACT/IINACT/IINACT/FfxivActPluginWrapper.cs:line 110
   at IINACT.Plugin..ctor(DalamudPluginInterface pluginInterface, CommandManager commandManager, GameNetwork gameNetwork, DataManager dataManager, ChatGui chatGui, Framework framework, Condition condition) in /home/runner/work/IINACT/IINACT/IINACT/Plugin.cs:line 88
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.ConstructorInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   --- End of inner exception stack trace ---
   at System.Reflection.ConstructorInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
   at System.Reflection.RuntimeConstructorInfo.InvokeWithManyArguments(RuntimeConstructorInfo ci, Int32 argCount, Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.RuntimeConstructorInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
   at Dalamud.IoC.Internal.ServiceContainer.CreateAsync(Type objectType, Object[] scopedObjects, IServiceScope scope) in C:\goatsoft\companysecrets\dalamud\IoC\Internal\ServiceContainer.cs:line 134
   at Dalamud.Plugin.Internal.Types.LocalPlugin.LoadAsync(PluginLoadReason reason, Boolean reloading) in C:\goatsoft\companysecrets\dalamud\Plugin\Internal\Types\LocalPlugin.cs:line 482

It seems to usually work fine if I close and restart the game.

(xiv 6.41, xlcore 1.0.4, launcher default wine (wine-xiv-staging-fsync-git-8.5.r4.g4211bac7) in windows 7 mode, nixos 23.11.20230629.4bc72ca)

marzent commented 1 year ago

I haven't seen this personally, but technically it should be possible to work around the FFXIV_ACT_Plugin failing there... I don't think the vtable read is even necessary with the reworked chat handling, but I will have to investigate.

marzent commented 1 year ago

Fixed with 82d58e06d730ced24fd94a396155403f6be54f64