Skip to main content
cameronmcefee
Inspiring
January 23, 2014
Answered

ActionReference crashes certain PSCC installs

  • January 23, 2014
  • 1 reply
  • 1367 views

Hello,

I've got a few users of GuideGuide reporting that GuideGuide crashes Photoshop. I am not able to reproduce this error myself. I've been sending them various panels that segment the actions to determine what is causing the crashes and so far it seems that executing ActionReference commands, both in ExtendScript and via the csawlibs are at the source of the problem.

The following code will crash Photoshop for them reliably (I cannot reproduce it myself).

function getOffsets() {

  var ref = new ActionReference();

    ref.putEnumerated( charIDToTypeID("Dcmn"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") )

  var desc = executeActionGet(ref)

  var xOffSet = desc.getInteger(stringIDToTypeID('rulerOriginH'))

  var yOffSet = desc.getInteger(stringIDToTypeID('rulerOriginV'))

  return [xOffSet/65536, yOffSet/65536]

}

I've been using some variation of this code for over 3 years and have never had an issue with it until last week. The user that is most actively helping debug this mentioned that the problem started happening in a previously working panel after a recent Creative Cloud update, and exists in a new version of the panel that runs on entirely different code (except for the ActionReference stuff). Has something changed that has broken this process?

Any help would be greatly appreciated. I don't know of any other way to get the ruler offsets of a document, so I'd love to find a solution.

Here's a link to the current support thread: https://github.com/guideguide/support/issues/3

The user @kropecius experiences crashes when focusing on fields, which I've been able to confirm happens when GuideGuide checks photoshop for environment information (the code above).

The user @3696499 experiences crashes when the panel opens but not in the context that @kropercius mentions. GuideGuide checks for info when it initializes, so his issue may unrelated, or if the problem is in the ActionRefrence itself, may be some core issue that's causing different symptoms for different people.

Also potentially related, a select set of users claim that GuideGuide doesn't add guides. I haven't fully investigated this yet, but as guide adding is being done via ActionReference I think it may be connected. (Adding guide via csawlib seems to have a bug that doen't automatically enable guide visiblility so I'm stuck using ActionReference).

Cameron

This topic has been closed for replies.
Correct answer cameronmcefee

I unfortunatelly can't repro this myself, and can't figure out from their enviroments any common context that causes the problems.

If you have some sample code you want me to add to a panel for them to test (like creating a new doc), I'm happy to do that.

Not sure about the 100% fail time. I got the sense that that was the case, but I'll confirm.


After about a week of back and forth, the reporting user installed the original GuideGuide beta to try to reproduce the issue and everything works now >.< Sadly, this appears to have been a wild goose chase. I forgot the most important debugging advice: turn it off and then on again.

This did cause me to add sensable fallbacks for those values, so if the issue does appear again, it should hopefully not crash anything.

1 reply

Tom Ruark
Inspiring
January 25, 2014

Please make sure they submit the crash logs to Adobe. And include steps to repro and email addresses so we can get to the bottom of it.

cameronmcefee
Inspiring
January 25, 2014

Thanks, Tom. I'll be sure they do so.

cameronmcefee
Inspiring
January 25, 2014

I'm also happy to provide access to the GuideGuide repos on GitHub to someone from Adobe if that will be of help ruling out Photoshop as the cause. The panels will eventually be open source, but I'm not prepared to open them up until they officially ship.