Photoshop dialogs popping up.

As part of our render process I have Photoshop running a droplet on our farm and processing a bunch of images. I am having issues with Photoshop randomly throwing up dialogs asking the user to register, participate in an adobe program, or to update things. The obvious problem being that there is no user to click on the dialogs so it blocks the farm up.

Does anyone have any solutions to disabling the dialogs that Photoshop CS5 throws up? Or any possible workarounds?

Is this a custom plugin you guys have created? Our plugin API supports popup handling, which should help you out here. Take a look at the example InitializeProcess code here:
thinkboxsoftware.com/deadlin … e_Plug-ins

You can start by setting self.PopupHandling = True. With this enabled, Deadline should detect these popups and fail the render. For now, that will stop the popups from blocking the farm. In the error messages that are created for the job, there will be a dump of the popup contents (title, buttons, etc). You can then upload these error reports here, and we can let you know if it’s possible for Deadline to handle them by pressing certain buttons.

Cheers,

  • Ryan

We are using the ‘Command Script’ to run the droplet with the image file path as an argument.

I am guessing a custom plugin would be a better way of doing it though. These pop-ups are not consistant and will occur x times a month. I can make them pop up through the Photoshop UI. Is there any way I can dump the popup contents without having to wait for the specfic pop-ups to occur but by clicking and making them appear?

Thanks,

-Rob

Hey Rob,

You could edit the command script plugin to add popup handling (\your\repository\plugins\CommandScript\CommandScript.py), but since you’re tailoring the code to a specific application, it might be worthwhile writing a custom plugin for it.

Not sure if this would work, but perhaps you could try launching Photoshop in UI mode through the command script plugin (after enabling popup handling in it). I’m guessing if you don’t pass any command line arguments, Photoshop will just sit there indefinitely until it is closed manually. You could then try making the popup appear to see if Deadline detects it.

Cheers,

  • Ryan

Hi Ryan,

Thanks for the help so far. I appear to be having issues though. It tried launching Photoshop in UI mode after editing CommandScript.py to include’ self.PopupHandling = True’ and ‘self.StdoutHandling = True’. It did not seem to detect any popups.

[code]
---- January 10 2012 – 12:37 PM ----

Scheduler Thread - Synchronizing job files
Scheduler Thread - Synchronization time for job files: 78.126 ms
Scheduler Thread - Synchronizing plugin files
Scheduler Thread - Synchronization time for plugin files: 31.25 ms
Constructor: CommandScript
0: Task timeout is disabled.
0: Loaded job: PhotoshopLaunch (999_090_999_0ffb8dd7)
0: INFO: StartJob: initializing script plugin CommandScript
0: INFO: About: Command Script support for Deadline
0: Plugin rendering frame(s): 0
0: INFO: Checking line:“C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Photoshop.exe”
0: INFO: Executable found: C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Photoshop.exe
0: INFO: Arguments found:
0: INFO: Stdout Handling Enabled: True
0: INFO: Popup Handling Enabled: True
0: INFO: Using Process Tree: True
0: INFO: Hiding DOS Window: True
0: INFO: Creating New Console: False
0: INFO: Render Executable: “C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Photoshop.exe”
0: INFO: Render Argument:
0: INFO: Startup Directory: “C:”
0: INFO: Process Priority: BelowNormal
0: INFO: Process is now running[/code]

I also tried submitting the droplet normally using commandScript and it did not seem to detect any pop-ups either. I am not sure what to try next? or if I am doing something fundamentally wrong?

I lied a little bit. The PopupHandling will spot 1 out of the three different dialogs:

Adobe product improvement

[code]
---- January 10 2012 – 01:04 PM ----

