Copy link to clipboard
Copied
Just in case anybody runs into this problem:
1. I installed Photoshop CC 2019 on a new computer
2. I had a lot of Javascript scripts on my old machine and transferred them to my new machine
3. When I tried to run one of my scripts, I got a "General Photoshop error occurred. This functionality may not be available in this version of Photoshop" on the following statement: var sdoc = app.documents.add(2550, 4200, 300, 'sheet', NewDocumentMode.RGB);
4. Spent over 1 hour with a Adobe support, they couldn't figure out what the problem was
5. Turned out to be very simple:
-- on my old machine, the default unit of my Photoshop was set to "pixels", so "app.documents.add(2550, 4200, 300)" was creating an 8.5" x 14" document
-- in the new installation it was set to "inches", so "app.documents.add(2550, 4200, 300)" was trying to create a document larger than a football field
-- unfortunately, Photoshop just crashed instead of providing an adequate error message
-- changed the unit preferences in the new installation to "pixels" and the problem was solved
Copy link to clipboard
Copied
Well, that seems to be sloppy scripting.
One should either define the values in the line as UnitValues or at least set the RulerUnits at the beginning of the Script (and reset them at the end).
But to discuss Scripting issues you may want to post over on
Copy link to clipboard
Copied
Point taken and accepted. Will you do the same if I point out that this is pretty sloppy programming on your side too? No checking of maximum values in function arguments? No graceful exit with a legible error message?
Copy link to clipboard
Copied
Will you do the same if I point out that this is pretty sloppy programming on your side too?
What would you be talking about exactly?
Copy link to clipboard
Copied
Just to make sure: Who do you think you are talking to?
This is a user Forum, so you are not really addressing Adobe here, even though some Adobe employees thankfully have been dropping by.
Edit: The official place for Photoshop Bug Reports (and Feature Requests) is