General Photoshop error occurred
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
