Desura Gamers : : The unofficial community group for gamers and modders alike that are part of the Desura network.

Report content RSS feed Debugging Linux Issues

When running into issues with the linux client and you want to go that extra step to help out

Posted by lodle on Nov 20th, 2011
Basic QA/Testing.

Almost all linux distros come with an inbuilt debugging tool called gdb which can be used when programs are misbehaving and help the developers to work out whats causing the issue. Follow these steps to generate more information about the issues your having.

1. The first step is to run desura via the terminal. This allows collection of extra output produced by desura and the games it launches.

  • Open terminal (normally located in the System Tool menu or Accessory Menu)
  • Change into the desura install directory using the cd command for example: cd ~/desura
  • Run desura: ./desura

2. If the output of step 1 didnt help you with the issue the next stage is to attach gdb

  • Follow stage one but before you login:
  • In a new terminal tab/window execute this command: ps -a
  • Use this command to launch gdb with the pid of the second Desura process: sudo gdb attach [pid]
  • When gdb starts and shows its prompt type in continue to get desura to resume working

This should allow you to run Desura and continue your activity.

3.a. If Desura crashes:

  • After completing stage two run Desura till it crashes
  • In the gdb window it should pause on the thread that caused the crash and execute the following commands:
    backtrace 10
    info threads
  • Copy paste output to a new forum thread

3.b. If Desura hangs or becomes unresponsive:

  • After completing stage two run Desura till it exhibits the wrong behaviour
  • Switch back to the gdb window and hit ctrl c and execute the following commands:
    info threads
    thread apply all backtrace 15
  • Copy paste output to a new forum thread

4. Advanced: Creating a gdb core dump

  • If more information is required by the Desura developers you can create a core dump
  • Follow step 3.a or 3.b
  • In the gdb window type in: generate-core-file
  • Compress and email the file to
Post comment Comments
gmh_michael Nov 20 2011 says:

very well written tutorial. will be sharing.

+3 votes     reply to comment
Urfoex Nov 21 2011 says:

"In a new terminal tab/window execute this command: ps -a"
With "pgrep -f desura" there will only be the pids of desura.

"Use this command to launch gdb with the pid of the second Desura process: sudo gdb attach [pid]"
Why using it as root? It should work as normal user.
Biggest problem I see is that desura is a release-build without debugging symbols. So most stuff will be something like:
"0x0000000000000000 in ?? ()"

For the hole stuff a script could be written:
# (! no guaranty if that works !)

# get newest pid of running desura
pidNewest=pgrep -fn desura
# get oldest pid of running desura
pidOldest=pgrep -fo desura

# create gdb cmd-arguments
dbgcmds="backtrace 10 info threads quit"
dbgcmdsmore="info threads thread apply all backtrace 15 quit"
dbgcmdscoredump="generate-core-file quit"

# put arguments in files
echo $dbgcmds > dbg.1
echo $dbgcmdsmore > dbg.2
echo $dbgcmdscoredump > dbg.3

# attach gdb, run arguments, save as log-file
gdb attach pidNewest -batch -x dbg.1 > newest.dbg1.log
gdb attach pidNewest -batch -x dbg.2 > newest.dbg2.log
gdb attach pidNewest -batch -x dbg.3 > newest.dbg3.log
gdb attach pidOldest -batch -x dbg.1 > oldest.dbg1.log
gdb attach pidOldest -batch -x dbg.2 > oldest.dbg2.log
gdb attach pidOldest -batch -x dbg.3 > oldest.dbg3.log

# remove argument-files
rm dbg.1
rm dbg.2
rm dbg.3

+3 votes     reply to comment
hero1900 Nov 21 2011 says:

what this suppose to mean "Follow stage one but before you login:"
i tried that and i got that the program is not running i attach to the second process id and i was checking th box for automatic log in but then i disable it and rerun the whole process and i didnt log in and also same result the program is not being run, so any help?

+2 votes     reply to comment
hero1900 Nov 21 2011 says:

okey i got it need to put the process id without the [ ]

+2 votes     reply to comment
top4ek Dec 8 2011 says:

sent a stacktrace with coredump a almost month ago and nothig.

+2 votes     reply to comment
liamdawe Dec 14 2011 says:

It seems lodle is off on holidays at the moment, there was a post about it, work should resume in January :(

+2 votes     reply to comment
jorlin Dec 19 2011 says:

If desura would have a good and accesible log system, most of the times the finnicky backtrace/ gdb stuff would not be neccessary. Decent Linux programs log errors to stdout. I have had numerous crashes of the desura client when running it from a virtual terminal screen, without a single error message on stdout...
If desura would improve on that, error reporting would become more accessible for the average Joe.
Not all people running linux are tech. savvy. I support many people remotely that run a linux distro strictly as user. Some of them are gamers.

+4 votes     reply to comment
malkien Dec 23 2011 replied:

may I second that?
I have the x64 client consistently crash on game update.
what I do with other applications in this case is run them from a shell, or follow the tail of a log file if there is one, to see what they report.
why not doing the same with desura?

+2 votes     reply to comment
irekpias Feb 5 2012 says:

I have Fedora 16 x86_64 - try run desura, i have pop-up window - type my login, password and desura quits to the terminal back. I can't start it any way. What deps should my system have, to run desura whitout a glitch ?

+2 votes     reply to comment
Post a comment

You are not logged in, your comment will be anonymous unless you join the community. Or sign in with your social account:

Oct 25, 2010
Open to all members
Send Message
Join this group
Group watch
Start tracking
Related Groups
Desura Entertainment & Press with 10,125 members
Desura Gamers
Desura Gamers Hobbies & Interests with 246 members
Desura SDK
Desura SDK Entertainment & Press with 176 members