As mentioned in the question, I have a segfault in the implementation of Conway’s game of life in gtkmm that I am working on.
It can be found here: https://github.com/sakekasi/game-of-life
The backtrace of the error can be found here: https://gist.github.com/3505525
When I insert print statements in cells_get or create_updated grid, it starts printing, doesn’t produce a segfault and goes on forever without doing anything.
create_updated_gridis accessing cells off the edge of the grid. It’s calling things likecells_get(i+1,j).You need to change your out-of-bounds checks in
cells_getto>=, not>.