View Full Version : startLive() crashes when I try with 2 cameras

December 1, 2004, 20:21:47
I'm having trouble getting 2 cameras to work at the same time in trigger mode. I can get one of the cameras to work, however if I call startLive() on the second camera the function crashes with ASSERT failed in debug mode and in release mode I get runtime error with program requesting termination in unusual way (according to the message).

Here are the bits of my code. I didn't post the bits which I think aren't important.

//open device
m_pRightCamera->openDev( ( *pVidCapDevList ) [0] );
m_pLeftCamera->openDev( ( *pVidCapDevList ) [1] );

//set sink type, I want RGB (although I tried YUV as well)
DShowLib::FrameGrabberSink frameGrabber(DShowLib::FrameGrabberSink::tFrameGra bberMode::eGRAB, DShowLib::eRGB24 );
m_pLeftCamera->setSinkType( frameGrabber );
m_pRightCamera->setSinkType( frameGrabber );

//set video format 1024x768 UYVY
DShowLib::Grabber::tVidFmtListPtr pVideoFormats = m_pRightCamera->getAvailableVideoFormats();
m_pLeftCamera->setVideoFormat( ( *pVideoFormats ) [2] );
m_pRightCamera->setVideoFormat( ( *pVideoFormats ) [2] );

//set the buffers
m_pMemBuffColRight = m_pRightCamera->newMemBufferCollection( 5 );
m_pMemBuffColLeft = m_pLeftCamera->newMemBufferCollection( 5 );
m_pRightCamera->setActiveMemBufferCollection( m_pMemBuffColRight );
m_pLeftCamera->setActiveMemBufferCollection( m_pMemBuffColLeft );

m_pLeftCamera->setFrameRate( 133 );
m_pRightCamera->setFrameRate( 133 );

if ( !m_pRightCamera->isDevOpen() || !m_pLeftCamera->isDevOpen() || !m_pLeftCamera->isDevValid() || !m_pRightCamera->isDevValid() )

m_pRightCamera->startLive( false ); //crash!

Thanks for any help, I'm kinda stuck.

Stefan Geissler
December 2, 2004, 08:14:54

I think, the code

m_pLeftCamera->setFrameRate( 133 );
m_pRightCamera->setFrameRate( 133 );

does not set the frame rates to 7.5 fps. Please try the value 140 or higher, because IC Imaging Control tries to find a matching value.

m_pLeftCamera->setFrameRate( 200 );
m_pRightCamera->setFrameRate( 200 );

Also you should make sure, that the desired frame rate is supported by your camera. If the camera does not support frame rates, setFrameRate() returns false.

December 2, 2004, 14:39:15
I tried that and it still gave me the same error. I should also say that individually the cameras work. That is if I switch the startLive() for right/left only they work so I don't think it's a faulty camera.

Here's more description of the debug assertion fail that I get.
It's in TIS_UDSHL06_vc6d.dll module in file DynamicFilterChain.cpp line 132 with the message "CDynamicFilterChain, failed to disconnect pin of filter." I have no idea what that means.


Stefan Geissler
December 2, 2004, 14:46:02

I think, you camera does not support setting of frame rates. What cameras do you use? What driver do you use?

December 2, 2004, 15:16:20
I use the sony DFW-X700. The device name that appears in the Device Manager is Sony DFW-X700 v1.71D but the driver version that you see in the Driver tab (when you double click on the device) is I'm using IC 2.0. Note that both versions of software and driver are trial versions, but I thought that wasn't an issue.

December 2, 2004, 15:18:57
Oh, and also I commented out the frame setting code and still get the same problem. And when it wasn't commented out it returned true for frame rates 133, 140, 200.

December 2, 2004, 15:21:21
Also I installed the driver twice for the two cameras so they come up in the device manager, and also in the following code returns with 2 cameras:

DShowLib::Grabber::tVidCapDevListPtr pVidCapDevList;
pVidCapDevList = m_pLeftCamera->getAvailableVideoCaptureDevices();
// Enough Cameras ?
if ( pVidCapDevList->size() != 2 )
return e;


Stefan Geissler
December 3, 2004, 07:50:46
Hello Igor,

Please try the same code, but do not enable the trigger. I think, but i am not really sure, that enabling the trigger set the frame rate to the highest value and therefore the bandwidth allocation is too high.
Also it would be a good idea to setup the cameras in the same way with IC Capture. You can download it as trial version too.
The last solution is to use two FireWire boards.

December 3, 2004, 20:53:42
It looks like it's a bandwidth problem with some project settings problems on the side. I modified the demo app that comes with the IC 2.0 and it wouldn't work until I changed the frame rate to a lower value (133). However the original program doesn't work even with this modified code, but now I have a starting point.

Anyway thanks for the help.

July 13, 2009, 10:31:29
I have got the same problems. Have you found a solution ??