solved: videoGrabberExample not working with iSight, xcode4, osx 10.7.4

Hi all, wanted to test the videoGrabberExample but it returns these errors:

Every help is welcome, btw the compiled app in ./bin/videoGrabberExampleDebug is running like it should.

OF: OF_LOG_WARNING: ofBaseVideoGrabber::setPixelFormat not implemented  
2012-06-27 03:27:42.832 videoGrabberExampleDebug[1245:a03] Opening shmem segment com.allocinit.CTCtrl2  
2012-06-27 03:27:42.833 videoGrabberExampleDebug[1245:a03] Opening shmem segment com.allocinit.CTImg2.0  
2012-06-27 03:27:42.834 videoGrabberExampleDebug[1245:a03] Opening shmem segment com.allocinit.CTImg2.1  
DVFreeThread - CFMachPortCreateWithPort hack = 0x7d43c3a0, fPowerNotifyPort= 0x7d43c4c0  
OF: OF_LOG_NOTICE: -------------------------------------  
DVFreeThread - CFMachPortCreateWithPort hack = 0x7b65a0a0, fPowerNotifyPort= 0x7b65a2c0  
OF: OF_LOG_NOTICE: listing available capture devices  
OF: OF_LOG_NOTICE: (unavailable) device[0] CamTwist  
OF: OF_LOG_NOTICE: (unavailable) device[1] DV Video  
OF: OF_LOG_NOTICE: (unavailable) device[2] IIDC FireWire Video  
OF: OF_LOG_NOTICE: device[3] USB Video Class Video - FaceTime HD Camera (Built-in)  
OF: OF_LOG_NOTICE: -------------------------------------  
DVFreeThread - CFMachPortCreateWithPort hack = 0x7b34ee20, fPowerNotifyPort= 0x7b34f300  
OF: OF_LOG_NOTICE: ofQuickTimeGrabber: attempting to open device[3] USB Video Class Video   -   FaceTime HD Camera (Built-in)  
OF: OF_LOG_NOTICE: ofQuickTimeGrabber: device opened successfully  
OF: OF_LOG_WARNING: ofQuickTimeGrabber: no camera settings to load  
OF: OF_LOG_NOTICE: end setup ofQuickTimeGrabber  
OF: OF_LOG_NOTICE: -------------------------------------  


Ok i’m still trying to figure this out, I thought I had it (sdk to 10.6), but I didn’t
:frowning: Anyway the strange part of this all is, when I press build videoGrabberExample, then xCode freezes and I get scrambled video input, but it builds the app. After the freeze xCode asks me to restore the windows, and then the app is working. Can someone confirm that this is wrong behavior, or can someone tell me this is actually normal :s or can someone with iSight, xcode4, osx 10.7.4 tell me that his/her example is working like a charm? Thanks in advance.


when it crash it points to this line:

SGIdle(gSeqGrabber); < thread 1: exc_bad_access (code=2 address=x0x)

Which is a runtime error I just learned

Any guess anyone? Im kinda stuck…

it should work - can you try disabling Camtwist and see if you get anything different?

Hi jvcleave thanks for thinking along, really appreciated. I have disabled camtwist but I get the same error.

Another strange thing is when I build it with the Xcode Zombie Instruments then the app runs just fine.

Some more info on the variable, when I put a breakpoint at SGIdle(gSeqGrabber) then after continue program execution it will loop 4-5 times before i get the exc_bad_access error.

this	ofQuickTimeGrabber *	0x1122b10  
ofBaseVideoGrabber	ofBaseVideoGrabber *	0x1122b10  
bChooseDevice	bool	true  
deviceID	int	0  
bVerbose	bool	false  
bGrabberInited	bool	true  
pixels	ofPixels	{...}  
attemptFramerate	int	-1  
bIsFrameNew	bool	false  
offscreenGWorldPixels	unsigned char *	0x757c000  
bHavePixelsChanged	bool	false  
videogworld	GWorldPtr	0x7519a0  
gSeqGrabber	SeqGrabComponent	0x820000  
gVideoChannel	SGChannel	0x810002  
videoRect	Rect	{...}  
bSgInited	bool	true  
deviceName	string	{...}  
myGrabCompleteProc	SGGrabCompleteBottleUPP	0x15370a  

flip4mac was causing trouble, I found out by running some QT examples from apple dev, updated flip4mac now it works.

interesting - will have to watch out for this