I have no clue. First I have a script that’s crashing SD. I’ve sent crash reporter and the appleCrash report. The script call myriad tables and I’ve been running it with no issues since yesterday. Made a couple minor changes to it and it causes SD to crash.
So I decided to try it with Script Editor. So I opened SE pasted the text into SE and tried to run it. Then I realized it was using path to me and was reading files in the same directory of the SD script, so I saved it to that folder, as “Untitled”.
Here’s where the bizarre behavior comes in. I ran the script in SE, and SE crashed. SD activated and the Untitled script opened in a new tab.
I’ll put the script and related files on Dropbox shortly.
I believe I’ve figured the bizarre part of this one out, and it’s not bizarre at all, but I think it there may still be a problem, possibly with MT.
set myFolder to path to me
tell application "Finder"
set dataFolder to container of myFolder
open myFolder
end
My error was using myFolder as opposed to dataFolder with the open command. Running the script in SE it tried to open it in SD. Since it was already open in SD and never got to the point where it needed the dataFolder value I didn’t notice.
Still not sure what’s causing the hard crash, but I suspect MT.
Your humility is misplaced, Shane. This isn’t an MT crash, it’s an appleScript crash.
In reducing my script to the minimum needed for the crash I realized a value I expected to be a list was a string, and I was trying to set item 1 of a string to a list containing a boolean. (Dummy!, I know!) When it happens in my script is crashes 100% of the time. When I run it with these two lines, it generates an AE error, but if I run it a few times SD crashes anyway. It also crashes SE. The bug is that it shouldn’t crash, but should generate a trappable AppleEvent error.
set aString to "001"
set item 1 of aString to {aString, false}