Skip to main content
Participant
April 26, 2019
Question

General Photoshop error occurred

  • April 26, 2019
  • 1 reply
  • 2790 views

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

This topic has been closed for replies.

1 reply

c.pfaffenbichler
Community Expert
Community Expert
April 27, 2019

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

Photoshop Scripting

Participant
April 27, 2019

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?

c.pfaffenbichler
Community Expert
Community Expert
April 28, 2019

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

Photoshop Family Customer Community