How to get a backtrace - lightspark/lightspark GitHub Wiki

After a crash, the most critical piece of information to get is the stack backtrace, which shows the call sequence that leads to the issue. First of all, make sure you have lightspark's debug symbols installed, either by compiling from source (./build.sh -d), or installing the appropriate debug package for your distribution.

Firefox

You need to temporarily disable out-of-process-plugin execution:

  • Open a new tab in firefox
  • type about:config in the address bar
  • If asked confirm that you know what you are doing
  • Search for dom.ipc.plugins.enabled
  • Double click in the resulting line to toggle the value from true to false
  • Restart firefox

Starting firefox in debugger

Now start firefox from the terminal with the -g option

firefox -g

or run firefox inside a gdb session

gdb --args firefox

and type run and the prompt. When a crash happens the gdb prompt will be available on the terminal. Type bt and post all the output as a bug report on launchpad or pastebin it if it's relevant in a IRC discussion.

Chrome and Chromium

There is no need to disable out-of-process-plugin because Chromium can launch the plugin process inside gdb.

Close all browser windows and restart chromium with

chromium --plugin-launcher='xterm -e gdb --args'

Type run when the prompt appears, and then bt when gdb stop after a crash.

Standalone

If Lightspark crashes when running a file like this:

lightspark <file>.swf

You can get a backtrace of all threads with the following command:

gdb lightspark -ex "set confirm off" -ex "run <file>.swf" -ex "t a a bt" -ex "quit" &> bt.log

Of course, replacing all instaces of <file>.swf with the filename of the swf which causes the crash.

⚠️ **GitHub.com Fallback** ⚠️