Copy link to clipboard
Copied
Env Windows 10 1909, FM 2019 15.0.5.838 (x64)
My client has a process, coded in c++, to add line numbers to a structured document. I know... why! The line number has to be outside of the text frame, so it could not be a element, and the inbuilt line numbering was not customisable. The line numbers are required for legislative review. Another customer uses a similar process for the same reason. another process removes the line numbers.
Recently after this process was run, sometimes the line numbers would not stick, that is not be there when the document was saved, and worse, other changes would also not stick.
To cut to the chase (this has taken me many hours), the symptom is that after the process to add or remove line numbers was performed, when clicking the X to close the document, FrameMaker displayed a Save File dialog, even although the document had been saved by the code. Saving manually via File->Save also made no difference.
After clicking Save FrameMaker showed the following dialog.
After clicking OK FrameMaker showed the first dialog.
Clicking Don't Save would allow the document to be closed. Sometimes the document when opened, woudl not have the line numbering on or off as expected. I also expect that the loss of other changes was related to subsequent processing, where the code has very little error checking, so would continue, if the FDK calls returned errors.
The other symptom is the presence of temporary or intermediate files as shown below. How many there were seemed to influence whether changes were lost.
Now the bizarre bit. My customer could re-produce this problem at will, usually at a critical time, while I never could. In investigating why this was, I worked out that the failure did not occur with certain workspaces, mine for example. In drilling down to work out why, I discovered it was the complete absence of the 'Element Validation' panel/pod, that is Structure->Validate has never been run with the workspace, so the //palette element attribute app-data="#lt;palette kit-data=#quot;3 32 #quot;/>" does not exist in the fws or cfws file for the workspace. Once the 'Element Validation' panel/pod has been shown, and the //palette exists, even if the 'Element Validation' panel/pod has been hidden, the problem does not occur! Bizarre.
I will update FM2019 in my own environment to see if the problem still occurs as well as testing with 2020. It looks like the error dialog regarding an internal error and the temporary or intermediate files have been reported by others. Maybe the absence of the 'Element Validation' panel/pod was a factor there too?
I am not sure how I can report this as a bug to Adobe!
Time to put my head down!
Jon
 
