Andreï Cavoleau
My feedback
2 results found
-
1 vote
The issue has also been fixed in the latest update of InDesign 2020 (ver. 15.1.3).
Please update InDesign 2020 to version 15.1.3 to get the fix.— Adobe InDesign team
An error occurred while saving the comment Andreï Cavoleau shared this idea · -
1 vote
Thanks for reporting the issue. We are reviewing it
-InDesign Team
Andreï Cavoleau shared this idea ·An error occurred while saving the comment Andreï Cavoleau commentedWe are developping a plugin for inDesign and while testing a new feature on a Mac we noticed that sometimes InDesign was crashing. We managed to reproduce this bug in a very simple indesign script that make inDesign crash 100% of the time and I'm looking for a way to get around this inDesign bug.
The crash occurs when we programatically add an htmlItem to a pageItem then close the document too quicky, It's only on Mac, doing that on windows works perfectly. The crash error seems to be a memory usage problem on inDesign's side.
Here is the script code :
var document = app.activeDocument;
var sourcePageItem = document.allPageItems[0];
sourcePageItem.htmlItems.add(
document.activeLayer,
LocationOptions.AT_END,
sourcePageItem,
{
geometricBounds: sourcePageItem.geometricBounds,
htmlContent: '<b>Hello</b>',
}
);
document.close(SaveOptions.NO);
other observations :
-Doing a sourcePageItem.htmlItems[0].remove(); to remove the htmlItem after adding it doesn't change anything, so the problem comes from using the function htmlItems.add() and not having an htmlItem in the document.
-Delaying the close by using $.sleep(5000) before fix the crash, but we can't rely on it as the delay needed increase with the number of htmlItems added and it might be different from a computer to another due to performances.
-Saving the document or not doesn't change anything
I've added the script, my clean document with just a rectangle frame and the crash report with this post.
If there is no way to fix it, do you have an idea to get around this inDesign bug ?An error occurred while saving the comment Andreï Cavoleau commentedWe are developping a plugin for inDesign and while testing a new feature on a Mac we noticed that sometimes InDesign was crashing. We managed to reproduce this bug in a very simple indesign script that make inDesign crash 100% of the time and I'm looking for a way to get around this inDesign bug.
The crash occurs when we programatically add an htmlItem to a pageItem then close the document too quicky, It's only on Mac, doing that on windows works perfectly. The crash error seems to be a memory usage problem on inDesign's side.
Here is the script code :
var document = app.activeDocument;
var sourcePageItem = document.allPageItems[0];
sourcePageItem.htmlItems.add(
document.activeLayer,
LocationOptions.AT_END,
sourcePageItem,
{
geometricBounds: sourcePageItem.geometricBounds,
htmlContent: '<b>Hello</b>',
}
);
document.close(SaveOptions.NO);
other observations :
-Doing a sourcePageItem.htmlItems[0].remove(); to remove the htmlItem after adding it doesn't change anything, so the problem comes from using the function htmlItems.add() and not having an htmlItem in the document.
-Delaying the close by using $.sleep(5000) before fix the crash, but we can't rely on it as the delay needed increase with the number of htmlItems added and it might be different from a computer to another due to performances.
-Saving the document or not doesn't change anything
I've added the script and my clean document with just a rectangle frame with this post.
If there is no way to fix it, do you have an idea to get around this inDesign bug ?
Hello Ravi Kiran,
I tested on build #56 and the issue is fixed. thanks a lot !
I've also noticed that it was indesign 2021, does it mean that indesign 2020 will never receive this fix ?
I'm asking because my company has created a plugin that relies on creating HTML in the document and some of our clients may not move to inDesign 2021.