bastet icon indicating copy to clipboard operation
bastet copied to clipboard

Segfault when trying to start new game

Open muellermartin opened this issue 7 years ago • 4 comments

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

muellermartin avatar Dec 18 '18 15:12 muellermartin

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

fph avatar Dec 19 '18 08:12 fph

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?

fph avatar Dec 19 '18 09:12 fph

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).

muellermartin avatar Dec 19 '18 10:12 muellermartin

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.

fph avatar Dec 19 '18 15:12 fph