RE: Error of type -1
RE: Error of type -1
- Subject: RE: Error of type -1
- From: "Rice, Gary" <email@hidden>
- Date: Mon, 3 Jun 2002 10:28:49 -0400
I'm not sure *exactly* what the error is, but it generally happens when
an app tries to deal with memory that it doesn't own
This statement describes error positive 1 not negative 1. The AppleScript
version of error -1 according to Black & Bleu (www.bleurose.com ) is: "the
truncation indicator is wider than the specified width".
See if that makes more sense in your context.
Gary
-----Original Message-----
From: email@hidden [
mailto:email@hidden]
Sent: Friday, May 31, 2002 3:58 PM
To: email@hidden; email@hidden
Subject: Re: Error of type -1
>
What the heck is an error of type -1? How do I avoid it?
I'm not sure *exactly* what the error is, but it generally happens when
an app tries to deal with memory that it doesn't own. One cannot always
completely eliminate them in some apps, but increasing memory allocation
usually helps.
>
I've made a script that resizes lots of big (40MB) images and adds
>
some info to a database. I let it go for a while (we're talking
>
hours here) and it seems to throw an error of type -1 in completely
>
different places. How would I address this?
I would try increasing the memory allocation of either the script or the
application it is driving. (If you're never storing big data in the
script, it's unlikely to be the script, but, I'd expect an app to quit
with a type -1 error as a dialog -- maybe it's also passing that to your
script. Can you tell whether the script itself is throwing the error,
or just not trapping an application thrown error?
Why not put the whole script in a try block to catch error -1 like this:
try
--stuff that eventually throws an error -1
on error -1
display dialog "The app did it!"
end try
Now, if the script throws an error -1, it will quit the script app, if
some app that you are throws an error -1, you will see that dialog.
That will tell you where you need to increase your allocation (or if you
have source -- debug the code so it throws Out of Memory instead of
stepping on the wrong bits).
Michael
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.
_______________________________________________
applescript-users mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/applescript-users
Do not post admin requests to the list. They will be ignored.