SD7 hung, had to force quite, lost all text,

Mark and Shane,

I was working with ASObj-C stuff and Script Debugger hung with the watch cursor. The cursor remained responsive but I could do anything in SD7. Other apps worked fine. I had to force quit the Application.

I did upload a zip archive called “SD Files.zip” which had 2 files in it:

  • Console.txt
  • Sample of Script Debugger.txt

I don’t think there is much in the console output but I sent what showed up. I went into the activity monitor and took a sample. That might provide something about what it was stuck on. When I restarted SD7 it did not come up with any kind of crash report. None of the text was recoverable after SD7 relaunched. I spent a while looking for something useful to sent but couldn’t find anything else.

I hadn’t anything I expected what I had done so far to cause a problem. I was setting some ASObj-C stuff with dates. I started off working on the text setDateFormat:“MMddyyyy” The first thing that surprised me was when I entered a dash in-between dd and yyyy the display dialog template came up like when I enter “dd” and hit the spacebar. I literally just hit the dash key and that happened.

No mater what I did I could not get a dash into that space. I tried to copy a dash from somewhere else and paste it in and I got the “display dialog” thing again. Every thing that involved trying to get a dash into the document text caused the same result. While I was working on entering a dash script debugger got stuck again and became unresponsive. The cursor still moved clicking things no longer did anything. I could not access anything in the SD menus. I could click windows in other application and it switched to that application no problem and other applications worked fine.

After I relaunched SD7 nothing from the window that was open when I force quit SD7 was recoverable. I created a new window and the usual came up on the screen when I created a new window **use AppleScript version “2.4” – Yosemite (10.10) or later and use scripting additions I typed “setDateFormat:“MMddyyyy””.

So at this time I have in the document;

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

setDateFormat:"MMddyyyy"

I clicked the cursor between dd and yyyy and typed a dash. The dash appeared no problem. The I could type the dash between MM and dd and there was no problem.

But when I started out with

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

setDateFormat:"MMddyyyy"

and I typed a dash between the dd and yyyy the same thing came up with the display dialog template.

After typing this much of the report I figured I would try to type the dash one more time. I typed the dash when the cursor was between dd and yyyy and now it let me put a dash between dd and yyyy with no problem and I was able to put the dash between MM and dd and that worked. I typed in the other stuff at the beginning of the line “current application’s NSDateFormatter’s setDateFormat:“MM-dd-yyyy”” and clicked compile and that worked.

Now I am down to having this typed in:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use scripting additions

set DateFormat to current application's NSDateFormatter's new()
DateFormat's setDateFormat:"MM-dd-yyyy"
set DateString to (DateFormat's stringFromDate:(current application's NSDate's |date|())) as text

I went to type in “use framework “Foundation”” at the top of the screen and when I typed the text nothing appeared to the screen but the menus were responsive and when I clicked the window the cursor moved to where I clicked.

At this point I went into Script Editor and finished the script. Ran it and it worked.

The final thing that took me forever to type was:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use scripting additions

set DateFormat to current application's NSDateFormatter's new()
DateFormat's setDateFormat:"MM-dd-yyyy"
set DateString to (DateFormat's stringFromDate:(current application's NSDate's |date|())) as text

So I opened a new window in SD7 and pasted what I had run in “Script Editor” and ran it. Nothing appeared in the output portion of SD7 but I could see DateString in the Variable-Value part below the output portion and it showed the correct information.

I really don’t have anything great to report so this time I am trying to report everything in the hopes something might be helpful. Sorry this is such a lousy report. This is one of the stranger problems I’ve had with SD.

Bill

SD Files.zip (41.4 KB)

Mark and Shane,

As a followup to my previous report I had another strange thing happen. After I had quit SD7 after my previous problems I had new different problems. I pasted my script text into SD7 instead of typing it in SD7.

The script text is:

use AppleScript version "2.4" -- Yosemite (10.10) or later
use framework "Foundation"
use scripting additions

set DateFormat to current application's NSDateFormatter's new()
DateFormat's setDateFormat:"EEE MM-dd-yyyy"
set DateString to (DateFormat's stringFromDate:(current application's NSDate's |date|())) as text

The first 2 times I tried to save the script I got the error shown below.

Untitled%202

But after getting the same error twice in a row trying to save the text, it saved without an error.

From there I went on to change the text around in the script to:

use framework "Foundation"

set TheDate to current application's NSDate's |date|()

set DateFormat to current application's NSDateFormatter's new()
DateFormat's setDateFormat:"EEE MM-dd-yyyy"
DateFormat's setDateStyle:(current application's NSDateFormatterFullStyle)
DateFormat's setTimeStyle:(current application's NSDateFormatterMediumStyle)
set DateString to (DateFormat's stringFromDate:TheDate)

I did not have any edit problems making the editing changes but when I sent to save the script it got the same exact error it gotten before when having problems saving the script. I tried to save the script numerous times (something like 10 times). Finally I selected all the text in the script and did a cut then tried to save the script with no text in the script, and I still got the same error. I created a new window and pasted the text into a new window and tried to save and still I got the same errOSAAppNotHighLevelEventAware:-2704 error.

I quit script debugger and restart it and then pasted the text into a new window. This was the text I had just cut for the old SD window. It saved with no problems. I opened the file using SD7 that I had just saved from SD7 and it worked. I opened that same file in “Script Editor” with no problems. It ran in “Script Editor” with no problems but I got the expected cryptic response from Script Editor after it ran, «class ocid» id «data optr0000000040F5260000600000» so it is hard to verify if it got the correct response.

I’m not sure what more I can do with this problem. It has a case of general nonspecific flakeyness. As SD7 is now with the script it’s not really useable. This is now the second ASObj-C problem I can’t seem to figure out or reliably recreate. I also don’t know why SD7 sometimes crashes and then displays an old error report when restarted and requires all files to be resaved with every single save just before the crash. But I am now always doing ASObj-C with lots of windows because I don’t seem to have problems with a few windows open. I suspect some corruption is occurring inside SD7 connected with windows and it just causes all kinds of crazy errors.

Bill