Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for OSX v2.12? #8

Closed
bakercp opened this issue Jun 25, 2013 · 10 comments
Closed

Support for OSX v2.12? #8

bakercp opened this issue Jun 25, 2013 · 10 comments

Comments

@bakercp
Copy link

bakercp commented Jun 25, 2013

Hey there, I just got EDSDK 2.12 installed and it recognizes that a camera is attached but then hangs indefinitely. I tried the sample programs included with the sdk and they worked nicely. Before I dig too far, do you have any tips on what to check first?

@kylemcdonald
Copy link
Owner

i haven't tested 2.12 yet, but i know @laserpilot has been doing some experimentation. i also have heard that some of the other addons don't hang w 2.12, so something in my setup routine probably needs to be updated.

@roymacdonald
Copy link
Contributor

Hi Kyle,
I've been trying to make this work with edsdk v2.12, as I need to use a canon t3i. Unfortunately canon is not providing download links to the previous versions which support the t3i. I only have an older version that doesn't support it.
Yet, there seems to be a problem in the edsOpenSession() method. It gets stuck there.
After trying lots of things by trying to replicate the behaviour in the sdk sample I found out that the problem might be thread related.
If you go to ofxEdsdk.cpp
in Camera::setup(int deviceId) {
change startThread(true, false); to startThread(false, false);
The app runs, the camera session is openned, you get the liveView working and you are able to take photos but the app is just leaking. :(
log message:
ofxEdsdkExampleDebug[24907:490f] *** __NSAutoreleaseNoPool(): Object 0x3631130 of class NSCFNumber autoreleased with no pool in place - just leaking

Also if you set startThread(true, false); to startThread(true, true);
It appears that the thread is waiting for an external mutex to be unlocked.

I'll try to figure out what's the problem. If you have any clue please let me know.
Best!

BTW, do you have a copy of edsdk v2.10 or 2.11 that you can share with me.

@laserpilot
Copy link

Roy, I just sent you an email with a link to those EDSDK's if you want to have a look. I think someone working without ofxEDSDK was having a similar issue, so their sdk may still be buggy...

@roymacdonald
Copy link
Contributor

@laserpilot Just received your email. thanks!
Yeah, after googling for a while I found that other people were having trouble as well with the sdk. It appears that canon introduced a bug in 2.11. and has not got rid of it.

@bakercp
Copy link
Author

bakercp commented Aug 30, 2013

Hey @laserpilot would you mind sharing the older SDK w/ me as well? Thanks.

@badgeek
Copy link

badgeek commented Sep 1, 2013

hi @laserpilot would you mind to send me the link of the old sdk ? thanks

@roymacdonald
Copy link
Contributor

Hey guys,
So if fixed the thing and have it running on both win and mac with edsdk v2.12
Check it here:
https://github.com/roymacdonald/ofxEdsdk/tree/fix-2.12

Essentially there are three issues:
all of these are part of ofxEdsdk::Camera
1.- ofxEdsdk::Camera::update() needs to happen only if the camera is connected (there was some problem with the lock going on before being conected).
2.- Everything tends to hang if Eds::StartLiveview(camera); is called after Eds::OpenSession(camera); in the threaded function. I'm not really sure what's going on but it seems to work.
3.There seems to be a leaking object inside the edsdk lib. (well actually it is there as a leak inspection revealed), because there's no autorelease pool. I added some #ifdef so to create an autorelease pool.

@kylemcdonald should I PR?

@kylemcdonald
Copy link
Owner

yes, please PR and i review the changes easier

@roymacdonald roymacdonald mentioned this issue Sep 4, 2013
@roymacdonald
Copy link
Contributor

Hey guys,
Kyle just merged my PR.
It works with edsdk v2.12 on both mac and win.
Please check it and let me know if there is any problem with it.
Usage remains the same.
Best!

@kylemcdonald
Copy link
Owner

because 2.14 is supported i'm closing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants