Pelco Developer Network (PDN)

PelcoAPIViewer crashes in Release

Hello!
PelcoAPIViewer always crashes in Release while works correctly in Debug when trying to display live video from Sarix camera using RTP.
Same on PelcoAPIViewerSample came with Pelco SDK.
Only following changes were made to main.cpp

#define CAMERA_UUID   ""
#define CAMERA_IP     "192.168.1.160"
#define CAMERA_PORT   "80"
#ifdef _DEBUG
#define PLUGIN_DIR			"C:\\Program Files (x86)\\Pelco\\API\\Libs\\Debug\\Plugins\\"
#else
#define PLUGIN_DIR			"C:\\Program Files (x86)\\Pelco\\API\\Libs\\Release\\Plugins\\"
#endif
#define RTP_URL		  ""

PelcoSDK.log
2014-12-08T10:06:02 [INFO] 3124/3964 main.cpp, 159: Starting Pelco Viewer
2014-12-08T10:06:02 [INFO] 3124/3964 UpnpSourceControl.cpp, 1674: Primary stream is returned. Format: H.264

Tryed with
- different cameras: IMP519 configured to 1920x1080/25 and IL10 both running latest firmware,
- different bVideoOnly (false/true)
- different bLowBandwidth (false/true) i.e. stream 1 or stream 2
- unicast (RTP_URL "rtp://192.168.1.129:60001") / multicast (RTP_URL "")
- different ways of passing through Windows Firewall i.e. adding exceptions for SampleConsole.exe then disabling Windows Firewall
Then I reinstalled recommended version of DirectX.
Nothing helps: still Debug version displays video while Release version always crashes.

Was discovered with Pelco SDK v3.5, the same with Pelco SDK v3.5.1
VC++ 2010 SP1
Windows 7 x64 Pro SP1 (standalone i.e. not in AD)

It sounds like a set up issue. Check that the runtime or compile-time PLUGIN_DIR value, the PATH env var, and the build configuration all match. For example:
1) In the dialog or source code (console app) point to the Release plug-in directory C:\\Program Files (x86)\\Pelco\\API\\Libs\\Release\\Plugins\\. Comment out or remove the debug plug-in path.

2) Make sure the PATH environment variable points to Release as well.

3) Select the Release DLLs by choosing the Release build configuration in the project.

As an alternative, use the SDK Object Model classes to view video. A C# example is included in the SDK samples (Program Files > Pelco > API > SampleCode > DotNet > ViewVideo). A C++ example is described in this Featured Article on PDN.