ngld / OverlayPlugin

Yet another OverlayPlugin fork.
Other
231 stars 39 forks source link

Sporadic failure to initalize OverlayPlugin: "The path is not of a legal form" #236

Closed Kyle-B closed 2 years ago

Kyle-B commented 2 years ago

On startup I seem to hit this error about 50% of the time:

[12/15/2021 3:43:14 PM] Info: AssemblyResolver: Loaded: HtmlRenderer, Version=0.18.0.0, Culture=neutral, PublicKeyToken=null
[12/15/2021 3:43:14 PM] Info: AssemblyResolver: Loaded: CefSharp, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138
[12/15/2021 3:43:14 PM] Info: InitPlugin: PluginDirectory = C:\Users\kyle\AppData\Roaming\Advanced Combat Tracker\Plugins\OverlayPlugin
[12/15/2021 3:43:14 PM] Info: AssemblyResolver: Loaded: CefSharp.OffScreen, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138
[12/15/2021 3:43:14 PM] Info: AssemblyResolver: Loaded: CefSharp.Core, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138
[12/15/2021 3:43:14 PM] Info: AssemblyResolver: Loaded: CefSharp.Core.Runtime, Version=95.7.141.0, Culture=neutral, PublicKeyToken=40c4b6fc221f4138
[12/15/2021 3:43:14 PM] Info: AssemblyResolver: Loaded: Fleck, Version=1.2.0.0, Culture=neutral, PublicKeyToken=null
[12/15/2021 3:43:14 PM] Info: InitPlugin: Initialised.
[12/15/2021 3:43:14 PM] Error: InitPlugin: System.ArgumentException: The path is not of a legal form.
   at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)
   at System.IO.Path.InternalGetDirectoryName(String path)
   at RainbowMage.OverlayPlugin.Integration.UnstableNewLogLines..ctor(TinyIoCContainer container)
   at RainbowMage.OverlayPlugin.PluginMain.<<InitPlugin>b__25_3>d.MoveNext()
[12/15/2021 3:43:19 PM] Info: Found enmity memory for 6.0.
SiliconExarch commented 2 years ago

If you add the following line to OverlayPlugin.dll.config between </assemblyBinding> and </runtime> does this resolve the issue?

<AppContextSwitchOverrides value="Switch.System.IO.UseLegacyPathHandling=true"/>

It seems that the path specification was changed in .NET Framework 4.6.2 and this switch reverts to the legacy behaviour, but I'm not sure why it'd be necessary for you since I've never seen the issue myself.

Source

Kyle-B commented 2 years ago

I ended up building a new computer recently, and haven't seen this issue since. Going to close for now. If I hit it again, I'll test out that setting and reactivate.