DevTools:Program Crash

From CrossWire Bible Society
Revision as of 09:24, 30 January 2008 by Osk (talk | contribs) (grammar/capitalization)

Jump to: navigation, search

If, while using a tool from Sword to work on a module like osis2mod, it crashs, displaying 'Segmentation fault (core dumped)',

  1. Run ldd on your binary (ldd /usr/bin/osis2mod) and post the output. Use 'type osis2mod' if you don't know where osis2mod is installed.
  2. Run the program with strace to reproduce the problem (strace -o /tmp/osis2mod.strace osis2mod [arg1] [...]). Don't post the output file (/tmp/osis2mod.strace) in the list as it will probably be huge, but use a free online service (like http://pastebin.com/ or if you can read french http://dl.free.fr/). This file will display any system call and answer, allowing us to see I/O errors and things like that.
  3. Run the program with gdb:

gdb osis2mod
(gdb is starting)
run [arg1] [....]
(wait until it crash)
bt

It will produce a backtrace of the stack, allowing us to see where it crashed. Just post the backtrace (bt output) on the list.

If your program is never ending and an output file does not grow (you suspect an endless loop), do the same, but in strace and gdb, hit Ctrl-C to stop it after a few seconds.