Skip to main content
June 26, 2012
Question

Batch File Creation Problem CS5.5

  • June 26, 2012
  • 1 reply
  • 5535 views

I am having an issue creating aep files on our farm using aerender in CS5.5.  We have a script that uses a template aep to generate a new file for various shots.  It works fine in CS4.  When I use the same script in CS5.5 it creates a file, but when you try to open it, it gives the following messages:

After Effects warning: Reading past end of file

After Effects error: strange situation [0/2].  (26 :: 84)

At which point AE either crashes or leaves a blank file.

However, if you try to import the same file, it works fine and everything appears as desired.

If I run the same script through the CS5.5 UI (AfterFX.exe as opposed to aerender.exe) the file generated opens without issue.

I also tried stripping out parts of the script to see if removing elements fixed the issue.  It did not - in fact I made a new script to try in batch mode that only saves a file.  This results in the the same

After Effects warning: Reading past end of file

but no errors, though I imagine that's because it's a blank project to begin with. 

Here is the code for that script:

function testBuild() {

    var saveMe = new File("//server/job/comp/dev/work/test/shot/file_test.aep");

    app.project.save(saveMe);

}

We are using a slightly modified version of commandLineRenderer.jsx that allows extra flags to run pre-render scripts and submit without rendering.  I merged our custom edits with the version that ships with CS5.5 to ensure continuity.  Again, the script works in CS4 (even w/ the updated custom CS5.5 version of the commandLineRenderer.jsx).

Here's the command that runs on the farm:

aerender -s 1 -e 1  -norender -script //server/job/bin/dev/testBuild.jsx -command "testBuild()"  2>&1

the -norender -script and -command flags were things we added to commandLineRenderer.jsx, -norender indicates not to render the project, -script gives the script to load and -command the command to run.

The issue seems directly related to saving using aerender.exe in CS5.5 since everyting works correctly in CS4 and in the CS5.5 UI

We are running Windows 7 64-bit.

Thanks for any help you can provide!

This topic has been closed for replies.

1 reply

Lazlo_Hollyfeld
Inspiring
September 7, 2012

I've encountered this error before, and believe it to be a bug in AE CS5.  I have not tried with AE CS5.5 or AE CS6.  However, it's quite annoying. 

In my situation, I run a script on an AEP file, and everything comes out as expected.  When I start an AE gui session, and open the AEP file that I operated on, it gives me the exact error you specify.  "Strange situation" has got to be the worst echo a programmer could ever write.  There is nothing specific about the error except "reading past end of file".  Now why would a program ever do that?

Anyways, so I'm not creating a new files from within a script like you, but the original AEP file that is using the script essentially gets corrupt.  It turned out that if I removed all effects from all my layers, that didn't happen.  But hey, the program is called After "EFFECTS" so it defeated the purpose.  So what I did was that instead of calling the script on the base AEP file, I would make a copy of the base AEP file first, then operate on that, and throw away the copy after the script ran.  It's a workaround for me, but I still think it's a bug that Adobe has not looked into. 

And yes, I submitted a report about a year ago about it.

Let me know if you find any new information!

Thanks!

Participating Frequently
October 11, 2012

Hello everyone,

I'm experiencing the same issue, and it is quite annoying..

I am trying to make a composition in a workflow and has to be without the UI of After Effect, but there is a problem...

So, to sum up the situation (for me but it seems that it's quite the same thing as you) :

- Using a .jsx script to save a file (regardless the complexity of the comp.),

- Using a .bat file to lunch Ae and the script

- Using the flag -noui (so as you know, launching Ae without the UI),

- It seems to occure for CS5 and CS6, I could not try this with CS4.

In fact when we don't use the -noui flag it does work, but not what I am looking for....

If there is anyone to confirm that it's a bug, as Lazlo said, or if it's bypassable (wut?), I would really be glad.

Thanks,

Best Regards

Lazlo_Hollyfeld
Inspiring
October 11, 2012

Does the problem occur on a brand new project file without anything inside it?  Void of comps, layers, items in the project window?