Skip to main content
Participant
January 30, 2006
Question

Listener.8li plugin not working with PS CS2 ?

  • January 30, 2006
  • 2 replies
  • 1155 views
Dear forum,

I tried to compile (Win 2000 / VC7.1 aka Visual Studio.NET 2003) and run the Listener plugin supplied with the PhotoShop CS2 SDK. I opened with VC7.1 the solution file (Listener.sln) and built it. As described in the "Automation tutorial.pdf", I then made a shortcut to "Listener.8li" in the PhotoShop CS2 "/Plug-Ins" folder, started PhotoShop and selected the new menu "File / Automate / Listener...". Photoshop then gives me an error messagebox :

"Adobe PhotoShop
Could not complete the Listener command because of a program error.
OK"

I also tried to copy the file directly to the /"Plug-Ins" folder, but the result is the same. I also tried to copy either the shortcut or the file itself to a subfolder of "/Plug-Ins", same behavior.

Then I exit PhotoShop and I get a GPF :
"Adobe PhotoShop: Photoshop.exe - Application Error.
the instruction at "0x08ab4f05" referenced memory at "0x08ab4f05". The memory could not be "read".
Click on OK to terminate the program
Click on CANCEL to debug the program
OK Cancel"

The question is very simple : Am I doing something wrong ?
Is "listener.8li" functionnal "out-of-the-box" compiled with VC 7.1 on Win 2000 with PhotoShop CS 2 ? Or is some patching needed ?

Thanks
This topic has been closed for replies.

2 replies

Participant
January 30, 2006
Spent more time debugging this and I found the cause (and a workaround):
The cause is that an empty action palette causes the global gActionSet pointer to remain null (uninitialized), as ReadScriptParams() finds a null descriptor when called and returns immediately. Later call to DoUI() invoke DialogBoxParamA() and this in turn causes the dialog box window proc to be called for WM_INITDIALOG message. When processing this message, PIActionComboBox::Init()is called and attempts to do the following :
error = PIUActionsGetName((char*)(gActionSet->c_str()),...).
This means that the gActionSet pointer is dereferenced regardless of its value, and when null, the exception occurs...
When a non-empty action palette is present, gActionSet is not null, and the crash does not occur. However, I could not find any hint in the documentation that this was a pre-condition for using listener.8li...
Participant
January 30, 2006
More info :
I single-stepped the plugin with VC7.1 and what happens is that DialogBoxParamA(), called from IsolationAwareDialogBoxParamA() (#defined as DialogBoxParam() and called from DoUI()) is throwing an exception. It is a Microsoft Structured Exception, not a standard C++ exception, since it originate a __try/__catch block in IsolationAwareDialogBoxParamA().

Why it is so, I have no idea, though.