Frames

# Troubleshooting

Here are some common problems users have encountered while running or compiling CamStream. You may find the answer to your question here if you are having trouble.

## Index

1. Building problems
   1. Qt library/headerfiles not found
   2. Qt 3
2. Running CamStream
   1. Crash after a few minutes of uploading

## Building problems

### Qt library/headerfiles not found

A common problem is that Linux distributors place the Qt libraries at the weirdest places... The configure script checks the most common directories, but can't really test them all. So, if configure complains it can't locate the Qt libraries, you must first set the QTDIR environment variable (this is a requirement anyhow). So, if your Qt libraries are placed in, for example, /usr/lib/qt-2.3.0, try this:

    	# QTDIR=/usr/lib/qt-2.3.0
    	# export QTDIR
    	# ./configure [options]

This is also the location where the uic User Interface Compiler and moc pre-processor are supposed to be. If not, make sure these can be found in your PATH!

Another source of confusion is that often the library is present, but not the header files. It turns out that some distributors (Red Hat, SuSe) split the Qt package in two parts: just the library, and the header files and development tools. On your system only the library is installed (this appears to be the default), which is enough to run programs but not to compile them!

In that case you have to install the 'qt-dev' package as well. For example, if you installed the qt-3.0.3 rpm on Red Hat, you must install qt-devel-3.0.3 too. Of course the version numbers have to match! The package name may be slightly different for different systems.

### Qt 3.*

Compilation fails under Qt 3.* with the following error:

    c++ -I/usr/include/qt -g -Wall -I. -I.. -I../devices -I../video -DHAVE_CONFIG_H -c -o SnapshotSettingsDlg.moc.o SnapshotSettingsDlg.moc.cc
    In file included from SnapshotSettingsDlg.h:8,
                     from SnapshotSettingsDlg.moc.cc:11:
                     ../VideoOptions.h:17: syntax error before ;'
                     make[1]: *** [SnapshotSettingsDlg.moc.o] Error 1
                     make[1]: Leaving directory /usr/src/camstream-0.25/src/gui'
                     make: *** [subdirs] Error 2

This is due to incompatibilities in the header files. You should use Qt 2.2.* or 2.3.*; you can install this Qt library parallel to Qt 1.* and Qt 3.*; just make sure your QTDIR environment variable points to the correct path.

I do not intend to port CamStream to Qt 3 yet. The reason is that it involves upgrading the .ui files (used for dialog design), and once I've done that, there is no way back. In other words, I would force users to upgrade/install Qt 3 and I don't want to do that now.

## Running CamStream

This sections lists problems and bugs that are encountered when running the program.

### Crash after a few minutes of uploading

(This applies to CamStream 0.25)

After 10-15 minutes of FTP-ing images to the server, the program may crash. This is due to a bug in the Qt libraries, when the first FTP connection to the server times out and gets closed remotely. I mailed Trolltech about it and they are aware of the problem, but basicly they tell me they are much more busy with other bugs :-(. I am not satisfied with their FTP class anyway. It lacks a number of features and their implementation is quite braindead (it opens a new connection for every FTP session, even to the same computer and account). This problem has been reported in Qt 2.2.2, 2.2.4 and 2.3.0.