roflmuffin / CounterStrikeSharp

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

crash server #326

Closed ezekutor closed 8 months ago

ezekutor commented 9 months ago
Unhandled exception. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at System.Runtime.InteropServices.Marshal.ReadInt32(IntPtr ptr, Int32 ofs)
   at CounterStrikeSharp.API.Modules.Utils.CHandle`1.get_IsValid() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Utils/CHandle.cs:line 56
   at ServerInfo.ServerInfo.IsPlayerValid(CCSPlayerController player)
   at ServerInfo.ServerInfo.UpdatePlayerInfoAsync()
   at ServerInfo.ServerInfo.<OnRoundStart>b__59_1()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
Using breakpad crash handler
KillStr3aK commented 9 months ago

seems to be related to ServerInfo

ezekutor commented 9 months ago

кажется, связано сServerInfo

Ok

rogfish commented 9 months ago

Updating seems to remove Game csgo/addons/metamod from gameinfo.gi and re-adding it breaks the server.

ezekutor commented 9 months ago

Обновление, похоже, удаляет Game csgo/addons/metamodиз gameinfo.gi, а повторное добавление приводит к поломке сервера.

it happened a few hours after the update, when online on 22/32. I don't think that's the reason.

github-actions[bot] commented 9 months ago

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

ALegitCookie commented 9 months ago
Unhandled exception. System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
   at System.Runtime.InteropServices.Marshal.ReadInt32(IntPtr ptr, Int32 ofs)
   at CounterStrikeSharp.API.Modules.Utils.CHandle`1.get_IsValid() in /home/runner/work/CounterStrikeSharp/CounterStrikeSharp/managed/CounterStrikeSharp.API/Modules/Utils/CHandle.cs:line 56
   at ServerInfo.ServerInfo.IsPlayerValid(CCSPlayerController player)
   at ServerInfo.ServerInfo.UpdatePlayerInfoAsync()
   at ServerInfo.ServerInfo.<OnRoundStart>b__59_1()
   at System.Threading.Tasks.Task.<>c.<ThrowAsync>b__128_1(Object state)
   at System.Threading.QueueUserWorkItemCallback.Execute()
   at System.Threading.ThreadPoolWorkQueue.Dispatch()
   at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart()
Using breakpad crash handler

I was having this same problem and I think I either fixed it by doing a complete fresh install of cs2 server and cssharp, or I think I just updated cssharp and it started working. was rly random

github-actions[bot] commented 8 months ago

This issue has been automatically marked no-recent-activity because it has not had any activity for 14 days. It will be closed if no further activity occurs within 14 more days. Any new comment (by anyone, not necessarily the author) will remove no-recent-activity.