From FIFE development wiki
Jump to: navigation, search


This article is focused on how to set up a debugger on the platform of your choice to debug FIFE.



First, to load our python client into gdb:

gdb --args python

Next, run the client.


Try to reproduce the bug / event that is causing segmentation fault / crashes in the game. The debugger will stop when the program exits due to the segfault. Enter


to see where the fault is occuring in the source code. If you have no listings, probably you didn't compile the engine with debugging enabled. Check the source code and trace back where the fault is occuring. Many times segfaults are caused by problems with pointers, e.g. dereferencing undefined pointer, freeing an already freed pointer, or buffer overrunning the pointer size.

Usually you can use gdb's 'watch' feature, or use printf/cout debugging to check if the pointers invalid.

If you are not confident about finding the cause in the source code, please send the backtrace ( 'where' listing ) to a developer so he can help you squish the bug instead.

This howto should apply to platforms other than linux too.




gdb 6.6


Comes with the Win32 compile SDK.

See the Creating a custom python debug library for mingw page for more information on how to get a working debug version of FIFE compiled.

Command line

gdb --args python

(should crash now)


For more details, see the Linux paragraph above. The vast majority of the information listed there applies to debugging via gdb under win32 as well.

MSVC 2005 SP1