Skip to main content
Participant
July 6, 2018
Answered

Program error when using custom action

  • July 6, 2018
  • 3 replies
  • 1438 views

Hi Everyone,

I made a custom action that has the following steps:

  • change image size (32%)
  • change canvas size (425x425)
  • add a rectangle
  • make the rectangle grey
  • give the rectangle an inner shadow
  • move rectangle behind image

Unfortunately when I run a batch process I get the following error message:

"Could not complete the command because of a program error."

(The error appears directly on the first step)

And using the action after getting that error message just leads to more error messages.

The Photoshop logs say this:

"..\..\sources\UPSUtilities.cpp : 4358 : REQUIRE failed"

I tried googling the file name, but I can't find anything.

A weird thing coinciding with this:

After running the action I tried figuring out what was going on an did the steps manually, and now Photoshop doesn't close the "Change Image size"-Dialog. It stays in the foreground, I can't click anything in it, but can use the canvas and all the tools regularly. Restarting Photoshop seems to be the only way to close the dialog.

This topic has been closed for replies.
Correct answer heartsanddeath

I finally figured out what this was about. The input-files for some reason hat a resolution of 1dpi. I included a step that changed it to 72dpi and everything is working fine. Very weird how this managed to "break" photoshop though...

3 replies

heartsanddeathAuthorCorrect answer
Participant
July 9, 2018

I finally figured out what this was about. The input-files for some reason hat a resolution of 1dpi. I included a step that changed it to 72dpi and everything is working fine. Very weird how this managed to "break" photoshop though...

JJMack
Community Expert
Community Expert
July 9, 2018

Also take note: about the different recordings of style presets and set current layer. You may also have kotice thete sare style scaling options In Image Resize options and there is menu Layer>Layer Style>Scale Effects

JJMack
JJMack
Community Expert
Community Expert
July 6, 2018

heartsanddeath  wrote

I made a custom action that has the following steps:

  • change image size (32%)
  • change canvas size (425x425)
  • add a rectangle
  • make the rectangle grey
  • give the rectangle an inner shadow
  • move rectangle behind image

Unfortunately when I run a batch process I get the following error message:

"Could not complete the command because of a program error."

(The error appears directly on the first step)

Unfortunately we can not see what you actually recorded or the state of the document when you got the first error.

When you want help with an action it is best to expand all the steps in the action so that ever setting the was recorded into the action is visible.  Then run the action with the Layers palette and action palette visible as well as the image window.  When you get the error capture your screens and post so we can see the step the action failed in see the step the was recorded the state of the current document.

How action record steps often depends on how you have your Photoshop Ruler Units set.

  • change image size (32%)  what was recorder was it recorded relative to Document size  Percent in pixels or units?
  • change canvas size (425x425)  was this recorded as a a relative change or an absolute change you failed to stated
  • add a rectangle   did you mean select a rectangle area  what did you record?
  • make the rectangle gray did you use file selection with 50% gray  that will fail if the currently targeted layer is a smart object layer.
  • give the rectangle an inner shadow  The rectangle needs to be a layer for this.
  • move rectangle behind image  This will fail if the document has a background layer.  No layer can be moved lower than the background

JJMack
Participant
July 9, 2018

Thanks for your answer!

So since the action always failed on the first step I thought it might be easiest to just do that step in another software and remove it from the action. That helped! The images are now being processed. Unfortunately Photoshop ignores the settings on setting a style to the rectangle. As you can see, I add an inner shadow with a size of 133px, but Photoshop always sets this to 0. I can work around this and just let the action wait for my input on that step (it's a little annoying with the amount of images I want to process but it's better than the alternative).

But Photoshop still hates me for doing this. With the dialog for the layer style always opening it crashes after a while, if I just process it without the option it's acting weird afterwards. For example after the last go-around it wouldn't let me draw a rectangle (always saing there was a program error)

Here are all the steps of the action:

The images I'm processing are PNG with a transparent Background. When Photoshop opens them they don't have a locked background-layer, just a "layer-1".

I tried this on another PC, same results.

JJMack
Community Expert
Community Expert
July 9, 2018

Two things you need to know about with Layer Styles and Png files.

There are two way to add Layer style a layer:

One way is to double click in the layers palette near the layer's name which open the layer style dialog where you set the layer blending  and add the layer styles effects you want, All seems to be recorded with absolute px values.

The other way you add a layers style is by using a preset style that is in your Styles Palette you just click on the style in the  Styles Palette and its applied to the current targeted layer.

The presets styles were made on some document and seems to effect the way the style looks  on different resolution documents,  The preset styles see to be scaled the the documents resolution.

About Png with transparent backgrounds.  There are full borders of full transparent areas.  The layers bounds will be much smaller than the document canvas.  Copy and paste and place will trim to the layers bounds you need to be careful how you use these pngs with transparent borders they nay be trimmed off

JJMack
Stephen Marsh
Community Expert
Community Expert
July 6, 2018

Try resetting your preferences.