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

FrameMaker Internal Errors when using script to generate FM books

New Here ,
Oct 24, 2018 Oct 24, 2018

Copy link to clipboard

Copied

I developed a script to automate the generation of large FrameMaker books from Ditamap and XML files.  The script successfully generates 2 or 3 of these large books before FrameMaker crashes midway through the book generation with the following error message:

FM error.PNG

The point at which FrameMaker crashes appears to be totally random and the internal error code often changes as well.  Some research on these forms led me to believe that it was due to saving the book to a network drive, so I modified the script to save to my C: drive and the crashes got WORSE!  My FrameMaker 11 is patched to the latest version and I've got 50 gigs of free space on my drive.

I use the following function to save the ditamap/xml files as FM books:

function saveToFm(fileObject, savePath, ditaValFile) { 

    var saveParams = GetSaveDefaultParams(); 

   

    var i = GetPropIndex(saveParams, Constants.FS_FileType); 

    saveParams.propVal.ival = Constants.FV_SaveFmtBookWithFm;

   

    var i = GetPropIndex(saveParams, Constants.FS_DitavalFile); 

    saveParams.propVal.sval =  "ditaVal dir filepath" + ditaValFile

   

    var saveAsName = savePath; 

    var returnParamsp = new PropVals(); 

    fileObject.Save(saveAsName, saveParams, returnParamsp); 

My "ditaVal dir filepath" is a network drive location, but I removed it from this post to protect personal/company info.

One solution I thought of is closing and reopening FrameMaker after every successful book generation, but app.Quit() doesn't work and app.Close() only works if I run the script from FrameMaker, which means that once the app closes it will not reopen.

I created 2 .bat files, one to launch and one to quit FrameMaker, but when I use the quitFM.bat in the script it is then unable to relaunch FrameMaker with the startFM.bat.  Both .bat files do exactly what I want when I run them by themselves.

Any ideas how to fix this?

TOPICS
Scripting

Views

884

Translate

Translate

Report

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 ,
Oct 24, 2018 Oct 24, 2018

Copy link to clipboard

Copied

FrameMaker may just be leaking out memory on big process like this. You may want to try downloading and installing a trial of the 64-bit version of FrameMaker 2019. You should be able to install it side-by-side with FrameMaker 11.

Votes

Translate

Translate

Report

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 ,
Oct 24, 2018 Oct 24, 2018

Copy link to clipboard

Copied

The company I work for has setup their FrameMaker with custom output templates and other features so that all our operator's manuals, those are the large books I'm generating, have the same style and format.  I don't think that FM 2019 would play nice with the old template system.  The guy who created that convoluted mess is long gone so upgrading to 2019 is a nonstarter.

Is there any way that you know of to have FrameMaker restart after successfully generating a book?  If I could use one Extendscript Toolkit script to call another Extendscript Toolkit script, passing the second script some parameters and giving a return valve back to the second script I could do it.  But I can't find any way to do that.

Votes

Translate

Translate

Report

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 ,
Oct 24, 2018 Oct 24, 2018

Copy link to clipboard

Copied

I can't see any reason why you couldn't open up the existing templates in 2019 and have them still work. I have an inexpensive ConvertDoc script for batch converting FrameMaker documents. I have clients that up-convert FrameMaker documents all the time and they work fine in the later version. As long as your templates are backed up, it is worth a try to move to 2019 and see if it makes a difference. Since you are using DITA, you can experiment with the built-in templates first. If you need help with this, please contact me offlist.

Votes

Translate

Translate

Report

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 ,
Oct 24, 2018 Oct 24, 2018

Copy link to clipboard

Copied

It is for sure a memory leak .  I watched the process steadily eat up more and more RAM till it hit 420,568K and died.  Has the latest version of FM actually fixed this memory leak or does it just have more memory to burn cause it is 64 bit?

Is calling scripts from scripts or restarting FM mid script even possible?  If it is I'm much rather go down that road than deal with the headache of convincing the company to buy more software licences.

Votes

Translate

Translate

Report

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 ,
Oct 24, 2018 Oct 24, 2018

Copy link to clipboard

Copied

LATEST

I don't think memory leaks are an issue any more with later versions of FrameMaker. I don't know about restarting FM mid script, but in my opinion, you are going down the wrong road with this. You are trying to push FrameMaker 11 beyond its capabilities. If you are not willing to at least explore FrameMaker 2019, you will probably have to be content with running your script in stages.

Votes

Translate

Translate

Report

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