Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[GoldSrc] Assertion Failure When Copying Selected Console Text #3896

Open
0Ky opened this issue Feb 9, 2025 · 0 comments
Open

[GoldSrc] Assertion Failure When Copying Selected Console Text #3896

0Ky opened this issue Feb 9, 2025 · 0 comments

Comments

@0Ky
Copy link

0Ky commented Feb 9, 2025

An assertion failure occurs when copying selected console text after new text is populated, causing the selected text to be pushed out of the console buffer.

This happens when enough lines have been added to the console, either organically in a multiplayer server or for reproducibility, using a command that outputs many lines of text, such as gl_dump, so that the oldest lines are removed to make space for new ones. If a user selects all text (CTRL + A), then additional text is added, the newly populated text becomes highlighted. However, the original selection (which is no longer visible) is still considered selected. Pressing CTRL + C in this state triggers an assertion failure.

Steps to Reproduce

  1. Populate the console with enough lines of text until older lines begin to be removed. This can happen naturally in a busy multiplayer server or for reproducibility, using a command that outputs many lines of text, such as gl_dump.
  2. Select all text in the console using CTRL + A.
  3. Populate more text in the console, causing the original selected text to be pushed out of the buffer and no longer visible.
  4. Observe that the newly added text is highlighted.
  5. Press CTRL + C.

Expected Behavior

If new text pushes the previously selected text out of the console buffer, the selection should be automatically cleared to prevent an invalid index access. Attempting to copy (CTRL + C) should either do nothing or copy only the newly visible text, but it should not cause an assertion failure.

Actual Behavior

An assertion failure occurs with the following message:

Image

Clicking the "Ignore" button causes the error message to reappear, forcing the player to select "Abort", which in turn terminates the Half-Life 1 process.

Video Demo

HL25_Assert_Fail.mp4

Assumption / Possible Cause

The crash likely occurs because the selection state does not update when older lines are removed from the console buffer. When CTRL + A is used, the game remembers the selection even after the selected text is no longer valid. Pressing CTRL + C then tries to access an invalid index, triggering the assertion failure.

Environment

  • Tested Game: Half-Life 1 (build 10210)
  • Affected Games: All GoldSrc games (25th Anniversary)
  • Platform: Windows 11 Pro x64
  • Reproducibility: Consistent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant