roflmuffin / CounterStrikeSharp

CounterStrikeSharp allows you to write server plugins in C# for Counter-Strike 2/Source2/CS2
https://docs.cssharp.dev
Other
714 stars 111 forks source link

There is a bug in the hot overload of the overlay plugin #420

Open Nianmou opened 2 months ago

Nianmou commented 2 months ago

08:47:53 [EROR] (cssharp:Core) Error invoking callback System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.BadImageFormatException: Bad IL format. at System.Runtime.Loader.AssemblyLoadContext.InternalLoad(ReadOnlySpan1 arrAssembly, ReadOnlySpan1 arrSymbols) at System.Runtime.Loader.AssemblyLoadContext.LoadFromStream(Stream assembly, Stream assemblySymbols) at McMaster.NETCore.Plugins.Loader.ManagedLoadContext.LoadAssemblyFromFilePath(String path) at McMaster.NETCore.Plugins.PluginLoader.LoadDefaultAssembly() at CounterStrikeSharp.API.Core.Plugin.PluginContext.Load(Boolean hotReload) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 126 at CounterStrikeSharp.API.Core.Plugin.PluginContext.<>c__DisplayClass29_0.<OnReloadedAsync>b__0() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/Plugin/PluginContext.cs:line 113 at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor) at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) --- End of inner exception stack trace --- at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr) at System.Delegate.DynamicInvokeImpl(Object[] args) at CounterStrikeSharp.API.Core.FunctionReference.<CreateWrappedCallback>b__18_0(fxScriptContext* context) in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Core/FunctionReference.cs:line 100 36.028558 UNEXPECTED LONG FRAME DETECTED: 28.44ms elapsed, 28.11ms sim time, 1 ticks, 2389..2389.

roflmuffin commented 2 months ago

Can you provide some more information, what is the Overlay Plugin?

github-actions[bot] commented 2 months ago

This issue has been marked needs-author-action and may be missing some important information.

Nianmou commented 2 months ago

It may be an issue with the translator, but I want to express that when I try to overwrite the plugin and reload it, it may report an error

您能否提供更多信息,什么是 Overlay 插件?

It may be an issue with the translator, but I want to express that when I try to overwrite the plugin and reload it, it may report an error