Illustrator error occurred: 1346458189 ('PARM')
Copy link to clipboard
Copied
I'm so sick of these errors,
never had an issue before CC
anyone know what is causing these errors?
have been using this script all day and now it bugs out on me.
full script is below:
var doc = app.activeDocument;
var sel = doc.selection;
var TOmm = 2.83466796875;
Dim(sel);
function Dim(objs) {
for (var i=objs.length-1;i>=0;i--) { // loop through your collection of objects
var bounds = objs.visibleBounds; // Get visibal bounds, which are only visable bounds in some cases...
var b1 = bounds[0] /TOmm;
var b2 = bounds[1] /TOmm;
var b3 = bounds[2] /TOmm;
var b4 = bounds[3] /TOmm;
var W = Math.abs(b3-b1).toFixed(1);
var H = Math.abs(b4-b2).toFixed(1);
var txt = doc.textFrames.add(); // Create the text frame
txt.contents = "Size: "+ H + " x " +W + " mm W"; // Adds contents to frame
txt.position = [objs.left,objs.top - objs.height - 20]; // Positions the frame
};
};
Am I missing something in the quality of the Code?
Explore related tutorials & articles
Copy link to clipboard
Copied
Oh you're right!
I restarted my AI, and now I don't get the non-responsive ESTK or crash, I just get either working transient script or error message about no engine.
What believe I know about transient is that it is the engine used by the File > Scripts menu, because my startup scripts would activate every time one of those menu scripts was ran, and I had to use this to not have it do that:
if($.engineName != 'transient' && $.engineName != ''){
Also, I am not too clear on my memory, but there was also a no-name engine whose name was somehow an empty string, which also had to be accounted for in the above line.
Copy link to clipboard
Copied
Drat I just got Error Description: an Illustrator error occurred: 1346458189 ('MRAP')
The function was not properly wrapped and too many things were being zapped at Illustrator at a time.
newSpot.colorType = ColorModel.SPOT; caused the error.
The extension creates Ai (PDF) files on dropping xml files in a folder.
The error occurred on for only one of several documents that were already in the watch folder when Illustrator started.
On re-saving the XML the PDF was created without error.
I think in my case I should be able to get out of the problem.
Time for bed!
Copy link to clipboard
Copied
I just dumped 9 XMLs simultaneously in the watch folder and Ai produced the documents in a second with know problem.
The initial problem might be related to the extension opening a document on Illustrator opening.
Copy link to clipboard
Copied
This comment intrigues me: Watched folder … multi XML input … Ai automatically creating files in another directory = Joy!
Please tell me more…
Copy link to clipboard
Copied
I think I sorted out the MRAM problem, I think it was because I hadn't explicitly passed which document the add spot function was supposed to add the spot to so it defaulted to the active document, but as too much was happening Ai creating and opening, closing and send mails to many documents simultaneously it wasn't locating the activeDocument so I explicitly passed the document to the function and don't get the error any more.
The error started to occur when I got the extension to mail the documents, maybe that confuses the active document
Here's a screenshot
Here's a video, unfortunately, I couldn't upload the video to Vimeo for some reason so if you want to see it your have to download the mp4.
The video is less than a minute so you won't be bored for too long.
The workflow of the extension is.
1) On Ai execution load default document. This is because if there's no document open and one is created it takes a comparatively long time to create and close the new documents.
2) Looks at a selected folder to see if it's got any XMLs in it and keeps looking (Chodikar)
3) Checks the XMLs valid, if not send the XML as an attachment to the supervisor with and angry ecomotion. If valid calls the appropriate function in the jsx script
4) The jsx script creates the document using a very sophisticated and quick api I wrote for drawing shapes on Ai. The different XMLs will produce completely different types of document of the given dimensions and specification.
5) These files are saved in a folder for further processing, but I'm not involved with that bit.
6) If there's a problem it will be logged and mailed to the supervisor.
6.5) There's quite a bit of logging.
7) I the email config file has be set to true for emailing the files then they will be mailed like in the screenshot and video.
I had one method that could spit out a really lot of documents in a second but I was nervous that it could cause problems even though I didn't have any evidence for this so I went for a slower method but it's still very quick. You can see on the video how long it take from the XML save until the PDF shows up on finder. The PDFs really done quite a bit quicker but it takes time for finder to find it.
The idea is to have some bloke who knows nothing about Illustrator create documents that would take hours to do manually by an Illustrator professional and do it in a fraction of a second.
That's what scriptings about! The extension in not in the $50 to $100 league
Done using quite a lot of nodesjs stuff.
Regards
Trevor
Copy link to clipboard
Copied
A real advanced power script!
Copy link to clipboard
Copied
Yep, thanks to you for your share in it Make new document with an Illustrator Extension
Copy link to clipboard
Copied
How nice, that was for the same one! I'd love to be of help to you for any project that's too big for one person, potentially!
Copy link to clipboard
Copied
Thank you for Sharing Trevor, it is nice to know what is possible!
Copy link to clipboard
Copied
Trevor×… wrote:
I just dumped 9 XMLs simultaneously in the watch folder and Ai produced the documents in a second with know problem.
The initial problem might be related to the extension opening a document on Illustrator opening.
meant to write "no problem"
Over tired
Copy link to clipboard
Copied
Well this problem is getting weird, more people upgraded and some people are not getting the errors at all, while others are getting them frequently. They are using the same scripts, so maybe there is nothing wrong with my scripts and it is some other issue going on.
Trevor, that is awesome thanks for sharing. Seeing stuff like that is great motivation to keep learning so one day I can figure out how the hell you did that and really streamline some things haha. I'm currently taking a CS class online and learning a lot about C and command line programs.
Copy link to clipboard
Copied
Just figured out the culprit has 2gb's less of ram on his computer. Would that possibly be causing the issue?
Copy link to clipboard
Copied
OK, I am pretty sure I found out what was causing the issue. A lot of my coworkers are signed into online libraries. I tried signing into one and I started getting the error more frequently. I then signed out of the library and the errors went away for the most part. I got one of my coworkers to leave his online libraries and he stopped getting the errors.
I hope this helps someone! Be sure to actually leave the libraries, if you just exit out of your library panel you will still be signed in.


-
- 1
- 2