Skip to main content
Participant
May 29, 2017
Question

FM12 crashes during script execution

  • May 29, 2017
  • 1 reply
  • 776 views

Hello, could someone help me with next problem?

Fm12 problem.


Script goes through book, opens file, saves it and then closes it. This operation is executed for all files in a book.

Problem occurs after 110 - 120 file is processed. Either FM crashes completely or finishes, but book is closed and not all files are processed.

I could attach the book and script to simulate the situation (in the case folder c:\temp, has to exist, log will be saved there)

Thank's a lot for any help.

This topic has been closed for replies.

1 reply

4everJang
Legend
May 29, 2017

When you open a file, FM by default checks cross-references to other files, which causes other files to be opened and closed in the background. As you have many files in the book, this might eventually hit some memory boundary due to possible memory leaks in the FM12 code (I know there are memory leaks but nobody really knows in which areas).

If you have not already done so, try the following approaches:

1) Make sure to tell FM not to update cross-references when opening files. This might not be an option if you need to have the cross-refs updated - in which case you need to go with scenario 3 below.

2) Open all files invisibly. This is much faster and causes some of the code not to be executed (which may bring down the memory requirements).

3) Open all files invisibly first (making sure FM does not check cross-references), then run the update book command to fix the cross-refs if that is required), then save all files, then close all files.

Let me know if any of these scenarios solves your problem, and which one did the trick.

Good luck

Jang

Participant
May 30, 2017

We have book where no cross references are used. And we found out that opening documents invisible helps to solve the problem. For some function we can use this approach. But we have function like find where we need to open documents visible and for this there is NO SOLUTION. And also when the user opens documents for editing and that for example tries to use Find, reaching the limit of 100 file, the FrameMaker will crash.

4everJang
Legend
May 30, 2017

it should not be required to have more than a handful FM files open at any time. I cannot imagine a user that can mentally handle over 100 open FM files at the same time. Even when the user wants to run a Find command on all the files in an FM book, this can be handled without first opening all files. The user is only interested in the files that have the text snippet in them, anyway.

When you open the book only and then run the Find command on the book, FM will open and close the files as required. I have used this feature many times on large projects.

If you do need a scripted Find method, you can open files invisibly and make them visible when the Find function gives a hit in that document. But I seriously doubt that you need any scripting at all in your user scenario.