Frogatto & Friends

Frogatto sprite

Frogatto & Friends is an action-adventure platformer game, starring a certain quixotic frog.
We're an open-source community project, and welcome contributions!
We also have a very flexible editor and engine you can use to make your own creations.

No more crashing on Windows!

February 22nd, 2010 by Ben

For many months now, the Windows builds have either crashed at random places, or crashed consistently in a particular spot. Yesterday I finally tried out MSVC++’s debugger, and squashed 2 buffer overrun bugs (which consistently crashed the game for me, but no one else). And today I helped Dave fix the bug that had been consistently crashing it for everyone (on Windows). It was another buffer overrun bug – some animations had invalid rectangles defined for their frames. Dave fixed it so it will now fail for everyone when that happens, and give an actual error message about it, saying what’s wrong.

All these errors were undetectable on Mac/Linux, but they were real bugs that were causing undefined behavior. I don’t really like using MSVC++ (I’m used to gcc and XCode), but this does show the value of compiling on many platforms.

Technical stuff aside: we finally have a Windows build that doesn’t crash on the 2nd outside level or the editor! Yay!


2 responses to “No more crashing on Windows!”

  1. Philip says:

    Don’t know if you’ve tried these already, but there’s a couple of things I find helpful for detecting buffer overflow errors with GCC on Linux. Compile with “-fstack-protector-all” to detect some overflows. Compile with “-D_FORTIFY_SOURCE=2” to detect some errors with libc functions. ( has some brief information on these). And run in Valgrind to detect various sorts of memory errors (uninitialised data, memory leaks, heap buffer overflows, etc). Compiling on multiple platforms is always good, but there’s some useful tools when you’re just using GCC.

  2. Ben says:

    Thanks for those tips! We didn’t know about those compiler flags.