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

Segfault when trying to start new game #18

Open
muellermartin opened this issue Dec 18, 2018 · 4 comments
Open

Segfault when trying to start new game #18

muellermartin opened this issue Dec 18, 2018 · 4 comments

Comments

@muellermartin
Copy link

muellermartin commented Dec 18, 2018

I've just installed bastet via Homebrew on macOS (brew install bastet) and whenever I want to start a new game (normal or harder version) the game crashes with a segmentation fault (Segmentation fault: 11).

bastet: 0.43.2
boost: 1.68.0
macOS: 10.13.6

Edit: I've attached a core dump to ease debugging: bastet_2018-12-18-160559.crash

@fph
Copy link
Owner

fph commented Dec 19, 2018

Thanks for the report and the core dump! I'll take a look

@fph
Copy link
Owner

fph commented Dec 19, 2018

So the initial menu to choose the game type works correctly, do you confirm it? Which terminal are you playing in? I suspect it may be a sizing issue; could you try resizing the terminal to a very large size (full-screen or almost) and check if it works this time?

@muellermartin
Copy link
Author

muellermartin commented Dec 19, 2018

Right, the initial menu worked correctly and I could move the selection. I'm using the macOS default terminal (Terminal.app Version 2.8.3 (404.1)).
Apparently it was really a sizing issue. I changed the size by maximizing the window and then I could start a new game and play the game. Funnily after that it now also works when I restore the default small window size (80x24).

@fph
Copy link
Owner

fph commented Dec 19, 2018

Thanks, this is useful information to debug this issue. On my Linux machine, the game does not display the play window at all if the terminal has 23 or fewer columns, but I cannot reproduce the segfault. I wonder if for some reason on the mac terminal the available display real estate is 23 rows instead of 24; this would explain something more.

In any case, it's clear that the no.1 problem is that I need to handle better in my code the case in which the terminal is too small.

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

2 participants