How can I create useful bug report when DC++ become unresponsive (freezes)?

Created by eMTee on
freeze unresponsive
Last updated by:
eMTee on

If you encounter freezes with DC++ you can make an useful addition to your bug report with following procedure:

Debugging application freezes (with 100% CPU load on one or more cores)

Here is how to get the stack trace of a bugged thread from a DC++ official releaase, using GDB (GNU Debugger):

- install GDB (if you don't have it already) by using the download button on <> and running a regular MinGW install.
- install Process Explorer from SysInternals <>
- start DC++ and reproduce/wait for the freeze
- when it become frozen find the DC++ process and its <process id> using Process Explorer. Then double click the process, select the Thread tab and note the <thread id>(s) of bugged thread(s) - bugged are those that show constant high cpu usage.
- convert the <thread id> number from decimal to hexadecimal (eg using the Windows Calculator or one of the online converting services like the one at <>). So for example, the decimal 1708 becomes 6ac in hexadecimal.
- open a command prompt (Win-key + R; type "cmd").
- use cd commands to go to the DC++ directory.
- add GDB.exe to the path, type: PATH=C:\MinGW\bin;%PATH% (or copy gdb.exe from MinGW binaries to the DC++ folder)
- in the command prompt type: gdb -e DCPlusPlus.exe -s DCPlusPlus.pdb
- wait for GDB to run, it'll show its own prompt: (gdb)
- within the gdb prompt, attach to the running process with: attach <id> (replace "id" by the <process id> found above).
- within the gdb prompt, find the index of the bugged thread with typeing: thread find <id> (replace "id" by the hexadecimal <thread id> found above - make sure it contains lower-case letters only).
GDB will write: "Thread <thread index> has target id 'Thread [process id].0x[hex thread id]'"
- get the stack trace of the bugged thread using: thread apply <index> bt full (replace "index" by the <thread index> number GDB has just printed in the previous line).
- add the output to your report

In case there aren't any thread with 100% cpu usage then skip the steps finding the thread index and after attaching the debugger to the <process id>, simply type: "thread apply all bt full" and add the output to your bug report.

Good luck!