Skip to main content
Inspiring
January 1, 2016
Answered

Keep getting "internal verification failure{no current context}" error when using stream suite

  • January 1, 2016
  • 1 reply
  • 2510 views

Hey guys, I'm trying to getting some layer stream using stream suite, but I keep getting "internal verification failure{no current context}" error on After Effects cc 2015. but the same code working fine on After Effects cs6. Here's my code,

AEGP_TwoDVal value;

A_Err err = A_Err_NONE;

AEGP_StreamRefH  stream = NULL;

ERR(_suites->StreamSuite4()->AEGP_GetNewLayerStream(_plugin_id, layer, AEGP_LayerStream_ANCHORPOINT, &stream));

AEGP_StreamValue2 val;

AEGP_StreamValue2 *sample_val = &val;

AEFX_CLR_STRUCT(val);

ERR(_suites->StreamSuite4()->AEGP_GetNewStreamValue(_plugin_id, stream, time_mode, time, ignore_expression, &val)); // "internal verification failure{no current context}" at this line

value.x = val.val.two_d.x;

value.y = val.val.two_d.y;

ERR(_suites->StreamSuite4()->AEGP_DisposeStreamValue(&val));

ERR(_suites->StreamSuite4()->AEGP_DisposeStream(stream));

And the error code is "A_Err_PARAMETER".

But the code is working fine on CS6. Have you guys ever running into this problem?

This topic has been closed for replies.
Correct answer Zhiqiang_Li

Hi shachar,

I've been testing. I found that I can't even get my project by using "AEGP_GetProjectByIndex(0, &project)".

The address is always 0x00.

What I didn't mention is that I'm writing a AEGP plugin with a native panel. I created my panel using cocoa. And these operations are called when user click a button. The code looks like this,

[test_btn setTarget:self];

[test_btn setAction:@selector(generate_action)]; // those AE code is in the "generate_action" function


I notice from the sdk document, since After Effects CC 2015, the ui thread and render thread are separated.

Could the reason I can't get simple AE sdk code working is that I'm calling them from UI action? Do you have any experience with this?



Yes, I think the thread problem is the case. I move all the ae operation to the idle hook, and now things are working fine!

1 reply

Community Expert
January 1, 2016

try:

val.stream = stream;

and only then call AEGP_GetNewStreamValue().

(after you call AEFX_CLR_STRUCT, of course...)

Inspiring
January 1, 2016

Thanks shachar, but still not working with

A_Err err = A_Err_NONE;

AEGP_StreamRefH  stream = NULL;

ERR(_suites->StreamSuite4()->AEGP_GetNewLayerStream(_plugin_id, layer, AEGP_LayerStream_ANCHORPOINT, &stream));

AEGP_StreamValue2  val;

AEGP_StreamValue2  *sample_val = &val;

AEFX_CLR_STRUCT(val);

val.streamH = stream;

ERR(_suites->StreamSuite4()->AEGP_GetNewStreamValue(_plugin_id, stream, time_mode, time, ignore_expression, &val));

By the way, I get my layer from a AEGP_CollectionItemV2 item (from selection).

Community Expert
January 1, 2016

are you getting a valid stream ref? can you check that it's non NULL?

(and also not any hexspeak like 0x8BADF00D or 0xDEADBEEF)