Skip to content

CS:S - broken Event keyvalues (crashes in @Event) #536

Open

Description

@kirrm

The 2026-09-16 update seems to have broken Event.variables KeyValues object

Event.variables.name works fine, but trying to access actual keyvalues data either returns default values or crashes:

@Event('player_death')
def _player_death(ev):
    print(f"{ev.variables.name=}")
    print(f"{ev.variables.get_int('userid')=}")  # Crash


@Event('player_spawn')
def _player_spawn(ev):
    print(f"{ev.variables.name=}")
    print(f"{ev.variables.get_int('userid')=}")  # returns default (0)

As such, trying to access Event variables without Event's own getter method (get_int, get_sting etc) will lead to either crashes or KeyErrors:

@Event('player_death')
def _player_death(ev):
    ev['userid']  # Crash

The workaround is using Event's own getter methods:

@Event('player_death')
def _player_death(ev):
    ev.get_int('userid')  # Works

Activity

  1. CookStar commented on Sep 19, 2026

    @CookStar
    Contributor

    This issue seems to occur only on the CS:S x86 architecture.
    While this specific issue is due to an unknown member variable being added to KeyValues, it is unclear whether other changes from TF2 have been backported to CS:S.

    I've added a fix for the Windows version, so if you're able to test it, please do so.

    kv_fix.zip

  2. CookStar commented on Sep 19, 2026

    @CookStar
    Contributor

    it is unclear whether other changes from TF2 have been backported to CS:S.

    Well, it does. However, it doesn't seem to be an addition in this update, so it probably won't have any impact.

  3. CookStar commented on Sep 20, 2026

    @CookStar
    Contributor

    hl2sdk has been fixed, so #537 should resolve the issue. If you're able to compile it, please do so.

  4. srpg commented on Sep 20, 2026

    @srpg
    Contributor

    Here is the Compiled CSS Build including Windows and Linux binaries with the #537 fix, built against the latest SDK.
    Also it includes my #535 updated data

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions