Skip to content

UserMessages crash server on Linux CSGO #1296

@kgns

Description

@kgns

Help us help you

  • I have checked that my issue doesn't exist yet.
  • I have tried my absolute best to reduce the problem-space and have provided the absolute smallest test-case possible.
  • I can always reproduce the issue with the provided description below.

Environment

  • Operating System version: Linux (Ubuntu 16.04 host, Ubuntu 18.04 guest [docker container])
  • Game/AppID (with version if applicable): CSGO 730/740
  • Current SourceMod version: -
  • Current SourceMod snapshot: 1.11.0.6570
  • Current Metamod: Source snapshot: 1.11.0-dev+1127

Description

PrintHintText function crashes the server. EndMessage() call after constructing a UserMessage using StartMessageOne("KeyHintText", client) also crashes the server (I have put it commented out in the test case)

#1286 might be related to this since it's also reporting a crash and it works on 6559 but not on 6562.

I have tested every SM release starting from latest going backwards to see on which version this happens. 6559 is the last build that works, starting from 6562 up to 6570 (latest when this issue was opened), every version crashes with the test case.

Problematic Code (or Steps to Reproduce)

#include <sourcemod>

public void OnPluginStart()
{
  RegConsoleCmd("sm_test", CmdTest);
}

public Action CmdTest(int client, int args)
{
  /*
  Handle userMessage = StartMessageOne("KeyHintText", client);

  if (userMessage == INVALID_HANDLE) {
  	return;
  }

  SetGlobalTransTarget(client);

  if (GetFeatureStatus(FeatureType_Native, "GetUserMessageType") == FeatureStatus_Available && GetUserMessageType() == UM_Protobuf)
  {
  	PbAddString(userMessage, "hints", "test");
  }
  else
  {
  	BfWriteByte(userMessage, 1);
  	BfWriteString(userMessage, "test");
  }

  EndMessage();
  */
  PrintHintText(client, "");
  return Plugin_Handled;
}

Logs

  • Please attach in separate files: game output, library logs, kernel logs, and any other supporting information.
  • In case of a crash, please attach minidump or dump analyze output.

https://crash.limetech.org/l2ju7sqqgduv
https://crash.limetech.org/sozbhg3ifbro
https://crash.limetech.org/nqtggxt45b2g

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions