Hi everyone,
I recently started testing this. Thanks for the hard work, Paulo. I’m running osx 10.6.8 and xcode 3.2.6. Originally I got the same errors as a lot of people. The “atomic” error and the “expected unqualified-id before ‘=’ token” error. I fixed the first by simply deleting atomic as was suggested in a related post. And I fixed the second by looking at ofxMacamPs3Eye.mm and changing the ‘id’ variable name in lines 52-55 to ‘id2’ (any other name) but did not change “deviceList[0]->id”. And for some reason, xcode was happy with that.
After doing that, I could run the examples on my setup no problem. But when I tried to add this addon to my own project, I immediately got the weird errors that other people have experience. So I changed all the .m files in the src to .mm files and again things compiled.
However, now I’m getting a very odd error. It is saying “terminating due to uncaught exception”. I looked at the debugger and tried to add some breakpoints, and I can see this info:
2013-06-22 12:07:30.611 osxVideoRecorderExampleDebug[2990:a0f] MyCameraCentral:startupWithNotificationsOnMainThread
2013-06-22 12:07:30.616 osxVideoRecorderExampleDebug[2990:a0f] cameraDetected MyCameraCentral
2013-06-22 12:07:30.616 osxVideoRecorderExampleDebug[2990:a0f] -[MyCameraCentral getName:forID:]: unrecognized selector sent to instance 0x15854000
2013-06-22 12:07:30.617 osxVideoRecorderExampleDebug[2990:a0f] An uncaught exception was raised
2013-06-22 12:07:30.617 osxVideoRecorderExampleDebug[2990:a0f] -[MyCameraCentral getName:forID:]: unrecognized selector sent to instance 0x15854000
2013-06-22 12:07:30.618 osxVideoRecorderExampleDebug[2990:a0f] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[MyCameraCentral getName:forID:]: unrecognized selector sent to instance 0x15854000’
I have added the entire debug print out at the end of this post. It is also letting me know that there is some conflict between the macam driver and ofxMacamPs3Eye implementations of certain things. I don’t know if that means I need to delete my macam driver or if I can do something else to make it look at the ofxMacamPs3Eye version when I’m in a project with that addon. I’m really very confused by this error. I’m not sure if it’s something I did or if someone else has seen it before.
Any suggestions? And thanks again to everybody for figuring out some of the previous issues and for Paulo writing this in the first place.
Whole debug output:
[Session started at 2013-06-22 12:07:30 -0400.]
GNU gdb 6.3.50-20050815 (Apple version gdb-1515) (Sat Jan 15 08:33:48 UTC 2011)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type “show copying” to see the conditions.
There is absolutely no warranty for GDB. Type “show warranty” for details.
This GDB was configured as “x86_64-apple-darwin”.tty /dev/ttys001
Loading program into debugger
Program loaded.
run
[Switching to process 2990]
Running
objc[2990]: Class MyCameraDriver is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class MyCameraInfo is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class CyYeGMgConverter is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class BayerConverter is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class MyCameraCentral is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class GenericDriver is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class LookUpTable is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class Sensor is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class OV538Driver is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class OV534Driver is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class Histogram is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class AGC is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
objc[2990]: Class FrameCounter is implemented in both /Users/barragan/Documents/cppCode/of_v0073_osx_release/apps/myApps/osxVideoRecorderExample2/bin/osxVideoRecorderExampleDebug.app/Contents/MacOS/osxVideoRecorderExampleDebug and /Library/QuickTime/macam.component/Contents/MacOS/macam. One of the two will be used. Which one is undefined.
2013-06-22 12:07:30.611 osxVideoRecorderExampleDebug[2990:a0f] MyCameraCentral:startupWithNotificationsOnMainThread
2013-06-22 12:07:30.616 osxVideoRecorderExampleDebug[2990:a0f] cameraDetected MyCameraCentral
2013-06-22 12:07:30.616 osxVideoRecorderExampleDebug[2990:a0f] -[MyCameraCentral getName:forID:]: unrecognized selector sent to instance 0x15854000
2013-06-22 12:07:30.617 osxVideoRecorderExampleDebug[2990:a0f] An uncaught exception was raised
2013-06-22 12:07:30.617 osxVideoRecorderExampleDebug[2990:a0f] -[MyCameraCentral getName:forID:]: unrecognized selector sent to instance 0x15854000
2013-06-22 12:07:30.618 osxVideoRecorderExampleDebug[2990:a0f] *** Terminating app due to uncaught exception ‘NSInvalidArgumentException’, reason: ‘-[MyCameraCentral getName:forID:]: unrecognized selector sent to instance 0x15854000’
*** Call stack at first throw:
(
0 CoreFoundation 0x93ecd6ca __raiseError + 410
1 libobjc.A.dylib 0x99d565a9 objc_exception_throw + 56
2 CoreFoundation 0x93f1a90b -[NSObject(NSObject) doesNotRecognizeSelector:] + 187
3 CoreFoundation 0x93e73c06 ___forwarding___ + 950
4 CoreFoundation 0x93e737d2 _CF_forwarding_prep_0 + 50
5 macam 0x1681d3c7 sgpnRegister + 574
6 CarbonCore 0x9a9e5dcc _ZL38CallComponentFunctionCommonWithStoragePPcP19ComponentParametersPFlvEm + 54
7 macam 0x1681d183 sgpnMainEntry + 87
8 CarbonCore 0x9a9de5e1 CallComponent + 192
9 CarbonCore 0x9a9de51f CallComponentDispatch + 29
10 CarbonCore 0x9aa6cdee CallComponentRegister + 37
11 CarbonCore 0x9aa0ca0a _ZL13kissComponentP15ComponentRecord + 182
12 CarbonCore 0x9a9d6ff1 processSerialKissers + 179
13 CarbonCore 0x9a9d5fe0 registerSystemComponents + 307
14 CarbonCore 0x9a9d5dd1 _Z25FindNextComponentInternalP15ComponentRecordP20ComponentDescriptionm + 86
15 CarbonCore 0x9a9d5d64 FindNextComponent + 61
16 QuickTime 0x98b28f0d EnterMovies_priv + 411
17 QuickTime 0x98b28a36 EnterMovies + 16
18 TundraUnits 0x15631663 TundraUnitInputFromTSFileEntry + 13682
19 TundraUnits 0x15636952 TundraUnitVDIGInputEntry + 21145
20 CoreMediaIOServices 0x97764272 TundraUnitCreateFromDescription + 654
21 QTKit 0x99cbb0be +[QTCaptureVDIGDevice _refreshDevices] + 390
22 QTKit 0x99cba3a7 +[QTCaptureVDIGDevice devicesWithIOType:] + 62
23 QTKit 0x99cb701b +[QTCaptureDevice devicesWithIOType:] + 205
24 QTKit 0x99cb6b0c +[QTCaptureDevice inputDevices] + 42
25 QTKit 0x99cb6a52 +[QTCaptureDevice inputDevicesWithMediaType:] + 36
26 osxVideoRecorderExampleDebug 0x0008b8b0 +[QTKitVideoGrabber listVideoDevices] + 54
27 osxVideoRecorderExampleDebug 0x0008c888 _ZN14ofQTKitGrabber16listVideoDevicesEv + 90
28 osxVideoRecorderExampleDebug 0x0000d828 _ZN7testApp5setupEv + 290
29 osxVideoRecorderExampleDebug 0x0006eede _Z13ofNotifySetupv + 32
30 osxVideoRecorderExampleDebug 0x0006ac03 _ZN15ofAppGlutWindow21runAppViaInfiniteLoopEP9ofBaseApp + 27
31 osxVideoRecorderExampleDebug 0x0006ba05 _Z8ofRunAppP9ofBaseApp + 192
32 osxVideoRecorderExampleDebug 0x0000b4bb main + 96
33 osxVideoRecorderExampleDebug 0x0000b381 start + 53
)
sharedlibrary apply-load-rules all