トラブルシューティング#
When running a program, an exception is thrown. Exception message:
BaslerGTC/Basler/GenTL_Producer_for_Basler_blaze_101_camera could not be created.
Reason: The GenTL producer for blaze cameras provided by the pylon Supplementary Package for blaze is not found.
Solution: Make sure that the GENICAM_GENTL64_PATH
environment variable is set up correctly. The variable must contain the following folder:
Windows: <PYLON_ROOT>/Runtime/x64
Linux: <PYLON_ROOT>/lib/gentlproducer/gtl
You can use the pylon-setup-env.sh script, located in the <PYLON_ROOT>/bin
directory. To set up the environment for a pylon installation in /opt/pylon, execute:
If you want the environment to be persistent, you can add
to ~/.bashrcIf you do not use this script, you will have to set up your environment as follows:
CMake emits lots of warnings.
Reason: Depending on the version of the PCL, the PCL's CMake configuration file causes many warnings.
Solution: For the purpose of building and running the Basler blaze samples, the warnings can usually be ignored.
The amount of warnings can be reduced by passing the -Wno-dev
command-line option to CMake.
Windows Only: Running a sample using OpenCV fails due to a missing opencv_world*.dll file.
Reason: The path to OpenCV is not in the PATH
environment variable.
Solution: The path to the OpenCV installation must be added to the PATH
environment variable. Add OpenCV to PATH environment variable.
Windows Only: Running a sample using PCL fails due to a missing OpenNI2.dll file.
Reason: The PCL All-in-One Installer installs the OpenNI2.dll to a location that is not in the PATH.
Solution: The PCL installer installs the DLL into the %ProgramFiles%\OpenNI2\Redist
folder. Either add this folder to your PATH
environment variable, or copy the OpenNI2.dll
to the folder the PCL binaries are located in, e.g., %ProgamFiles%\PCL 1.11.1\bin
.
Windows Only: A sample using PCL either fails to build when the CMAKE_BUILD_TYPE
is set to RelWithDebInfo
, or a sample built with CMAKE_BUILD_TYPE
set to RelWithDebInfo
crashes when executed.
Reason: The support of PCL for the RelWithDebInfo
configuration is broken. Instead of linking the release versions of the VTK libraries PCL uses for visualization tasks, the debug versions are linked. This results in a mixture of libraries referencing both, the debug and the release versions of the Microsoft C++ runtime libraries, which either prevents the linker from linking the executable or causes a crash at runtime.
Solution 1: Choose Release
instead of RelWithDebInfo
.
Note
The Visual Studio CMake support automatically sets the CMake build type to RelWithDebInfo
when creating a Release
build configuration. You have to edit the CMakeSettings.json
file manually and change the value of the configurationType
field from RelWithDebInfo
to Release
.
Solution 2:
- Create a copy of the
%ProgramFiles%\PCL x.y.z\3rdParty\VTK\lib\cmake\vtk-x.y\VTK-Targets-debug.cmake
file. - Rename the copy
VTK-Targets-relwithdebinfo.cmake
. - Open the file with a text editor and replace all occurrences of
RELEASE
byRELWITHDEBINFO
. - Clear the CMake cache and generate the cache again.
Display frame rate is low.
Reason: In debug mode, the compiler generates code without optimizations.
Solution: Make sure that the application is built in release mode.
Windows Only: The linker complains about a mixture of 32-bit and 64-bit libraries.
Reason: When linking an application, all binaries have to be either 32-bit or 64-bit binaries. Mixing 32-bit and 64-bit libraries in one executable is not possible.
Solution: Ensure that when generating Visual Studio solution files, you target the same platform (x86 vs. x64) the OpenCV und PCL libraries are built for.
After an application has crashed or has been killed, a device is already connected
error message occurs when restarting the application.
Reason: When the application terminates unexpectedly, it can't close the connection to the camera anymore. The camera waits until the GigE Vision heartbeat timeout expires until it accepts a new connection.
Usually, this happens if you're running your application under a debugger and are using pylon 7.0 or below. Later pylon versions automatically close the camera connection on program termination.
Solution: If you increased the heartbeat timeout, or if you're using pylon 7.0 or below and are running the application under a debugger, you either have to power-cycle the camera or to disconnect the camera from the network for a short while.
Refer to the Debugging C++ Applications and Controlling the GigE Vision Heartbeat or the Debugging .NET Applications and Controlling the GigE Vision Heartbeat sections for more details about how to control the GigE Vision heartbeat timeout.