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

Game gets stuck on exit #660

Open
Dliwk opened this issue Jan 26, 2024 · 1 comment
Open

Game gets stuck on exit #660

Dliwk opened this issue Jan 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@Dliwk
Copy link
Collaborator

Dliwk commented Jan 26, 2024

Description

This blocking fgets call seems to prevent game from gracefully exiting:

char buffer[4096];
char* val = fgets(buffer, sizeof(buffer), stdin);
if (val) {
if (val == std::string("@clear\n")) {

Pressing Ctrl+D (and triggering EOF) allows game to finally shut down.

I didn't find any inter-thread-signal-forwarding logic which could trigger EOF, but this problem didn't exist for me some time ago. 🤷‍♂️

Steps to reproduce

  1. Launch BombSquad
  2. Close BombSquad
  3. Do not press Ctrl+D
  4. ???

Machine

Platform: Fedora Linux 39
Commit: https://github.com/efroemling/ballistica/tree/978f32f9f098bd0ff1dc64b496ec31cf493ded09/

@Dliwk Dliwk added the bug Something isn't working label Jan 26, 2024
@Loup-Garou911XD
Copy link
Contributor

Loup-Garou911XD commented Mar 14, 2024

I can vouch
This is reproducible everytime on my machine(arch Linux)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants