Strive for 105

(Sorry, deleted the original message so I can’t reply to it - I’m a little
obsessed with keeping my inbox clean)

(Also – is the mailing list archive only updated at the end of every month?
It would be really nice if it were more up-to-date … :wink:

Anyway, just some quick feedback on this game - mostly to say that it’s
quite nice :slight_smile:

Only problem I had was that it segfaulted on exit. I traced this to a few
problems with your game cleanup - the relevant code being:

deleteImages();
SDL_FreeSurface(screen);
TTF_CloseFont(font);
TTF_Quit();
SDL_Quit();
exit(0);
}

deleteImages() is fine (I assume), that’s just here to give context :wink:

You don’t need to free the display surface. I’m not sure what effect doing
it actually has, though…?

TTF_CloseFont() is good…

TTF_Quit() causes a crash; not this one though, but when you initialised the
TTF library, you set an atexit handler to call TTF_Quit. So when you hit that
exit(0) statement, it gets called - again. This causes a segfault in
TT_Get_Font_Data().

The same problem exists with SDL_Quit(), probably.

Anyway, commenting out those there lines results in a clean exit for me.

Nice job on the game though :-)–
Mike.

Thanks for the feedback! That is just the kind of stuff I was looking
for :slight_smile:

Mike wrote:>(Sorry, deleted the original message so I can’t reply to it - I’m a little

obsessed with keeping my inbox clean)

(Also – is the mailing list archive only updated at the end of every month?
It would be really nice if it were more up-to-date … :wink:

Anyway, just some quick feedback on this game - mostly to say that it’s
quite nice :slight_smile:

Only problem I had was that it segfaulted on exit. I traced this to a few
problems with your game cleanup - the relevant code being:

deleteImages();
SDL_FreeSurface(screen);
TTF_CloseFont(font);
TTF_Quit();
SDL_Quit();
exit(0);
}

deleteImages() is fine (I assume), that’s just here to give context :wink:

You don’t need to free the display surface. I’m not sure what effect doing
it actually has, though…?

TTF_CloseFont() is good…

TTF_Quit() causes a crash; not this one though, but when you initialised the
TTF library, you set an atexit handler to call TTF_Quit. So when you hit that
exit(0) statement, it gets called - again. This causes a segfault in
TT_Get_Font_Data().

The same problem exists with SDL_Quit(), probably.

Anyway, commenting out those there lines results in a clean exit for me.

Nice job on the game though :slight_smile: