244
|
1 .. _debugging:
|
|
2
|
|
3 Debugging Orthanc
|
|
4 =================
|
|
5
|
|
6 If you experience an error within Orthanc (or one of its plugins), that
|
|
7 the troubleshooting sections (cf. :ref:`here <troubleshooting>` and
|
|
8 :ref:`here <dicom>`) do not help, and that you can't provide a robust
|
|
9 way to reproduce your issue by third-party developers, you'll have to
|
|
10 analyze the backtrace of Orthanc.
|
|
11
|
|
12 If you observe a **fatal crash** of Orthanc, where Orthanc stops
|
|
13 abruptly (e.g. by creating a so-called "core dumped" or reporting an
|
|
14 invalid memory access), which rarely occurs, please check the
|
|
15 :ref:`dedicated section <crash>`). The present FAQ entry is rather
|
|
16 about C++ exceptions that are thrown by Orthanc, typically as a
|
|
17 consequence of invalid inputs, and that result in an error message
|
|
18 reported by Orthanc (not in a crash), and for which the :ref:`log
|
|
19 files in verbose mode <log>` do not provide meaningful information.
|
|
20
|
|
21 **Important reminder:** Most issues with Orthanc can be solved by
|
|
22 carefully looking at the :ref:`Orthanc logs <log>` in ``--verbose``
|
|
23 mode!
|
|
24
|
|
25
|
|
26 Any system
|
|
27 ----------
|
|
28
|
|
29 First :ref:`compile Orthanc by yourself <compiling>`, in debug mode by
|
|
30 setting ``-DCMAKE_BUILD_TYPE=Debug`` when invoking CMake.
|
|
31
|
|
32 Then, learn how to use the debugger that is best suited to your
|
|
33 platform (e.g. Microsoft Visual Studio, gdb or Xcode).
|
|
34
|
|
35
|
|
36 GNU/Linux system using gdb
|
|
37 --------------------------
|
|
38
|
|
39 .. highlight:: bash
|
|
40
|
|
41 The Orthanc project provides precompiled debug binaries that can be
|
|
42 run on almost any recent GNU/Linux system (generated thanks to the
|
|
43 `LSB - Linux Standard Base SDK
|
|
44 <https://en.wikipedia.org/wiki/Linux_Standard_Base>`__). This allows
|
|
45 to debug Orthanc without compiling from sources. Here is a sample
|
|
46 debug session::
|
|
47
|
253
|
48 $ wget http://lsb.orthanc-server.com/orthanc/debug/1.5.7/Orthanc
|
244
|
49 $ chmod +x ./Orthanc
|
|
50 $ gdb ./Orthanc Configuration.json
|
|
51 (gdb) catch throw
|
|
52 Catchpoint 1 (throw)
|
|
53 (gdb) run
|
253
|
54 W0513 15:24:42.374349 main.cpp:1436] Orthanc version: 1.5.7
|
244
|
55 ---> Reproduce your error case <---
|
|
56 Thread 15 "Orthanc" hit Catchpoint 1 (exception thrown), 0x00007ffff6de68bd in __cxa_throw () from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
|
57 (gdb) backtrace
|
|
58 #0 0x00007ffff6de68bd in __cxa_throw ()
|
|
59 from /usr/lib/x86_64-linux-gnu/libstdc++.so.6
|
|
60 ...
|
|
61
|
|
62 If you are unable to analyze such a backtrace by yourself, feel free
|
245
|
63 to post your backtrace on the `Orthanc forum
|
244
|
64 <https://groups.google.com/forum/#!forum/orthanc-users>`__.
|
|
65
|
|
66 **Plugins:** Besides the Orthanc core, debug binaries of the official
|
|
67 plugins precompiled using the LSB are also available at the following
|
|
68 locations:
|
|
69
|
|
70 * `Orthanc core <http://lsb.orthanc-server.com/orthanc/debug/>`__
|
|
71 * `DICOMweb plugin <http://lsb.orthanc-server.com/plugin-dicom-web/debug/>`__
|
|
72 * `MySQL plugin <http://lsb.orthanc-server.com/plugin-mysql/debug/>`__
|
|
73 * `Orthanc Web viewer <http://lsb.orthanc-server.com/plugin-webviewer/debug/>`__
|
|
74 * `PostgreSQL plugin <http://lsb.orthanc-server.com/plugin-postgresql/debug/>`__
|
|
75 * `Transfers accelerator plugin <http://lsb.orthanc-server.com/plugin-transfers/debug/>`__
|
|
76 * `Whole-slide imaging <http://lsb.orthanc-server.com/whole-slide-imaging/debug/>`__
|
|
77
|
|
78
|
|
79 Docker
|
|
80 ------
|
|
81
|
|
82 To be written.
|