Scheduler Thread - Synchronizing job files
Scheduler Thread - Synchronization time for job files: 109.377 ms
Scheduler Thread - Synchronizing plugin files
Scheduler Thread - Synchronization time for plugin files: 140.628 ms
Constructor: CommandScript
0: Task timeout is disabled.
0: Loaded job: PhotoshopLaunch (999_090_999_64aacfea)
0: INFO: StartJob: initializing script plugin CommandScript
0: INFO: About: Command Script support for Deadline
0: Plugin rendering frame(s): 0
0: INFO: Checking line:“C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Photoshop.exe”
0: INFO: Executable found: C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Photoshop.exe
0: INFO: Arguments found:
0: INFO: Stdout Handling Enabled: True
0: INFO: Popup Handling Enabled: True
0: INFO: Using Process Tree: True
0: INFO: Hiding DOS Window: True
0: INFO: Creating New Console: False
0: INFO: Render Executable: “C:\Program Files\Adobe\Adobe Photoshop CS5 (64 Bit)\Photoshop.exe”
0: INFO: Render Argument:
0: INFO: Startup Directory: "C:"
0: INFO: Process Priority: BelowNormal
0: INFO: Process is now running
---- January 10 2012 – 01:05 PM ----
0: WARNING: Detected popup dialog “Adobe Product Improvement Program”.
0: WARNING: ---- dump of dialog ----
0: WARNING: Static:
0: WARNING: Static:
0: WARNING: Static:
0: WARNING: Static:
0: WARNING: Static: Participate in the direction of future versions of Adobe products by clicking Yes, below.
0: WARNING: Static: • All data collected is anonymous.
0: WARNING: Static: • No personal contact information is collected as part of this program.
0: WARNING: Static: • There are no mandatory surveys or follow-up emails regarding the program.
0: WARNING: Static: Help us improve Adobe products
0: WARNING: Static: Privacy Policy
0: WARNING: Static: More Information
0: WARNING: Static:
0: WARNING: Button: Yes, Participate
0: WARNING: Button: No, Thank You
0: WARNING: Static: See participating products
0: WARNING: Static: • You can stop participating at any time.
0: WARNING: Static: Adobe will automatically receive anonymous information about how you use Adobe products that are currently installed on your system.
0: WARNING: ---- end dump of dialog ----
Scheduler Thread - Render Thread 0 threw an error:
Scheduler Thread - Exception during render: An error occurred in RenderTasks(): Dialog popup detected: Title “Adobe Product Improvement Program”, Message “Adobe will automatically receive anonymous information about how you use Adobe products that are currently installed on your system.”
at Deadline.Plugins.ScriptPlugin.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage)

Exception Details
RenderPluginException – Exception during render: An error occurred in RenderTasks(): Dialog popup detected: Title “Adobe Product Improvement Program”, Message “Adobe will automatically receive anonymous information about how you use Adobe products that are currently installed on your system.”
at Deadline.Plugins.ScriptPlugin.RenderTasks(String taskId, Int32 startFrame, Int32 endFrame, String& outMessage)
RenderPluginException.Cause: JobError (2)
RenderPluginException.HasSlaveLog: True
Exception.Data: ( )
Exception.TargetSite: Void RenderTask(System.String, Int32, Int32)
Exception.Source: deadline
Exception.StackTrace:
at Deadline.Plugins.Plugin.RenderTask(String taskId, Int32 startFrame, Int32 endFrame)
at Deadline.Slaves.SlaveRenderThread.RenderCurrentTask(TaskLogWriter tlw)

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<[/code]

The other two, Updates and Registration are not detected.
Updates and Registration launch a seperate process called “PDapp.exe*32”

Does this help at all?

Cool. We’re getting closer. :slight_smile:

To handle this popup, the following code should work in the InitializePlugin function:

self.AddPopupHandler( "Adobe Product Improvement Program", "No, Thank You" )

Can you post a screen shot of the other two popups? By default, Deadline uses some heuristics to determine if a window is a popup, or a regular application window. This is based on the window type, number of controls within the window, etc. If the popup contains a lot of controls, that could explain why it’s going undetected.

There are also some popups that use non-standard windows controls, which can make detection trickier as well. We do have additional popup options to try and deal with non-standard popups, but we can get into that after I take a look at the screen shots.

Thanks!

  • Ryan

I added the handler and it works. Thanks! \o/

I have uploaded two screenshots. It looks like they are actually part of the Creative Suite but Photoshop will sometimes launch them on startup which is where the problems lie.


Let’s try bumping up the maximum child windows for a window to be considered a popup. This can be done in InitializeProcess using the following:

