Get a backtrace (bt command in gdb). Oh, and make sure the application is compiled in debug mode.