BRAW SDK 1.3 - GetClipAttribute crashes

Ask software engineering and SDK questions for developers working on Mac OS X, Windows or Linux.
  • Author
  • Message
Offline

Hendrik Proosa

  • Posts: 3015
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

BRAW SDK 1.3 - GetClipAttribute crashes

PostFri Apr 12, 2019 1:50 pm

I'm trying to move my small app from SDK version 1 to version 1.3 but have problem with GetClipAttribute method that takes an attribute and VARIANT and fills the variant with attribute value. It compiles without errors but crashes on runtime:
Code: Select all
// Load frame development settings from file
VARIANT colorScienceGen;
result = processingAttrs->GetClipAttribute(blackmagicRawClipProcessingAttributeColorScienceGen, &colorScienceGen);

Am I using the VARIANT data type incorrectly or what might be the reason for runtime crash? If I comment it out, everything else works as expected. Adding VariantInit(&colorScienceGen) as second line makes no difference.
I do stuff.
Offline

CaptainHook

Blackmagic Design

  • Posts: 2054
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostFri Apr 12, 2019 11:55 pm

Hey, can you post some more info?
What pipeline/flow/OS are you using?
Can you get other clip attributes such as gamma/gamut/etc? What test clip are you using?
Could you provide more code of what you're trying to do? Feel free to pm me if you would rather not post publicly.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Hendrik Proosa

  • Posts: 3015
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostSat Apr 13, 2019 7:30 am

Hi, thank you for getting in touch. After digging around I took a peek into my application using processhacker and discovered that it loaded wrong DLL file which caused crash when using any of the new methods. I don't use the CreateBlackmagicRawFactoryInstanceFromPath method yet for directing it to DLL path and thought that if it is in application directory it would load first. Seems though that library from previous version that I had registered in system loaded instead.

So it seems everything works now :)

Just in case I'll put down my details in case something else fails and I need more help.

OP Sys: Win 7 x64
Compiler used: MSVC2015 x64 compiler
Currently use CPU decode pipeline, nothing fancy yet, no manual decoder flow
Test clips are the ones that came when BRAW was released (wedding etc) plus some test footage from net

I started moving to new sdk by the plain basic way of eliminating compiler errors first and after that was done, started digging why it crashed. As getClipAttribute was actually first method in my soft that had syntax changed, it produced the crash when old dll was loaded. After commenting all the get/set methods out, playback worked.
I do stuff.
Offline

CaptainHook

Blackmagic Design

  • Posts: 2054
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostSun Apr 14, 2019 11:39 pm

Okay glad you got it sorted. It is an important note that change from the read me:
• Removed BlackmagicRawAPI.dll registration as a system COM object (users are recommended to bundle in to their application).

Let us know if you have any other problems.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**
Offline

Hendrik Proosa

  • Posts: 3015
  • Joined: Wed Aug 22, 2012 6:53 am
  • Location: Estonia

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostFri May 03, 2019 8:59 am

Hi, I'll add my new question to old thread...

I'm trying to get CUDA decoder to work and have set everything up similar to ProcessClipCuda code example. I can successfully create cuda context and switch pipeline to CUDA, also verifying with GetPipeline tells me current pipeline is 'cuda'. What fails is that ProcessComplete returns an error code -2147467259 (E_FAIL), not S_OK as result. Returned resource is properly identified as CUdevieptr.

What might be the reason ProcessComplete fails in CUDA pipeline?

PS. Does anyone have a working example of how to properly use CUDA resources? I have a so-so idea of how to handle it, but a working example would be nice.
I do stuff.
Offline

CaptainHook

Blackmagic Design

  • Posts: 2054
  • Joined: Wed Aug 22, 2012 4:50 am
  • Location: Melbourne, Australia
  • Real Name: Hook

Re: BRAW SDK 1.3 - GetClipAttribute crashes

PostMon May 06, 2019 12:45 am

Hi, are you using the manual flow now or still the "auto"?
What are you doing different to the ProcessClipCuda code example? I assume the example works for you fine?Might need to see some of your code to get a better idea. Feel free to send privately via PM if you would rather.
**Any post by me prior to Aug 2014 was before i started working for Blackmagic**

Return to Software Developers

Who is online

Users browsing this forum: No registered users and 21 guests