self.PopupMaxChildWindows = 50

The default is 20, so we’ll bump it up to 50 to see if that makes a difference. Hopefully it does, because that’s the easy solution. :slight_smile:

I tried self.PopupMaxChildWindows at 50 and 500 and unfortunately it did not seem to make a difference.

FYI.
I played with Photoshop/Deadline about a year ago and gave up as it was easier to use ImageMagick to directly access PSD/PSB files and manipulate them.
At the time, Draft wasn’t around, so that might be an option depending on what you are trying to get Photoshop to do for you. ie: is it a basic composite / slap comp you need?
For me, using IM, meant no Adobe licensing, no Adobe software installs and hence, I could write something very specific to my studio’s needs and use our entire farm to process Photoshop files.
I was somewhat surprised by the performance I was able to achieve using IM!

Having said that, I like the idea of maybe one day, Deadline having a Photoshop plugin to allow custom Photoshop actions / *.jsx javascript files being run against X number of image files / PS layers. Sounds interesting.

Mike

Hi Mike,

Thanks for the suggestion about ImageMagick. I have looked at it in the past but did not think it was capable of doing what I needed but there is a good chance that I am mistaken.

We primarily deal with stills. The Droplet that I have made actually runs a script. That script will organise a series of render elements into separate named layers/folders and process the channels based upon tokens in the filename. The tokens come from a custom MaxScript which is used to submit the render. So essentially I have it set up so that one of our artists will hit render and they will end up with a psd file full of selections and useful elements that they can then use to composite with. Hopefully the picture will make more sense than my ramblings.

Yep, this sounds just about do’able via IM, although two things jumps to mind…

Photoshop “folders” in IM have limited support. IIRC, IM can read and write “folders” to a PSD/PSB, but I think there is great difficulty when it comes to determining the hierarchy structure of the folders in relation to the individual PS layers. ie: you can get yourself in a pickle with regard not being able to determine which layers are a part of which folder and indeed which folder sits in what hierarchical order overall in the “layers” palette in PS.

EXR support in IM requires it to be compiled with HDR support. Although there are pre-build binaries available. Just not necessarily the latest version. :frowning:

My info is dated from early last year, so a newer build of IM may have sorted this now. I guess the only way to ensure 100% compatibility with PS is to use PS! JavaScript support in PS is pretty extensive. I’ve written a couple of decent tools and extended a few using JSX in PS and that worked out well. Can you drive PS via JSX?

HTH,
MIke

OK, hopefully the Photoshop dialogs can be resolved but it is nice to have a backup plan in place. Thanks for all the info! I will definetely check out ImageMagick a bit more and also draft.

Darn! :frowning:

The next thing we should check is if that new process that these windows belong to is part of the photoshop process tree. You can use Process Explorer to do this:
technet.microsoft.com/en-us/sysi … s/bb896653

If it’s part of the photoshop process tree, we should be able to handle it. If it’s not, then we’re out of luck because Deadline only monitors processes that belong to the render executable process tree.

Please see the screenshot attached. It looks like Photoshop.exe is the parent of PDapp.exe.

This interests me, so I did the same test:

The “pdapp.exe” can be started manually by double-clicking the exe, hidden away on the C:\ drive or via any of the CS programs by going to the “Help…Updates…” menu item at the top.

Mike

Ah, I think I know what the problem is. The “popup” is PDapp.exe’s main window, which isn’t considered a popup by Deadline (because, well, it technically isn’t). It’s the reason why renderers with user interfaces don’t fail through Deadline. So unfortunately, this can’t be handled by our popup handling system.

One thing I noticed is that only one PDapp.exe can run at a time. So I wonder if the Deadline plugin could launch PDapp.exe as a PreRenderTask, and kill it as a PostRenderTask. Then if photoshop tries to display it in the middle of a render, it won’t be able to because PDapp.exe is already running. This is all a theory of course. You can look at \your\repository\plugins\AfterEffects\AfterEffects.py for examples of PreRenderTask and PostRenderTask.

Cheers,

  • Ryan

OK, will give it a try. Thanks so much for looking into this!