fph / bastet

Evil falling block game. http://fph.altervista.org/prog/bastet.html
GNU General Public License v3.0
272 stars 35 forks source link

Segfault when trying to start new game #18

Open muellermartin opened 5 years ago

muellermartin commented 5 years ago

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 commented 5 years ago

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

fph commented 5 years ago

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 commented 5 years ago

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 commented 5 years ago

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.