Skip to content

[BUG] AccessViolation when accessing the same events as CSSharp #132

@Porcellacion

Description

@Porcellacion

SwiftlyS2 Version

latest

Game

Counter-Strike 2

Operating System

Linux

Bug Description

I have a CSSharp plugin that is using onTick, then I have a swiftly plugin that also uses onTick, but I get Accessviolation and the server crashes when I add the swiftly plugin as CSSharp is already using the onTick.

Would be nice if we could combine CSSharp and Swiftly here as there are a lot of CSSharp plugins I can't give up

Steps to Reproduce

  1. Add a CSSharp plugin that is using onTick such as MenuManager
  2. Add a swiftly plugin that also uses ontick.
  3. Server crash

Expected Behavior

I would expect it not to crash.

Actual Behavior

Server crashes.

Logs/Console Output

Nov 26 14:50:24:  L 11/26/2025 - 14:50:24: World triggered "Match_Start" on "de_dust2"
Nov 26 14:50:24:  Fatal error.
Nov 26 14:50:24:  System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.
Nov 26 14:50:24:     at SwiftlyS2.Core.Extensions.PtrExtensions.Read[[System.IntPtr, System.Private.CoreLib, Version=10.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]](IntPtr, IntPtr)
Nov 26 14:50:24:     at SwiftlyS2.Core.SchemaDefinitions.CBodyComponentImpl.get_SceneNode()
Nov 26 14:50:24:     at SwiftlyS2.Core.SchemaDefinitions.CBaseEntityImpl.get_AbsOrigin()*
Nov 26 14:50:24:  --- SERVER EXITED ---

Plugin Information

No response

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions