Difference between revisions of "DevTools:Program Crash"

From CrossWire Bible Society
Jump to: navigation, search
m (grammar/capitalization)
 
(4 intermediate revisions by 3 users not shown)
Line 1: Line 1:
If, while using a tool from Sword to work on a module like <code>osis2mod</code>, it crashs, displaying '<code>Segmentation fault (core dumped)</code>',  
+
If, while using a tool from SWORD to work on a module like <code>[[osis2mod]]</code>, it crashs, displaying '<code>Segmentation fault (core dumped)</code>',  
  
 
# Run <code>ldd</code> on your binary (<code>ldd /usr/bin/osis2mod</code>) and post the output. Use '<code>type osis2mod</code>' if you don't know where <code>osis2mod</code> is installed.
 
# Run <code>ldd</code> on your binary (<code>ldd /usr/bin/osis2mod</code>) and post the output. Use '<code>type osis2mod</code>' if you don't know where <code>osis2mod</code> is installed.
Line 14: Line 14:
  
 
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.
 
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.
 +
 +
[[Category:Support]]

Latest revision as of 21:57, 8 January 2018

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.