Skip to main content
Inspiring
November 28, 2017
Answered

Weird bug when opening an aep file

  • November 28, 2017
  • 1 reply
  • 4761 views

Hi

I have just completed my first custom control with arbitrary data. I felt very pleased.

Until my last bit of testing.

If I use the effect with my custom control, then save, then open the saved file by double clicking it, I get the following behaviour.

1) A popup message saying Your disk cache folder is on a drive that does not have enough available space to safely store the full amount specified in your preferences.

2) I click OK and the project loads.

3) When I swap from the project panel to the Effect controls panel AE enters a seemingly infinite loop of displaying dialogs saying After Effects Error : Not able to acquire AEFX Suite (516) (25:: 101).

The frustrating thing is that the same problems do not occur if I use File->Open or if I run AE in my debugger with the project file as a parameter following the AE executable path. This is making it very difficult to debug.

I wondered if there is a multithreading race problem that the debugger is disguising. I've tried to be very careful to check return values and buffer sizes so I'm hoping it's not a buffer overrun or pointer issue.

If anyone has any thoughts I would welcome them. Especially if anyone knows the what kind of interactions happen with plugins during project load.

Phil

This topic has been closed for replies.
Correct answer philrosenberg2013

i'm trying to get a better understanding of what's going on there.

without executing through the debugger, what happens when you just open the

project on 2014 and on 2015?


Hi Shachar

I have had time now to properly test out variations of how things work. Here is a summary

In AECC2015 everything works perfectly.

In AECC2014, Drawbot Image Suite version 1 (the only version) and the Drawbot Surface Suite version 2 fail to load. Note that in AECC2015 version 2 is the current version, and therefore is the version that will be attempted to be loaded if you used the 2015 SDK with either AEFX_AcquireDrawbotSuites, AEFX_DrawbotSuitesScoper or passed kDRAWBOT_SurfaceSuite_VersionCurrent when loading the suite.

Here is the bit that causes the really big problem though. If using either AEFX_AcquireDrawbotSuites or AEFX_DrawbotSuitesScoper, then when the suite loading fails an error message is put in out_data->return_msg. When the plugin returns control to AE a dialog is displayed showing the message. The user presses OK and focus returns to the main AE window. This appears to trigger a rerender of the custom control, the plugin again attempts to load the suite and generates another dialog box with the same error message and when the user presses OK it triggers another rerender........... INFINITE LOOP!

It is also worth adding that AEFX_AcquireDrawbotSuites and by extension AEFX_DrawbotSuitesScoper provide pointers to 6 suites. However only 4 are actually initialised. DRAWBOT_PenSuite and DRAWBOT_ImageSuite are both left as uninitialized pointers.

1 reply

Inspiring
November 28, 2017

I have traced the bug to attempting to get the drawbotsuites for rendering my custom control. For some reason this is failing and as it does so it generates dialog boxes which happens in either an infinite loop or repeatedly that it might as well be.

I was using a AEFX_DrawbotSuitesScoper object to check them out, but I've just tried using AEFX_AcquireDrawbotSuites and got the same results. But however I do it, it is the line of code that checks out these suites that is causing my problems.

Is there any reason why this would fail sometimes.

Community Expert
November 29, 2017

is it failing during PF_Event "Draw", or are you using drawbot during some

other event/call?

On Wed, Nov 29, 2017 at 1:55 AM, philrosenberg2013 <forums_noreply@adobe.com

Inspiring
November 29, 2017

Hi Shachar

Yes, it is failing during PF_Event_DRAW, I'm just grabbing the suites at that moment when AE requests me to do the drawing - not before. I'm not saving any draw details to revive it.

The infinite looping is puzzling also - I think (although it is hard to tell for definite because I don't see the bug in the debugger) either AE may be sending me PF_Event_Draw over and over again or AEFX_AcquireDrawbotSuites must be looping to try to get the suites repeatedly. I've tried setting eventExtra->evt_out_flags |= PF_EO_HANDLED_EVENT even when suite acquisition fails, but the loop still occurs.

I almost feel like if I could supress the dialog then AE might just sort itself out after a while once initialisation is finished.

Is there a way to load the suites individually? I have an AEGP_SuiteHandler object and I can see suites.DrawbotSuiteCurrent(), but not the other suites that AEFX_AcquireDrawbotSuites check out.