• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Crashing Script
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Crashing Script


  • Subject: Re: Crashing Script
  • From: "Stockly, Ed" <email@hidden>
  • Date: Fri, 12 Feb 2016 19:02:34 +0000
  • Thread-topic: Crashing Script

So what I think is happening is that the script is using a reference to newTime and when the newTime variable changes, it changes in the list. It repeats the last value newTime was set to in the loop.

Copying newTime to the timePair list rather than using newTime in the list fixes that. 

This solved it:

copy myTime to newTime

This also solved it, but, for the purposes of this script I need that first list item to be the date class

 set timePair to {newTime as text, TimeAsText}

So thanks, all@

As for the crashing
The script didn't crash at work:
—>>Mac OSX 10.10.4

But did crash on my home system:
--->Mac OS X  10.10.5

Did anyone try it on 10.10.5?

Just now, after running it three times with logging, it did crash my Script Editor at work on 10.10.4

Re opened SE and it crashed after running two times.

Re opened SE and it crashed after running about a dozen times.

Script Debugger Log:

(*date Friday, February 12, 2016 at 9:52:10 PM, 9:52 p.m.*)
(*date Friday, February 12, 2016 at 4:01:19 PM, 4:01 p.m.*)
(*date Friday, February 12, 2016 at 1:15:41 AM, 1:15 a.m.*)
(*date Friday, February 12, 2016 at 4:27:29 PM, 4:27 p.m.*)
(*date Friday, February 12, 2016 at 6:14:57 AM, 6:14 a.m.*)
(*date Friday, February 12, 2016 at 8:03:47 AM, 8:03 a.m.*)
(*date Friday, February 12, 2016 at 10:11:46 PM, 10:11 p.m.*)
(*date Friday, February 12, 2016 at 5:58:17 AM, 9:52 p.m., 
date Friday, February 12, 2016 at 5:58:17 AM, 4:01 p.m., 
date Friday, February 12, 2016 at 5:58:17 AM, 1:15 a.m., 
date Friday, February 12, 2016 at 5:58:17 AM, 4:27 p.m., 
date Friday, February 12, 2016 at 5:58:17 AM, 6:14 a.m., 
date Friday, February 12, 2016 at 5:58:17 AM, 8:03 a.m., 
date Friday, February 12, 2016 at 5:58:17 AM, 10:11 p.m., 

Script Editor log: 
(*date Friday, February 12, 2016 at 9:07:42 PM, 9:07 p.m.*)
(*date Friday, February 12, 2016 at 9:51:55 PM, 9:51 p.m.*)
(*date Friday, February 12, 2016 at 1:11:34 AM, 1:11 a.m.*)
(*date Friday, February 12, 2016 at 4:33:42 AM, 4:33 a.m.*)
(*date Friday, February 12, 2016 at 9:35:40 PM, 9:35 p.m.*)
(*date Friday, February 12, 2016 at 1:02:18 AM, 1:02 a.m.*)
(*date Friday, February 12, 2016 at 6:18:31 AM, 6:18 a.m.*)
(*date Friday, February 12, 2016 at 5:21:55 AM, 5:21 a.m.*)
(*date Friday, February 12, 2016 at 5:31:20 PM, 5:31 p.m.*)
 
(*date Friday, February 12, 2016 at 10:48:43 AM, 9:07 p.m., 
date Friday, February 12, 2016 at 10:48:43 AM, 9:51 p.m., 
date Friday, February 12, 2016 at 10:48:43 AM, 1:11 a.m., 
date Friday, February 12, 2016 at 10:48:43 AM, 4:33 a.m., 
date Friday, February 12, 2016 at 10:48:43 AM, 9:35 p.m., 
date Friday, February 12, 2016 at 10:48:43 AM, 1:02 a.m., 
date Friday, February 12, 2016 at 10:48:43 AM, 6:18 a.m., 
date Friday, February 12, 2016 at 10:48:43 AM, 5:21 a.m., 
date Friday, February 12, 2016 at 10:48:43 AM, 5:31 p.m. 



 
Curiously, each record in the resulting list has the same time in the 1st item (newTime). The variable newTime is being shared among each record, as if it were ref counted. Why is that? If I change "set newTime to myTime" to "copy myTime to newTime", it works as I'd expect.

BTW, it doesn't crash for me on 10.10.2, even with the log command left in.

Sent from iCloud's ridiculous UI, so, sorry about the formatting

 _______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users

This email sent to email@hidden

  • Follow-Ups:
    • Re: Crashing Script
      • From: Shane Stanley <email@hidden>
    • Re: Crashing Script
      • From: Yvan KOENIG <email@hidden>
References: 
 >Crashing Script (From: "Stockly, Ed" <email@hidden>)
 >Re: Crashing Script (From: Steve Mills <email@hidden>)

  • Prev by Date: Re: Crashing Script
  • Next by Date: Re: Crashing Script
  • Previous by thread: Re: Crashing Script
  • Next by thread: Re: Crashing Script
  • Index(es):
    • Date
    • Thread