Possible bug: Crash after script runs... runs OK in ESTK.
I believe this might be a bug since it crashed Illustrator rather than the script crashing gracefuly.
I have a script which, when completed, crashes Illustrator. The script runs fine when ran from within the ESTK but crashes when ran from the AI File->Scripts menu. Attached is the crash log. I cannot post the script itself here but am willing to send it to an Adobe employee privately if needed.
Thanks for sharing the script, we are able to repro the issue at our side & have forwarded it to the engineering team for further isolation.
With Best Regards,
Did you receive the emailed script from the original question (could not post publicly)? Any chance this bug may be fixed in the next release?
One thing I failed to menton is that this script used to run fine in Illustrator but started crashing AI after an update. Unfortunately, I do not remember which version of AI started causing the crashes, but it was quite awhile ago.
LEMONNIER Philippe commented
when I run this script in Illustrator CC it crashes. It doesn't crash if I try to change another of the characterAttributes.
Crash of illustrator 2018 CC 22.1 (64 bit)
script runs from extendScript toolkit 18.104.22.168 extendScript 4.5.5 scriptUI 6.2.2
windows 10 Famille
mySelection = docRef.textFrames ;
lng = mySelection.length ;
for (var i = 0; i<lng; i++)
mySelection[i].textRange.characterAttributes.textFont = textFonts.getByName("OpenSans-Regular") ;
//in attachment the fullScript and the ai file