Debugging Ekiga

From Ekiga

Jump to: navigation, search

If Ekiga doesn't operate as expected or crashes, the debug output helps enormously to understand what is the problem. There are two debug outputs: one is for ekiga internals, and another one is the classical gdb output.

Contents

image:48-Tux.png Debugging Ekiga on Linux

How to get a debug output

This output shows information about ekiga while running (for crashes see the next section). Run ekiga with the following arguments:

ekiga -d 4 2>output.txt

The output.txt file contains the debug output of ekiga you need to send us (see below for how to send it).

image:Gnome-status.png The following information is found in the output file: your IP address, the username and the registrar for all your active SIP accounts (but not the associated passwords), name of your sound and video card, the active audio and video codecs, and other minor information.
image:Gnome-status.png If you wish to analyse this file yourself, there is a small script which can help: it shows from this file only the packets exchanged.

How to get a stack backtrace from a crash or freeze

This stack backtrace is needed only when ekiga crashes or when ekiga freezes.

Pre-requisites

image:Emblem-important.png First, you need to install the GNU Project Debugger gdb.
  • If you use packages from your gnu/linux distribution, then you need to install debug packages for ptlib, opal and ekiga, whose name end generally in -dbg or -dbgsym, such as libpt-...-dbg (e.g. for ubuntu read DebuggingProgramCrash). These debug packages are additional packages that do not affect your existing program, but provide extra information (debugging symbols) needed by developers. This makes it a lot easier to find the exact place in the program code where that problem occurs, and to fix it.
  • If you have compiled ptlib, opal and ekiga yourself, you have nothing to do (by default, compilation is with debug symbols).

Getting the stack backtrace

In a terminal, type:

$ gdb ekiga 2>&1 | tee gdb-ekiga.txt
(gdb) run

Note: it's better to enable debug output in the same time. You can start ekiga in a new terminal like this:

$ gdb --args ekiga -d 4 2>&1 | tee gdb-ekiga.txt
(gdb) run

Now Ekiga should run normally. Perform the action you did to make it crash, then go back to the terminal window and you should see something like SIGSEGV at... If Ekiga freeze, go back to the terminal window and hit CTRL-C.

At this stage type:

(gdb) thread apply all bt
(gdb) quit

The file gdb-ekiga.txt has the backtrace you need to send us (see below for how to send it).

image:Windows.png Debugging Ekiga on Windows

How to get a debug output

Open a command terminal, go to the directory where Ekiga has been installed (using cd command) and run ekiga like this:

ekiga.exe -d 4

An alternative solution is to change the path in the Ekiga icon from ekiga.exe to ekiga.exe -d 4, and execute it.

In both cases, the output containing Ekiga traces is put in ekiga-stderr.txt on the Desktop. Send us this file (see below for how to send it).

How to get a stack backtrace from a crash

Pre-requisities

In order to see the backtraces produced by ekiga you need to install 3 packages. The order is very important:

  1. Download and Install Mingw from that URL: http://downloads.sourceforge.net/mingw/MinGW-3.1.0-1.exe?modtime=1063565593&big_mirror=1
  2. Download and Install the GNU Project Debugger GDB from that url: http://downloads.sourceforge.net/mingw/gdb-5.2.1-1.exe?modtime=1045398993&big_mirror=1
  3. Download and Install a Minimal SYStem MSYS from that url: http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1

Once MSYS is installed, it offers a bash shell for Windows users. Ekiga has to be copied to a directory accessable from MSYS, e.g.

C:\msys\1.0\home\user

Getting the stack backtrace

Start MSYS and go to the directory you just copied Ekiga to. Note that the MSYS root directory will be the directory where MSYS is installed (in this case C:\msys\1.0).

cd home/user/ekiga
gdb ekiga.exe
(gdb) run

Now Ekiga should run normally.

Perform the action you did to make it crash than go back to the previous msys window and you should see something like SIGSEGV at...

At this stage type thread apply all bt then press "Enter" and send us the display (see below for how to send it).

How to break the execution of Ekiga

Due to different handling of CTRL-C on windows pressing it during the execution of Ekiga in gdb unfortunately exits both the application and gdb as well. A workaround is to use the following app to send a "break signal" to the Ekiga app like described here

 http://cygwin.com/ml/cygwin/2006-06/msg00361.html

using the debugbreak.c application listed at that post.

Sending the data to us

If the output is greater than about 35KB, then:

  • either compress it (gzip output),
  • or copy it on an Internet site like http://pastebin.ca/ (and give us the link)

After that, send us the output and add a description of the actions you performed to crash Ekiga.

External links

Personal tools