DevTools:Program Crash

From CrossWire Bible Society
Revision as of 09:05, 30 January 2008 by Skc (Talk | contribs) (How to produce usefull informations about the crash)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

You're using a tool from sword to work on a module like osis2mod and it crash, 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 huge, but use an free online service (like or if you can read french 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)

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

If your program is never ending and 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.