Problems with Javascript on Mac, but not PC

I run into some strange problems with a script in which Mac another user stops on a line nothing stores more than one State of history to the variable "actHist" while PC to run the script very well.  We will test the script one Mac to another later today, but I was wondering if there are any known issues with running scripts in Java on Mac vs PC database?  Here is a screenshot of the problem:


I can't understand WHY it stops on this area.  I tried of asigning the variable outside of the cause of the else statement that I was out of ideas, but it's the same no matter where I declare it.  The odd part is, that the same line is used elsewhere in the script without problems, it doesn't seem to work in the same place on a Mac (PC has no problems with it).  No idea why this is only a problem for the Mac and not any PC?


Tom's right. It is a known problem and Adobe has been alerted to this topic. This error can also occur when you try to access the activeLayer of a document.

I used this code for embarrassing lines like this and it worked for me:

try {
   doc = app.activeDocument;
} catch  (e) {
   var desc = new ActionDescriptor();
   desc.putEnumerated(cTID("Stte"), cTID("Stte"), cTID("RdCm"));
   executeAction(cTID("Wait"), desc, DialogModes.NO);

   doc = app.activeDocument;

It did not work for others. Someone suggested using the:

   try {
      doc =  app.activeDocument;

   } catch (e) {
      doc =  app.activeDocument;

I have not tried because I don't have a reproducible test case.

Tags: Photoshop

Similar Questions

Maybe you are looking for

  • Advice on the Organization of the modules in a system of 2-chassis SMU

    Hello Content of the system We have a system which consists of: 2 SMU-1085 hunts, connected via an SMU-8384/SMU-8360 15 maps FlexRIO (SMU-7962R + OR-5734), to acquire data at 10 MHz 1 function (SMU-5412) generator map 1 calendar (SMU-6672) Other card

  • local variables of power question

    Hello Attached, please fine 2 similar vi., I can start or stop the program at any x + y values.  But, in, I can not use stop when the program is running (program will end when x + y = 10).  Why the variable local power not

  • can I use wrt54GS as wireless extension?

    Hi, I just want to know if I can use old router wrt54 GS as a wireless extension? Here is my story, I have a router WRT54G2 wireless located on basement and I have laptop connected through wireless and connected via ethernet, now these two portable i

  • Shredder.msi problem starts

    I also hepatitis has a problem with shredder. Whenever I press left clik on the file, it starts to install shredder and at the end he SAIS windows could not find the shredder.msi file. Sometimes the stars instalation after sistem start. It's anoing.

  • Jabra to blackBerry Smartphones mower - unable to pair up with BB 9900

    Hello friends, I recently got a headset Jabra Clipper BT + A2DP stereo headphones. Unfortunately, I am not able to pair the Jabra Clipper with my BB 9900 phone :-( I tried pairing with Nokia 5230 and it works perfectly ok and able to listen to music