Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

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

Participant ,
Dec 31, 2015 Dec 31, 2015

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?

TOPICS
SDK
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Participant , Jan 01, 2016 Jan 01, 2016

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!

Translate
Community Expert ,
Dec 31, 2015 Dec 31, 2015

try:

val.stream = stream;

and only then call AEGP_GetNewStreamValue().

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 01, 2016 Jan 01, 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).

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 01, 2016 Jan 01, 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)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 01, 2016 Jan 01, 2016

I think I got a valid stream, here's the address 屏幕快照 2016-01-01 下午4.31.25.png

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 01, 2016 Jan 01, 2016

that actually doesn't look right...

what's the layerH address you have?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 01, 2016 Jan 01, 2016

The layer address is 屏幕快照 2016-01-01 下午4.42.42.png,and the stream address is屏幕快照 2016-01-01 下午4.42.48.png

Before requiring the layer stream, I also used "ERR(_suites->LayerSuite7()->AEGP_GetLayerMaskedBounds(layer, time_mode, time, bounds));" to get the layer's bounds, and the bounds is correct.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 01, 2016 Jan 01, 2016

i don't think you're getting a valid stream.

the first value is waaay to high, and the second seems like garbage ram.

could it be that you're trying to get the anchor point of a layer that

doesn't have one? (like an audio layer, or a camera (i think a camera has

not anchor point))

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 01, 2016 Jan 01, 2016

Yes, I agree, because the second address is always "0x53535353" every time I run the code.

I'm not trying to get the anchor point from a layer that doesn't have anchor point property, I'm trying to get it from a solid layer.

I tested my code using "Instruments", found a memory leak at this line 屏幕快照 2016-01-01 下午4.59.39.png

Maybe this memory leak messed up the layer stream?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 01, 2016 Jan 01, 2016

i don't know. that would take some scrutiny of the code.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 01, 2016 Jan 01, 2016

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?


Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 01, 2016 Jan 01, 2016

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!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Dec 07, 2016 Dec 07, 2016
LATEST

Hi Zhiqiang_Li,

I think i have exactly the same problem.

I wrote an AEGP plugin with the User Interface in Qt (QtGui / QtCore).

It works fine with CS6 but doesn't work on CC 2017.

The reason is AEGP_GetProjectByIndex(0, &project) return NULL.

When you say: "I move all the ae operation to the idle hook" what do you mean ?

What do i have to change or add in my code ?

Thanks for helping,

Regards

Stéphane.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines