1 \chapter{Troubleshooting and Help}%
2 \label{cha:troubleshooting_help}
4 You can report potential problems, bugs, and crashes to the \CGG{} website at:
6 \begin{center}
7         \href{https://www.cinelerra-gg.org/}{https://www.cinelerra-gg.org}
8 \end{center}
10 Here you can log the problem into the MantisBT bugtracker, or use the forum Q\&A for help from other users, or email the
11 problem using the address:{\small \href{mailto:cin@lists.cinelerra-gg.org}{cin@lists.cinelerra-gg.org}} It is usually more
12 helpful if instead of starting \CGG{} from its application icon, start from a window so that if there are error
13 messages related to the problem, they can be captured from the screen and emailed or logged. The command to run
14 from a window is: \texttt{<directory\_path of where you installed cinelerra>/bin/cin} -- for example if
15 installed in \texttt{/mnt0/build5/cinelerra-5.1}, you would execute the following command to start the program:\\
16 \texttt{/mnt0/build5/cinelerra-5.1/bin/cin} \\
17 The problem you are experiencing may be as simple as an error due to the settings in your \texttt{\$HOME/.bcast5} subdirectory so you may want to first rename your current \texttt{.bcast5} in order to start with default settings. By renaming the directory instead of deleting it, you will be able to put it back and not lose all of your preferences. 19 However, there are some easy things to do to fix errors that may have resulted from media problems, 20 computer problems, or operational missteps so you can proceed without having to wait for help. These 21 are outlined in \ref{cha:when_things_go_wrong} - be sure to read down through 22 \textit{Common Problems} where some exact error messages are mentioned along with their cause or solution. Other 23 troubleshooting help is included in other sections of this manual for specific features. 25 \section{What to Include in Problem Reports}% 26 \label{cha:include_in_problem_reports} 27 \index{report problem} 28 For the best help, if you have a reproducible problem and can provide the following list of materials for analysis, it 29 is usually possible to figure out what the problem is and how to fix it. It may be a simple usage or setup mistake or 30 a real bug which a programmer would like to fix rather quickly. Although it is not always necessary to provide this 31 much information, it eliminates the \textit{try this} or \textit{did you do this?} and a lot of \textit{guessing} rather than heading straight for a solution. \textcolor{red}{Even if you can not provide all of this information, please report the problem in case other users are having the same issue.} 33 Basically we\textbf{ need to see what you see }with the input, output, and session file. Here is a list of the items that will most likely help to resolve the problem, but all of them will not necessarily be needed. 35 \begin{itemize}[nosep] 36 \item Provide a detailed description of the problem and the last operation performed if you remember it. 37 \item Supply a small representative sample of the original input that exhibits the issue. 38 \item If possible, also provide the rendered output, again using that representative sample. 39 \item Save a session file used with that same sample which will contain a lot of setup parameters; the best method to do this is to use the \texttt{File$\rightarrow$Export Project}$\dots$with the Copy option. That way all of the files will be in 1 location and easily loaded onto any other computer. 40 \item To make sure that the same rendering setup is used, it may be necessary to send an additional session file at the definition point just before rendering starts. 41 \item Include the Operating System name and version number and version of Cin that you are running. You can find the date and time \textit{built} in the \texttt{Settings$\rightarrow$Preferences, About} tab, bottom left corner. 42 \end{itemize} 44 It is better to upload any files to a drop site as some of them can be quite large. 46 \textbf{How to create a session file:} \quad from the menubar pulldown \texttt{File$\rightarrow $Save\_as}{\dots} \quad and choose a filename, for example \texttt{/tmp/beforerender.xml} Do this after you have the situation setup so can see values in use. As just stated, \textit{Export Project} option provides the most inclusive session information, but size could make it very large and cumbersome to upload or download. 48 \textbf{How to create a representative small sample:} 50 \begin{enumerate}[nosep] 51 \item open the input media, set up the scenario as you normally would to start the project render; 52 \item select 5-15 seconds of media using the edit mode left mouse button drag highlighting on the timeline; 53 \item start the render dialog (Shift-R), set the filename path, and set \textit{Render range} to \textit{Selection}; 54 \item recommended \textit{Insertion strategy} is \textit{Replace current project}; then press the checkmark OK. The result will \textit{load replace} the current project for you to review to ensure the error still occurs. If this small sample does not create the error, try a different section or upload the entire input media. 55 \end{enumerate} 58 \section{Crash Dumps for Analysis}% 59 \label{cha:crash_dumps_analysis} 60 \index{crash dumps} 61 If you get a SEGV crash and can explain what steps you took, a \texttt{/tmp/cinelerra\_<pid> .dmp} file is 62 very useful for analysis. You can also use Ctrl-c in the controlling window to force an INTR signal interrupt when 63 you think the program is hung up. You can only perform one Ctrl-c as the second Ctrl-c quits out of the program. It 64 is best to upload the \texttt{.dmp}, input files and other files to datafilehost or similar temporary site as they may be quite large. The \texttt{.dmp} filename looks like \texttt{/tmp/cinelerra\_<pid> .dmp} Log a bug report or email all 65 helpful information on the crash, location of uploaded files, and list of setup steps that illustrate the problem to 66 {\small \href{mailto:cin@lists.cinelerra-gg.org}{cin@lists.cinelerra-gg.org}} 68 \begin{enumerate}[nosep] 69 \item Use the latest version of \CGG{} as you want to make sure the problem has not been fixed. 70 \item Be sure \textit{gdb} is installed (usually installed but if not, it is easy to do so). 71 \item Run as root if at all possible (this enables using gdb to create a full \texttt{/tmp/cinelerra* .dmp} file). 72 \item Be sure \texttt{Settings$\rightarrow$Preferences$\rightarrow$Interface$\rightarrow$trap SEGV} and \texttt{trap INTR} are checked. 73 \item Invoke the error. This should create the file \texttt{/tmp/cinelerra-<pid>.dmp} 74 \end{enumerate} 75 \medskip 77 For those who can not run as root or can not create the problem while running as root, another method to create a dump 78 is available. Here are the steps to do so -- you should also have gdb installed. 79 \medskip 81 \begin{enumerate}[nosep] 82 \item Temporarily login as root and key in:\\ 83 \texttt{echo 0 > /proc/sys/kernel/yama/ptrace\_scope} \\ 84 This opens up \textit{ptrace}, used by gdb (the debugger). You will want to reverse this when done. 85 \item Run \CGG{} as an ordinary user from a window using the command line and try to create the problem. If the program crashes, this should produce a file named \texttt{/tmp/cinelerra*.dmp} where * is a number. The dump usually takes about 30 seconds or so to complete after the failure invokes the crash handler, so be patient. 86 \item Email the output that shows in the window from where you started up \CGG{} and upload or directly email the \texttt{/tmp/cinelerra*.dmp} file (this file may be too large for the Mailing List). 87 \item After you are finished creating/testing the problem, reverse the previous setting while logged in as root by keying in:\\ 88 \texttt{echo 1 > /proc/sys/kernel/yama/ptrace\_scope} 89 \end{enumerate} 91 \textcolor{red}{Even if you are not logged in as root or have ptrace enabled, if you 92 have a .dmp file and know what the last thing you did is, please provide the .dmp file for analysis.} There is a low 93 probability that the dump will prove useful, but if the problem can be recreated it can usually be fixed! 95 \section{When things go wrong}% 96 \label{cha:when_things_go_wrong} 97 \index{problem FAQ} 99 Sometimes things go wrong and there are some ways to continue your work without much trouble. Below is a list of items 100 to try before abandoning your session. 102 \begin{enumerate} 103 \item If your computer or the program crashed, you can use the \textit{File} pulldown choice 104 of \textit{Load backup} to get back to the last automatically saved session. It will most 105 likely not include the last few operations that were done though. But if you forgot to 106 Load backup when you restarted Cinelerra, you have a second chance to use \texttt{File$\rightarrow$Load} and 107 select \texttt{\$HOME/.bcast5/backup .prev} as long as you only loaded a different file and have
108 performed no editing operations.
109          \item If you accidentally destroyed your current project by a Load with
110 \textit{Replace current project} when you should have changed the Insertion strategy, and
111 you had not saved a recent backup, this is another time when it is useful to use
112 \texttt{File $\rightarrow$ Load} and
113 select \texttt{\$HOME/.bcast5/backup.prev} as long as you only loaded a different 114 file and had performed no editing operations. 115 \item If you suddenly get errors or hangs on media or strange looking tracks, you might want to rebuild indexes. You can do this in the Resources window with a right mouse click on the media to get a pulldown with the \textit{Rebuild index} option. For an easy way to rebuild for all of your media use \texttt{Settings$\rightarrow$Preferences, Interface} tab, Index Files section, \textit{Delete existing indexes}. Over time, as you 116 load media, the indexes will automatically be recreated so each load takes a little longer, but this quite often 117 is all that is needed to repair a media problem. 118 \item On an older computer, if you are playing media and it can not keep up, you can turn off \textit{Play every frame} in the \textit{Video Out} tab of \texttt{Settings$\rightarrow$Preferences, Playback} tab. You will then see the video jump as it skips frames in order to stay caught up. 119 \item The \textit{Cache size} can be lowered to 1048 if playback seems choppy or if you have problems with lv2 plugins, or you can increase the \textit{Cache size} for better flow. This can be changed in \texttt{Settings$\rightarrow$Preferences, Performance} tab. 120 \item After saving your session and settings and exiting \CGG{}, you might want to rename your current \texttt{\$HOME/.bcast5} directory and start with the default setup. This will eliminate your settings as the potential cause of a problem; however, all of your preferences will be lost until you go back to your original \texttt{.bcast5}.
121         \item You can also temporarily rename just \CGG{}\_rc in your \$HOME/.bcast5 directory, so 122 that a new file with the original name will be created with original defaults. You will lose your preferences, 123 but it is just for testing and you can move back the renamed \CGG{}\_rc over the new one if that is not the 124 cause of the problem. Be sure to stop and restart \CGG{} whenever you rename this file. 125 \item Some media has only a single keyframe at the beginning of the file so that moving anywhere on the timeline results in just a black image in the compositor. \CGG{} needs more keyframes to determine position. You can temporarily use \texttt{Settings$\rightarrow$Proxy} to$\frac{1}{2}$size to put in keyframes. How to use Proxy is explained in \ref{sec:proxy_settings} {Proxy Settings and Transcode}. 126 \item If you have enabled an \textit{Automation Curve} such as Fade or Speed on your track but it 127 does not show, it could simply be because the range minimum and maximum are incorrectly set in the zoom bar. 128 Set them to more reasonable values until you see the lines appear. Just as a reminder, the zoom bar is on the 129 bottom of the main window (figure~\ref{fig:automation}). 130 \item If the rate at which frames are captured during Recording is much lower than the framerate of the source, the video will accumulate in the recording buffers over time and the audio and video will become out of sync. Decrease the number of frames to buffer in the device in \texttt{Settings$\rightarrow $Preferences, Recording} tab so that the excess frames are dropped instead of buffered. 131 \item If loading files locks up, this might be because \CGG{} is building picons/vicons for the Resources window. If you load a large number of images it needs to decompress every single image to build a picon/vicon. Go into \texttt{Settings$\rightarrow$Preferences, Appearance} tab and disable \textit{Use thumbnails in resource window} to skip this process. Keep in mind though, that it only has to create these thumbnails the first time a new piece of media is loaded or the values are changed. 132 \item For an older computer with less CPU power, in \texttt{Settings$\rightarrow$Preferences, Appearance} tab, be sure that \textit{Autocolor assets }is disabled; set \textit{View thumbnail size} \& \textit{Vicon quality}\& \textit{Vicon color mode} to lower values or switch to \textit{No Play} instead of \textit{Full Play} in the Resources window (this is to the right of the word \textit{Visibility} in the left hand side of that window). You will then have more CPU and more memory available to do actual editing. 133 \end{enumerate} 135 \textbf{Some Helpful User Readable Text Dumps} 137 On the \textit{File} pulldown, there is a \textit{Dumps} option with a submenu of dump EDL, Plugins, Assets, and Undo. In all cases, you will have to have started \CGG{} from a window instead of from an application icon and 138 the text results will be shown in that window. 140 \begin{itemize}[nosep] 141 \item \textit{Dump EDL} \index{EDL dump} will display your current EDL state on the screen in the window from where you started Cin. This can be useful to see information concerning a specific edit or a file path. 142 \item \textit{Dump Plugins} \index{plugins!dumps} will show the names of the currently loaded plugins. 143 \item \textit{Dump Assets} \index{asset!dump} displays the media assets that you have loaded and various pertinent details on each, such as samplerate, width, and height. 144 \item \textit{Dump Undo} \index{undo dump} will dump the last 32 edits on the undo stack exactly as kept, which can be useful if you are looking to see how far back in the undo to go to get to a specific spot. 145 \end{itemize} 147 \textbf{Common Problems} 149 Some messages you may see in the startup window may or may not be errors. Some examples are: 150 \bigskip 152 \textit{FFMPEG::open\_decoder: some stream times estimated:} \texttt{/your directory/filename} 154 This is not a problem. Basically, when you open a file if a stream has a known duration, there is no message. If the duration is unknown, it is estimated by using the File Size and Bitrate to estimate the duration. This may just indicate that the stream number \CGG{} uses versus ffmpeg may be counted differently. 155 \bigskip 157 \textit{FFMPEG::scan: codec open failed} followed by 158 \newline 159 \textit{FFMPEG::scan:file=} \quad \texttt{your directory/filename} 161 This is not a problem. \CGG{} is building an index for your file in order to better seek. In that process, different methods are tried until a successful scan is complete. 162 \bigskip 164 \textit{AudioALSA::write\_buffer err -32(Broken pipe) at sample \#} 166 This indicates that there is something wrong with the audio. Some reasons for this are: 167 \begin{itemize}[nosep] 168 \item You simply stopped playing in \CGG{} while the audio is in progress. 169 \item Running on a computer where there is no sound card. 170 \item Incorrect setup of the audio parameters in the \texttt{Settings$\rightarrow$Preferences, Playback} tab. 171 \item Your sound system is already in use by another program, like when playing \textit{tunes} outside Cin. 172 \end{itemize} 173 \bigskip 175 \textit{Playback does not keep up so you hear the audio ahead of the video.} 177 When this occurs, it most likely means that there is not enough CPU power to keep up. You can go into \texttt{Settings$\rightarrow$Preferences, Playback} tab and uncheck \textit{Play every frame}. Not playing every frame means that as it plays, if it can not keep up with doing all it has to do to change the frame into a vframe and then draw it, the program just notes that it is falling behind so skips frames to catch back up. This does not affect rendering. A different solution is to use Background Rendering as described in section \ref{sec:background_rendering}. 178 \bigskip 180 \textit{\CGG{} will not start and produces error message on the startup window.} 182 There can be various reasons that \CGG{} does not come up. Some of the recent reasons are listed here. Please notify the {\small \href{http://www.cinelerra-gg.org/}{www.cinelerra-gg.org}} website when you have any unknown startup issues. 183 \medskip 185 \begin{itemize}[nosep] 186 \item Cin doesn't come up in Debian with compiz window manager running. Workaround is to use a different window manager or bring up cin first and then compiz. There is also a report that Compiz leads to single frame problems after a certain amount of time in the case where you switch to fullscreen mode and than back to normal node -- cin stops working and so you will have to restart cin. 187 \item When a library goes from one version to a later version, sometimes a pre-built Cin binary will fail because it was created at a different version than the one the user has on their computer. This seems to happen more frequently on Arch distros because Arch has continuous releases and is usually kept up to date. An example of the error message you might see in your startup window would be:\\ 188 \texttt{cin: error while loading shared libraries: libvpx.so.5: \\ 189 cannot open shared object file: No such file} 190 \end{itemize} 191 \medskip 193 You can usually install the required library to fix the problem. A temporary fix may be to create a symlink but this must be done with extreme caution as it may create an unstable condition. A better workaround is to use a tarball to install the software instead of the package build until the libraries are in sync between the build and your Operating System install. 194 \bigskip 196 \textit{ Loading a very large number of media files, for example 500 clips, crashes \CGG{} with messages similar to the following that are displayed in the window from where you started Cin:} 198 \begin{lstlisting}[numbers=none,xleftmargin=10mm] 200 BC_DisplayInfo::init_window: cannot open display "". 201 BC_DisplayInfo::init_window: cannot connect to X server. 202 unjoined tids / owner 42 203 00007feb27fff700 / 00007feb8f496700 9MainError 204 00007feb267fc700 / 00007feb7affd700 18FFMPEGScanProgress 205 ... 207 \end{lstlisting} 209 This usually indicates that you are out of Operating System file descriptors. You can increase the amount easily with the following command line: \texttt{ulimit -n 4096} where 4096 is a size suggestion but can be increased. You can include this command line in your \texttt{.bashrc} or \texttt{.profile} file for the user login which gets run every time you login, or modify the Operating System limit for everyone in the system file, which for Fedora is \texttt{/etc/security/limits.conf}. Alternatively, you can reduce the number of file descriptors needed by going into \texttt{Settings$\rightarrow$Preferences, Appearance} tab and unchecking the flag \textit{use thumbnails in resource window}. 211 \bigskip 212 \textit{Masking Feather is not working and produces error messages on the startup window similar to:} 214 \begin{lstlisting}[numbers=none,xleftmargin=10mm] 215 0:1(10): error: GLSL 4.30 is not supported. Supported versions are: 1.10, 1.20, 1.30, 1.40, 1.00 ES, and 3.00 ES 216 Playback3D::print_error: 217 #version 430 // vertex shader 218 in vec3 in_pos; 219 void main000() \{ 220 gl_Position = vec4(in_pos-vec3(0.5,0.5,0.), .5); 221 } 222 void main() \{ 223 main000(); 224 } 225 \end{lstlisting} 227 In the mask window, check the box \textit{Disable OpenGL masking} to use software instead of OpenGL. 229 \section{Menu Bar Shell Commands}% 230 \label{menu_bar_shell_commands} 231 \index{shell commands} 233 In order to provide some types of help, the Menu Bar Shell Commands are available for customization purposes (figure~\ref{fig:trouble-img001}). 235 \begin{figure}[h!] 236 \centering 237 \includegraphics[width=1.0\linewidth]{trouble-img001.png} 238 \caption{Some windows used to manipulate Shell Commands scripts} 239 \label{fig:trouble-img001} 240 \end{figure} 242 In the main window on the top line containing the \textit{File}, \textit{Edit}, {\dots} \textit{Window} pulldown menus, all the way to the right hand side is the \textit{shell cmds} icon. You might see a small white-color bordered box with the "\texttt{i}" inside and if you mouse over it, the tooltip says \textit{shell cmds}. This is a configurable popup which gives you the ability to see a table of Shortcuts in html format, refer to the reference manual or execute a pre-defined script to perform a specific task, such as some type of post processing which you plan on performing on a repeat basis. Unless redirected elsewhere, the output from executing any script-type commands will be displayed in the window from where you started \CGG{}. 244 The Shell Cmds popup menu items are configured in: 246 \texttt{Settings$\rightarrow$Preferences$\rightarrow$Interface$\rightarrow$Shell Commands} 248 This runs a dialog that lets you Add/Del/Edit the scripts in the main menu popup. \ Possible options are:\newline 250 \begin{enumerate} 251 \item \textit{Add} a new menu item/script: 252 \begin{itemize}[noitemsep] 253 \item click on the \textit{Add} button 254 \item in the Label box, change the word \textit{new} to the desired menu label (for example: Graphics Editor) 255 \item in the Commands box, type the command lines to be included in the script (for example: gimp) 256 \item click the green checkmark for OK in the Commands window 257 \item click the green checkmark for OK in the Shell window 258 \item click on OK or Apply in the Preferences window 259 \end{itemize} 260 \item \textit{Del} to delete an existing menu item 261 \begin{itemize}[noitemsep] 262 \item select to highlight an entry in the \CGG{}: Shell listbox 263 \item click on the \textit{Del }button 264 \item click the green checkmark for OK in the Shell window 265 \item click on OK or Apply in the Preferences window (the entry is now deleted) 266 \end{itemize} 267 \item \textit{Edit} an existing menu item: 268 \begin{itemize}[noitemsep] 269 \item select to highlight an entry in the \CGG{}: Shell listbox 270 \item click on the \textit{Edit} button (the Commands window appears) 271 \item set the label and/or commands to the new desired values 272 \item click on the green checkmark for OK in the Commands window 273 \item click on the green checkmark for OK in the Shell window 274 \item click on OK or Apply in the Preferences window 275 \end{itemize} 276 \end{enumerate} 278 Next time you click on the \textit{shell cmds} icon, you will have the changes you made in effect. 280 Both the \textit{Add} and \textit{Edit} options have checkboxes in the Commands window for the following: 282 \begin{itemize}[nosep] 283 \item \textit{OnExit notify} \quad choose Always, Never, or On error to get a popup window notify 284 \item run \texttt{path/script.sh + argvs} \quad to run a particular script with argvs (\$1, \$2,{\dots} arguments) 285 \end{itemize} 288 When modifications to the Shell Cmds are included in a new \CGG{} release, they are not added to your Preferences file automatically unless you create a new one. But if you have added no custom scripts, you can update your currently existing \texttt{\$HOME/.bcast5/ \CGG{}\_rc} file to delete the lines that are all grouped together that begin with the letters: \texttt{SHBTN} (the entire line -- these are the \textbf{SH}ell \textbf{B}u\textbf{T}to\textbf{N}s). \ You should first Quit out of \CGG{}, edit the file, and then when you restart \CGG{}, it will create the new default buttons in that same file.
290 There are 2 specific \CGG{} file names that have unique characteristics that allow for usage from a user-defined
291 script. The first one is an environment variable, \texttt{CIN\_RENDER} which is used in the \textit{RenderMux} shell command that is already setup. It contains the complete path and filename of the file in your session that you selected as \textit{Select a file to render to} when you ran a Render operation.
293 The second one concerns usage of the Resource window assets to use as argvs in shell scripts. The added command line
294 can ONLY be a script. Then if your script refers to \$1, \$2 and \$3 and you highlight 3 files in the Media folder, 295 their full path name will be used as the argvs to your script. For example, if you added a shell commands script 296 \texttt{/workspace/script.sh} that contains the following lines: 298 \begin{lstlisting}[numbers=none,xleftmargin=10mm] 299 cp \$1'' /tmp/temporary_copy
300 cp \$2'' /tmp/new_copy 301 cp \$3'' /tmp/file_to_upload
302 \end{lstlisting}
304 and you highlight 3 files in the Resources window called\textit{ ABC.mp4}, \textit{123.mp4}, and \textit{Final.mp4} and execute your added script from the Shell Cmds icon, you will be copying those 3 highlighted files to the new names on \texttt{/tmp}.
306 There are some Help features currently included in the Shell Cmds menu. Those available are:
308 \begin{enumerate}
309         \item \textit{Current Manual} in PDF format from cinelerra-gg.org or automatically downloaded.
310         \item \textit{Setting Shell Commands} \textit{how to} which explains how to configure your own commands.
311         \item \textit{Shortcuts} html file for easily looking up a particular shortcut.
312         \item \textit{RenderMux} shell script to use ffmpeg concatenate to copy files such as \textit{look.mp4001}, \textit{look.mp4002}, \textit{look.mp4005}{\dots} that were rendered using \textit{Create new file at each label} or with the Render Farm.
313 \end{enumerate}
315 \section{\CGG{} Command Line -h}%
316 \label{cha:cinelerra_command_line_-h}
317 \index{command line}
319 To see the command line parameters available to use with \CGG{}, key in:
321 \qquad \texttt{<your \CGG{} directory path>/bin/cin -h}
323 What will be shown in the window where this line was entered is:
325 Usage:
327 \texttt{./cin [-f] [-c configuration] [-d port] [-n nice] [-r batch file] [filenames]}
329 -d = Run in the background as renderfarm client.  The port (400) is optional.\\
330 -f = Run in the foreground as renderfarm client. Substitute for -d.\\
331 -n = Nice value if running as renderfarm client. (19)\\
332 -c = Configuration file to use instead of /root/.bcast5/Cinelerra\_rc.\\
333 -r = batch render the contents of the batch file (/root/.bcast5/batchrender.rc) with no gui. batch file is optional.\\
334 -S = do not reload perpetual session\\
335 -x = reload from backup\\
336 filenames = files to load