1 Reply Latest reply on Aug 1, 2017 2:18 PM by Loic.Aigon

    Command-Period (Cancel) in Dialog Crashes InDesign

    John Kriho Level 1

      Greetings,

       

      In the below example, I'd like the dialog to remain open provided no text has been entered into the edit text area. If you click the buttons, it works. If you hit the Return key, the OK button is correctly clicked and functions properly. If you click the Cancel button, the dialog is correctly dismissed.

       

      However, if you click Command-Period to cancel the dialog in this fashion, the dialog is dismissed, but InDesign crashes shortly afterward.

       

      Any thoughts?

       

      Thanks!

       

      --------------------------------

      Sample Code

      --------------------------------

       

      DialogTest();

       

      function DialogTest()

      {

          var w = new Window ("dialog", "Test");

          var t = w.add("edittext", undefined, "");

          var a = w.add("button", undefined, "Cancel");

          var b = w.add("button", undefined, "OK");

          b.onClick = function () {

              if (t.text.length == 0)

                  alert("You must type something in.");

              else

                  w.close();

          }

          w.show();

      }

       

      --------------------------------

      Partial Crash Log

      --------------------------------

      Process:               Adobe InDesign CC 2017 [17157]

      Version:               12.1.0.56 (12100)

      Code Type:             X86-64 (Native)

      Responsible:           Adobe InDesign CC 2017 [17157]

      Date/Time:             2017-08-01 13:28:34.798 -0500

      OS Version:            Mac OS X 10.10.5 (14F2315)

      Crashed Thread:        0  Dispatch queue: com.apple.main-thread

      Exception Type:        EXC_BAD_ACCESS (SIGSEGV)

      Exception Codes:       KERN_INVALID_ADDRESS at 0x0000000000000000

      Thread 0 Crashed:: Dispatch queue: com.apple.main-thread

      0   ???                               000000000000000000 0 + 0

      1   com.adobe.dvascriptui.framework    0x0000000113518750 ScriptUI::DroverWidgetCommons<dvaui::controls::UI_TextButton>::invalidate() + 64

      2   com.adobe.dvascriptui.framework    0x0000000113569bb9 ScriptUI::ElementBase::invalidate() + 489

      3   com.adobe.dvascriptui.framework    0x000000011356db1f ScriptUI::ElementBase::removeChild(ScriptUI::ElementBase&) + 319

      4   com.adobe.dvascriptui.framework    0x0000000113569a54 ScriptUI::ElementBase::invalidate() + 132

      5   com.adobe.dvascriptui.framework    0x0000000113569ccf ScriptUI::ElementBase::release() const + 47

      6   com.adobe.AdobeExtendScript       0x000000011336e187 ScScript::InitTerm::atExit(void (*)()) + 8583