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

Illustrator error occurred 1346458189('MRAP') while accessing font color after closing a doc

New Here ,
Feb 17, 2025 Feb 17, 2025

Copy link to clipboard

Copied

I have a jsx script that retrieves the font color of every TextFrame object in the active document and does a couple of math ratio checks.

The script runs fine when i run it on an active doc, i have tried running it 5-10 times without any issues repeatedly. It also works when I open a new doc with the old doc still open in a tab, and again it works repeatedly.

However  the minute I close an active document, and try to rerun the script on another doc (new or open in a tab), I am running into this error "Illustrator error occurred 1346458189('MRAP')" .
the error is always thrown at this specific line 

 

pageItem.textRange.characterAttributes.fillColor

 

 

i have tried the suggested solutions of $.gc() and reducing variables used in loops to no avail. I think this is more a Illustrator bug as it happens in a very specific scenario of closing an active document and is not specific to any doc.

The rest of the code runs fine always.

Any help/suggestions would be appreciated!

All the other parts of the code run fine

TOPICS
Bug , Scripting

Views

77
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
Adobe
Community Expert ,
Feb 17, 2025 Feb 17, 2025

Copy link to clipboard

Copied

the mrap error usually ocurrs at random lines that shouldn't rise errors.

 

when you say you reduced the variables in loops, are you saying some variables are still in the loop?

 

I think gc() has never worked.

Votes

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
Explorer ,
Feb 17, 2025 Feb 17, 2025

Copy link to clipboard

Copied

LATEST

I have run into these MRAP issues and its typically when a document hasnt been saved or there isnt an object I think there is or even an item with effects which show up as plug-in items. I would start by checking for textframes with fills and then loop through those first. If your looking for text frames and trying to get their fill colors when something isnt filled or have an empty text frame without characters youll have these errors.

Votes

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