Hi,

I'm trying to use the Canon EDSDK with QT. That works quite smooth for all issues regarding the Camera Remote functions.
But when it comes to Raw development, I can't get rid of a crash EXC_BREAKPOINT (SIGTRAP) in CFRelease + 25.
The Canon SDK for Mac OS X seems to be written in Objective C.

The same code I'm using in QT 4.8.0 / x86 is working fine when compiling as 32bit in XCode 4, adapted to Objective C.

I tried creating a Cocoa Autoreleasepool manually, tried a lot of more things to track down the problem - without any success.
As soon as it reaches "EdsSaveImage" it crashes.
It gets a s far as printing out the width and height. Error codes are always 0 = EDS_ERR_OK

Any experience with Canon EDSDK or similar issues?

Qt Code:
  1. EdsError err=EDS_ERR_OK;
  2. EdsImageRef mimageRef;
  3.  
  4. // Create FileStream
  5. EdsStreamRef inStream = 0;
  6. err = EdsCreateFileStream(
  7. path.toAscii(),
  8. kEdsFileCreateDisposition_OpenExisting,
  9. kEdsAccess_ReadWrite,
  10. &inStream
  11. );
  12. // Create ImageRef
  13. if(!err){
  14. err = EdsCreateImageRef( inStream, &mimageRef );
  15. }
  16. qDebug("LOAD %d",err);
  17.  
  18. EdsUInt32 jpegQuality = 9;
  19. EdsTargetImageType imageType = kEdsTargetImageType_Jpeg;
  20.  
  21. err = EDS_ERR_OK;
  22.  
  23. // Create Target Stream
  24. EdsStreamRef targetStream;
  25. QString sPath = "testttr.jpg";
  26. err = EdsCreateFileStream((const char*) sPath.toAscii(), kEdsFileCreateDisposition_CreateAlways, kEdsAccess_ReadWrite, &targetStream);
  27. qDebug("CREATE %d",err);
  28.  
  29. // Set SaveImageSetting
  30. EdsSaveImageSetting saveImageSetting = {0};
  31. saveImageSetting.JPEGQuality = jpegQuality;
  32.  
  33. err = EdsGetImageInfo(mimageRef, m_imageSource, &imageInfo );
  34. qDebug("HEIGHT %d",imageInfo.height);
  35. qDebug("WIDTH %d",imageInfo.width);
  36.  
  37. // Save Image
  38. if(!err) err = EdsSaveImage( mimageRef, imageType, saveImageSetting, targetStream);
  39. // Release
  40. if(targetStream) EdsRelease(targetStream);
  41.  
  42. return err;
To copy to clipboard, switch view to plain text mode