b2fbcdd5b400a673bead308ba37e157fbacdc316
[platform/upstream/gstreamer.git] / docs / faq / troubleshooting.xml
1 <sect1 id="chapter-troubleshooting">
2   <title id="title-troubleshooting">Troubleshooting GStreamer</title>
3   <qandaset>
4
5     <qandaentry>
6       <question id="troubleshooting-missing-plug-in">
7         <para>
8 Some application is telling me that I am missing a plug-in.  What do I do ?
9         </para>
10       </question>
11
12       <answer>
13         <para>
14 Well, start by checking if you really are missing the plug-in.
15   <programlisting>
16 gst-inspect (plug-in)
17   </programlisting>
18 and replace (plug-in) with the plug-in you think is missing.
19 If this doesn't return any result, then you either don't have it or your
20 registry cannot find it.
21         </para>
22         <para>
23 If you're not sure either way, then chances are good that you don't have
24 it.  You should get the plug-in and run gst-register to register it.
25 How to get the plug-in depends on your distribution.
26 <itemizedlist>
27 <listitem>if you run GStreamer using packages for your distribution, you
28 should check what packages are available for your distribution and see
29 if any of the available packages contains the plug-in.
30 </listitem>
31 <listitem>if you run GStreamer from a source install, there's a good chance
32 the plug-in didn't get built because you are missing an external library.
33 When you ran configure, you should have gotten output of what plug-ins are
34 going to be built.  You can re-run configure to see if it's there.
35 If it isn't, there is a good reason why it is not getting built.
36 The most likely is that you're missing the library you need for it.
37 Check the README file in gst-plugins to see what library you need.
38 Make sure to remember to re-run configure after installing the supporting
39 library !
40 </listitem>
41 <listitem>
42 if you run GStreamer from CVS, the same logic applies as for a source install.
43 Go over the reasons why the plug-in didn't get configured for build.
44 Check output of config.log for a clue as to why it doesn't get built if
45 you're sure you have the library needed installed in a sane place.
46 </listitem>
47 </itemizedlist>
48
49         </para>
50       </answer>
51      </qandaentry>
52
53      <qandaentry>
54       <question id="troubleshooting-old-plug-ins">
55         <para>
56 I get an error that says something like
57
58 (process:26626): GLib-GObject-WARNING **: specified instance size for type 
59 `DVDReadSrc' is smaller than the parent type's `GstElement' instance size
60 What's  wrong ?
61         </para>
62       </question>
63
64       <answer>
65       </answer>
66     </qandaentry>
67
68     <qandaentry>
69       <question id="troubleshooting-segfault">
70         <para>
71 The GStreamer application I used stops with a segmentation fault.  What can
72 I do ?
73         </para>
74       </question>
75
76       <answer>
77         <para>
78 There are two things you can do.  If you compiled GStreamer with specific
79 optimization compilation flags, you should try recompiling GStreamer,
80 the application and the plug-ins without any optimization flags.  This allows
81 you to verify if the problem is due to optimization or due to bad code.
82 Second, it will also allow you to provide a reasonable backtrace in case
83 the segmentation fault still occurs.
84         </para>
85         <para>
86 The second thing you can do is look at the backtrace to get an idea of where
87 things are going wrong, or give us an idea of what is going wrong.
88 To provide a backtrace, you should
89 <orderedlist>
90 <listitem>
91   run the application in gdb by starting it with
92   <programlisting>
93     gdb (gst-application)
94   </programlisting>
95   (If the application is in a source tree instead of installed on the system,
96   you might want to put "libtool" before "gdb")
97 </listitem>
98 <listitem>
99   Pass on the command line arguments to the application by typing
100   <programlisting>
101     set args (the arguments to the application)
102   </programlisting>
103   at the (gdb) prompt
104 </listitem>
105 <listitem>
106   Type "run" at the (gdb) prompt and wait for the application to
107   segfault.  The application will run a lot slower, however.
108 </listitem>
109 <listitem>
110   After the segfault, type "bt" to get a backtrace.  This is a stack of
111   function calls detailing the path from main () to where the code is
112   currently at.
113 </listitem>
114 <listitem>
115   If the application you're trying to debug contains threads, it is also
116   useful to do
117   <programlisting>
118     info threads
119   </programlisting>
120   and get backtraces of all of the threads involved, by switching to
121   a different thread using "thread (number)" and then again requesting
122   a backtrace using "bt".
123 </listitem>
124 <listitem>
125   <para>
126   If you can't or don't want to work out the problem yourself, a copy and paste
127   of all this information should be included in your 
128   <link linkend="using-bugs-where">bug report</link>.
129   </para>
130 </listitem>
131 </orderedlist>
132         </para>
133       </answer>
134     </qandaentry>
135
136     <qandaentry>
137       <question id="troubleshooting-wiki">
138         <para>
139 I'm having problems building or installing GStreamer. What should I do ?
140         </para>
141       </question>
142
143       <answer>
144         <para>
145 We've started a step-by-step 
146 <ulink url="http://gstreamer.net/wiki/?DichotomousKey">
147 troubleshooting guide</ulink>. 
148 Look there before asking, your problem might already have been solved by 
149 someone else.
150         </para>
151       </answer>
152     </qandaentry>
153
154   </qandaset>
155 </sect1>