Copy link to clipboard
Copied
I forgot to add (I am a little bit tired :-)) that I tested using the Blank workspace. The line numbering process would fail. Once I showed the 'Element Validation' panel/pod, the process did not fail!
Copy link to clipboard
Copied
Another factor with this bug is that if the Preference 'Lock files on Network' is checked, the problem does not occur.
So if either 'Lock files on Network' is checked or the 'Element Validation' panel/pod has been shown in the current workspace, hidden or shown, the problem does not occur.
I should have included in the description that the line numbering is achieved by adding anchored frames, outside of the page text frame.
Today I have tested with 15.0.7.973 (I cannot install Update 8 as there seems to be a problem with the download page) and 16.0.1.817, and the problem still occurs, if 'Lock files on Network' is not checked or the 'Element Validation' panel/pod has never been shown in the current workspace.
Now to find the time to create a bug report!
Copy link to clipboard
Copied
If the line number process is happening within Fm, the first thing to do is to disable that process to see if it's causing the issue.
However, the odd naming issue looks like it would be solved by resetting your preferences.
See https://techcomm.tools/fm-prefs for more info.
-Matt
Copy link to clipboard
Copied
Hi Matt,
Many thanks for taking the time to reply.
Isn't it a moot point to suggest not using the line numbering process? The line numbering process is what is having the problem. I am sure you are not suggesting that the customer manually add thousands of line numbers, remove them, rinse and repeat?
In any case, the work around of having the Element Validation panel/pod in the workspace, hidden or shown, allows the process to work perfectly, and alleviates the horror of having to do it manually.
With changing the preferences are you referring to either Automatic Backup on Save or Auto Save?
With these checked FrameMaker creates a *.backup.fm or a *.auto.fm. These are not what this bug creates. These preferences are not used in my customers environment as any saves, CTRL+s for example, are automatically sent to the back end CMS system, and any processes that change documents also save automatically.
If I rename one of the temp/intermediate files, created by the bug, and open it in FrameMaker I see a copy of the original document at various stages of the line numbering process.
Jon
Copy link to clipboard
Copied
No, not a moot point, because if the additional coding that is doing the numbering is to blame, then it is a plug in dev issue, not an Adobe issue
Copy link to clipboard
Copied
Matt,
I am not sure where you are coming from with this. Doesn't the fact that, with either the panel/pod Element Validation shown or hidden or the preference Lock files on Network checked, the process, and therefore the code, works without error, suggest that the code has no basic issues? The code in it's present form has been used for years. Looking back at internal support calls it seems this problem might have started after the upgrade to 2019 and users have been using various approaches to overcome it.
I have been writing plugins in c++ with FrameMaker since version 7. I have had to work around a number of issues in the FDK/FrameMaker in that time, notably bookmarks in 9 and crashes when walking the element tree. I have, where ever possible, created bug reports.
The code in the line numbering case is using Fcodes to move to the end of a line, add an anchored frame and then a number in a text frame, then move to the end of the next line. Not exactly complicated. I will try and create a bug report.
Another wrinkle with this process, that I have not reported here yet (or a bug report), is that in certain cases, FrameMaker places the anchor for the frame at the start of the next line, so the line number doubles up. It looks like it has something to do with element ends also at the end of the line.
This post was really a FYI. I have got a reliable workaround.
I also found a number of posts referring to the internal failure dialog as well as the file extensions so it seemed worthwhile going (and continuing) the effort of creating this post.
Jon
Copy link to clipboard
Copied
First things first...I just noted at the bottom of your post that you didn't know how to report the bug to Adobe...
Go to https://tracker.adobe.com/
to report the issue.
Regarding your last reply, I suggested you reset your preferences, which involves renaming the prefs folder in your roaming directory and restarting. I gave you the link to a post that describes that.
Sorry if you took offense at my suggestion to consider the plugin as part of the issue. In my experience, the bug isn't "on" Adobe, unless it can be reproduced in a clean environment. By that, I mean a properly updated version of the product, with no 3rd party add-ins, and with simple, straightforward content.
What "worked" previously might certainly break if/when Adobe changes the product.
I'm certain you'd be able to confirm this, and once eliminated, other things could and should be looked at.
Have you tried reverting to an earlier version of Fm to confirm that the processes still work there? If you can isolate to a specific update, you might help the team isolate the issue for them (or for you) to fix.
-Matt
Copy link to clipboard
Copied
Hi Matt,
Thanks again for replying. None of my customers use FrameMaker without customisation. The two who use line numbering use a custom CMS which could never be supported by the builtin CMS support. In my years of developing, I have found most customers use customisation of some sort to run processes that are repeated often or would require hours of manual effort. Adobe provide the FDK and recently Extendscript support to faciliate this customisation. Other customers in this area use X-Metal or Oxygen or Word, with customisation of some sort to meet their business requirements.
So imho Adobe provide the FDK, so it is valid to report on issues with the FDK. Lets agree to disagree on that and move on.
As for creating bug reports, I have created many. The problem is in recreating the bug in an environment I can share with Adobe. Both customers use a custom structured application which I cannot share, due to IP concerns, so I need to re-create the bug in a standard environment. Searching the bug tracker site will reveal that I have achieved this a number of times.
Jon
Copy link to clipboard
Copied
Hi Jon. How is the plug-in invoked? Through a menu command or is it triggered by one of FrameMaker's events?
Copy link to clipboard
Copied
Hi Rick,
From a menu command. There is no obvious sign of a problem when either the add or remove line number process is running, except they seem to take longer (not quantified). Memory usage (observed, need perfmon logging to be sure) remains at about the same amount throughout. The remove process also triggers the problem, which is surprising, given it is just removing the anchored frames. I will try Update 8 next, to see if that makes any difference for 2019.
Thanks.
Jon
Copy link to clipboard
Copied
OK. I asked because sometimes invoking scripts through events can cause odd script/FDK issues.
Copy link to clipboard
Copied
The problem still occurs with Update 8 (15.0.8.979) installed.
Copy link to clipboard
Copied
An update - the problem of the creation of intermediate files was still occuring, even with the element validation pod shown, in my customers environment. After an afternoon of try this/try that, I found the cause to be the FDK call F_ApiSimpleSave. Replacing this call with F_ApiSave, with the appropriate properties set, resolved the problem. The customer has now been through a week of production, in circumstances where the problem occured a lot, without a single occurence.
I am much happier creating a bug report with this as the cause! ☺