13 Replies Latest reply on Aug 17, 2017 7:33 AM by extendersGame

    app.open() crashes InDesign after repeatedly opening a template


      So I was writing a script that batch builds specialized books from a list of order files when I ran into an odd issue with InDesign crashing, (no exception is reported when run through ExtendScript toolkit, the program just crashes complete with a windows popup of "Adobe InDesign CC 2017 has stopped working" )


      After an extensive debugging process, I determined that the crash always happens at app.open()

      Further testing showed that it does not matter if its opened as a copy, or which template it is, just that it is opened many times in the same script.

      I proceeded to test on several computers with windows 7 and 10, varying hardware, and varying versions of InDesign CC 2017 all with the same results save one that offered this error report:


      Problem signature:

        Problem Event Name: APPCRASH

        Application Name: InDesign.exe

        Application Version:

        Application Timestamp: 57f545c7

        Fault Module Name: DV_WidgetBin.dll

        Fault Module Version:

        Fault Module Timestamp: 57f54502

        Exception Code: c0000005

        Exception Offset: 000000000003b755

        OS Version: 6.1.7601.

        Locale ID: 1033

        Additional Information 1: 937c

        Additional Information 2: 937cd28da0d9cc614dbe2c8fd27dd239

        Additional Information 3: 2bc1

        Additional Information 4: 2bc19be4be45607293e6e95449d7f364


      I have compressed the code down to 8 lines with the same result. If you want to test it,

      you will also need an indt file with the name blank in the same directory. This can be as simple as a 1 blank page template


      #target "Indesign"

      var directoryRoot = (new File($.fileName)).parent;

      var template = File(directoryRoot + "/blank.indt");

      for (var m = 0; m < 100000; m++) // arbitrarily high number it never reaches


          var doc = app.open(template, true, OpenOptions.OPEN_COPY); // The program crashes on this line




      This version tends to run for about an hour on my machines and the original batch script tended to make between 40 and 1500 books before crashing.


      I could not find any similar reports in the forums but if anyone knows a solution I would really appreciate it as this bug is rather debilitating to my planned work flow.