Problem with SD 6.0.7 (6A217) update


#1

The first time I used the SD 6.0.7 update I ran into a problem. The first time I tried to edit a script and save SD came up with the “recompile and save” dialog. I clicked the button then it crashed. When I tried the same thing again I got a Mac OS error -1750 and I get this same error every time I try to save the file after the first save attempt. I copied the text from the SD window, quit SD and then relaunched SD and pasted the text into a new SD window and tried to save but got the Mac OS error -1750 again. Then I tried the same script text with the previous version of SD again it still had not problems.

It did produce a script debugger error log but I inadvertently closed the window and I am not sure how to get that error text to display again.

But it did display the following text in the console

default 13:37:00.865924 -0800 Script Debugger 0x7fa710738890 - PerformanceMonitor::measurePostLoadMemoryUsage: Process was using 233017344 bytes of memory after the page load.
default 13:37:05.865290 -0800 Script Debugger 0x7fa710738890 - PerformanceMonitor::measurePostLoadCPUUsage: Process was using 0.0% CPU after the page load.
default 13:38:18.024059 -0800 Script Debugger 0x7fa710738890 - PerformanceMonitor::measurePostBackgroundingCPUUsage: Process was using 2.4% CPU after becoming non visible.
default 13:38:56.106439 -0800 Script Debugger Claim D8ABBB57-19AE-4114-8965-2BEFB056CA3A granted in client
default 13:38:56.106464 -0800 Script Debugger Claim D8ABBB57-19AE-4114-8965-2BEFB056CA3A invoked in client

The text I was editing was on line 289 on the script and I was editing the contents of a comment in the script. I was not editing any actual AppleScript code.

This script implements mail rules for Apple Mail. I have uploaded the actual script file and here is the text of the actual script of the script that errors in 6.0.7:

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

(*
Mail message highlight color constants (highlightcolors): none, blue, gray, green, orange, purple, red, yellow, other
The highlightcolors are stored in the "message object's" property "background color"
*)

on Make2CharString(TheString)
	script ReturnObj
		property Successful : false
		property NewCharacters : ""
	end script
	
	try
		if (length of TheString) = 0 then
			my HandleErrorSaveAndDisplay("Error,  Make2CharString was send an empty string.")
			set Successful of ReturnObj to false
			return ReturnObj
		else if (length of TheString) = 1 then
			set (NewCharacters of ReturnObj) to "0" & TheString
			set Successful of ReturnObj to true
			return ReturnObj
		else if (length of TheString) = 2 then
			set (NewCharacters of ReturnObj) to TheString
			set Successful of ReturnObj to true
			return ReturnObj
		else if (length of TheString) > 2 then
			my HandleErrorSaveAndDisplay("Error,  Make2CharString was send a string with more than 2 characters.")
			set Successful of ReturnObj to false
			return ReturnObj
		end if
	on error errMsg number errNum
		my HandleErrorSaveAndDisplay("Make2CharString got an error " & (errNum as string) & " occured while getting the time parts." & return & return & errMsg)
		set (Successful of ReturnObj) to false
		return ReturnObj
	end try
end Make2CharString

on GetTimeParts(TheTimeStr)
	-- TheTimeStr is a string carrying 3 pieces of information with colons between the pieces of information.
	-- The first piece holds the number of hours, the second holds the minutes, and the third holds the seconds
	script ReturnObj
		property Successful : false
		property TheHour : ""
		property TheMinute : ""
		property TheSecond : ""
	end script
	
	local TheList
	local TheResult
	local ReturnObj
	
	try
		set OldASDelimiters to text item delimiters of AppleScript
		set text item delimiters of AppleScript to {":"}
		set TheList to text items of TheTimeStr
		set text item delimiters of AppleScript to OldASDelimiters
		
		-- item 1 of TheTimeStr holds the number for the hours
		set TheResult to Make2CharString((item 1 of TheList) as text)
		if (Successful of TheResult) then
			set (TheHour of ReturnObj) to NewCharacters of TheResult
		else
			set (Successful of ReturnObj) to false
			return ReturnObj
		end if
		
		-- item 2 of TheTimeStr holds the number for the minute
		set TheResult to Make2CharString((item 2 of TheList) as text)
		if (Successful of TheResult) then
			set (TheMinute of ReturnObj) to NewCharacters of TheResult
		else
			set (Successful of ReturnObj) to false
			return ReturnObj
		end if
		
		-- item 3 of TheTimeStr holds the number for the seconds
		set TheResult to Make2CharString((item 3 of TheList) as text)
		if (Successful of TheResult) then
			set (TheSecond of ReturnObj) to NewCharacters of TheResult
		else
			set (Successful of ReturnObj) to false
			return ReturnObj
		end if
		set (Successful of ReturnObj) to true
		return ReturnObj
	on error errMsg number errNum
		my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the time parts." & return & return & errMsg)
		set (Successful of ReturnObj) to false
		return ReturnObj
	end try
end GetTimeParts

on DateTimeString()
	script ReturnObj
		property Successful : false
		property DateTimeStr : ""
	end script
	
	local TimeStringOriginal
	local TimeClassification
	local HoursMinutesSecondsStr
	local TheResult
	local TimeString
	
	try
		set TimeAndDate to current date
		
		-- Get the date part
		set TheDay to (day of TimeAndDate) as string
		if ((length of TheDay) = 1) then set TheDay to "0" & TheDay
		
		set TheMonth to ((month of TimeAndDate) as number) as string
		if ((length of TheMonth) = 1) then set TheMonth to "0" & TheMonth
		
		set YearString to (year of TimeAndDate) as string
		set TheYear to strings -2 thru -1 of YearString
		set DateString to TheMonth & "/" & TheDay & "/" & TheYear
		
		(* Calculate the time part *)
		-- Calculate hours, minutes, seconds and AM/PM indicator
		set TimeStringOriginal to (time string of TimeAndDate) as text
		-- Is it AM or PM
		set TimeClassification to strings -2 thru -1 of TimeStringOriginal
		
		-- Remove the single space between the hours, minutes & seconds and the AM/PM in the time string
		set HoursMinutesSecondsStr to (strings 1 thru -4 of TimeStringOriginal)
		-- set HoursMinutesSecondsStr to HoursMinutesSecondsStr & TimeClassification
		set TheResult to GetTimeParts(HoursMinutesSecondsStr)
		if (not (Successful of TheResult)) then
			set (Successful of ReturnObj) to false
			return ReturnObj
		end if
		
		set TheResult1 to Make2CharString(TheHour of TheResult)
		if (not (Successful of TheResult1)) then
			set (Successful of ReturnObj) to false
			return ReturnObj
		end if
		
		set TheResult2 to Make2CharString(TheMinute of TheResult)
		if (not (Successful of TheResult2)) then
			set (Successful of ReturnObj) to false
			return ReturnObj
		end if
		
		set TheResult3 to Make2CharString(TheSecond of TheResult)
		if (not (Successful of TheResult3)) then
			set (Successful of ReturnObj) to false
			return ReturnObj
		end if
		
		set TimeString to (NewCharacters of TheResult1) & ":" & (NewCharacters of TheResult2) & ":" & (NewCharacters of TheResult3) & TimeClassification
		
		set (DateTimeStr of ReturnObj) to DateString & "-(" & TimeString & ")"
		set (Successful of ReturnObj) to true
		return ReturnObj
	on error errMsg number errNum
		display dialog "Error " & (errNum as string) & " occured while getting the date string." & return & return & errMsg buttons {"OK"} default button "OK"
		
		set (Successful of ReturnObj) to false
		return ReturnObj
	end try
end DateTimeString

on HandleErrorSaveAndDisplay(ErrorText)
	script ReturnObj
		property Successful : false
	end script
	
	try
		set TheResult to SaveAndDisplayText(ErrorText)
		set (Successful of ReturnObj) to (Successful of TheResult)
		return ReturnObj
	on error errMsg number errNum from offendingObject partial result resultList to expectedType
		-- Error -1712 = AppleEvent Timed Out 
		display dialog "Error " & (errNum as string) & " occured in the \"HandleErrorSaveAndDisplay handler.\"" & return & errMsg & return & "undisplayed error text:" & ErrorText ¬
			buttons {"OK"} default button "OK" with title "Error"
		set (Successful of ReturnObj) to false
		return ReturnObj
	end try
end HandleErrorSaveAndDisplay

on SaveTextToDisk(TheText)
	-- Any time an error occurs in this handler 10 beeps will be issued then an error will be displayed for 30 seconds to call attention to the problem if anyone is present when the error occurs.
	-- The error dialog will display the error, as well as the text that failed to be saved to the disk.  The calling handler can decide whether to terminate or keep processing.
	-- The actual error number that caused the problem saving text to disk will be returned in the "TheError" property of the script object.
	
	script ReturnObj
		property UnableToSave : true
		property TheError : 0
	end script
	
	try
		write (return & return & DateTimeStr of DateTimeString() & " " & TheText) to file "Bills second iMac HD:Users:bill:Documents:Special files and folders:Apple mail:AppleScript error log.txt" starting at eof
		set (UnableToSave of ReturnObj) to false -- This means no error occured
		return ReturnObj
	on error errMsg number errNum from offendingObject partial result resultList to expectedType
		set (TheError of ReturnObj) to errNum
		try
			delay 20 -- Wait 20 seconds and try again
			write (return & return & DateTimeStr of DateTimeString() & " " & TheText) to file "Bills second iMac HD:Users:bill:Documents:Special files and folders:Apple mail:AppleScript error log.txt" starting at eof
			set (UnableToSave of ReturnObj) to false -- This means no error occured
			return ReturnObj
		on error errMsg2 number errNum2 from offendingObject partial result resultList to expectedType
			beep
			beep
			beep
			beep
			beep
			beep
			beep
			beep
			beep
			beep
			-- Note error -1712 = AppleEvent Timed Out 
			display dialog "Error " & (errNum as string) & " occured writing text to the disk." & return & errMsg & return & "undisplayed error text:" & TheText ¬
				buttons {"OK"} default button "OK" with title "Error" giving up after 30
			
			set (UnableToSave of ReturnObj) to true
			return ReturnObj
		end try
	end try
end SaveTextToDisk


on SaveAndDisplayText(ErrorText)
	-- This handler returns the status of an attempted error display and/or save to disk but this status is not really needed to properly use SaveAndDisplayText.
	-- The Successful is returned in case in the future some reason occurs where it makes sense to use it. 
	script ReturnObj
		property Successful : false
	end script
	
	-- It is not important to send "Mail processing complete" messages to the text file.
	if (ErrorText = "Mail processing complete") then
		set (Successful of ReturnObj) to true
		return ReturnObj
	end if
	
	try
		-- set TheResponse to display dialog ErrorText buttons {"Write error to disk", "Do not write error to disk", "Cancel"} default button "Write error to disk" with title "Error" giving up after 10
		tell application (path to frontmost application as text)
			set TheResponse to display dialog "Choose what to do with the text:" & ErrorText buttons {"Write text to disk", "Do not write text to disk", " Cancel "} default button "Write text to disk" with title "Error" giving up after 10
		end tell
		
		if ((gave up of TheResponse) = true) then
			if not (Successful of DateTimeString()) then
				set (Successful of ReturnObj) to false
				return ReturnObj
			else
				set TheResult to SaveTextToDisk(ErrorText)
				
				-- Not checking (UnableToSave of TheResult) because I don't want an unclicked dialog causing a timeout error and then handing up future processing.
				-- Since it can't save to the disk, and I don't want to use a non-timeout dialog, there's no point in checking.  If there comes a time when it makes sense to check
				-- the results from SaveTextToDisk the results will be returned in the properties "UnableToSave" and "TheError"
				set (Successful of ReturnObj) to true -- Even if (UnableToSave of TheResult) = true I still want to process the rest of the emails so return (Successful of ReturnObj) = true
				return ReturnObj
			end if
		else if ((button returned of TheResponse) = " Cancel ") then
			-- Do nothing
		else if ((button returned of TheResponse) = "Do not write text to disk") then
			set (Successful of ReturnObj) to true
			return ReturnObj
		else if ((button returned of TheResponse) = "Write text to disk") then
			if not (Successful of DateTimeString()) then
				set (Successful of ReturnObj) to false
				return ReturnObj
			else
				write (return & return & DateTimeStr of DateTimeString() & ErrorText) to file "Bills second iMac HD:Users:bill:Documents:Special files and folders:Apple mail:AppleScript error log.txt" starting at eof
				set (Successful of ReturnObj) to true
				return ReturnObj
			end if
		else
			display dialog "An unexpected error occured displaying error text." buttons {"OK"} default button "OK"
			set (Successful of ReturnObj) to false
			return ReturnObj
		end if
	on error errMsg number errNum from offendingObject partial result resultList to expectedType
		display dialog "Error " & (errNum as string) & " occured in the \"HandleErrorSaveAndDisplay handler.\"" & return & errMsg & return & "undisplayed error text:" & ErrorText ¬
			buttons {"OK"} default button "OK" with title "Error"
		set (Successful of ReturnObj) to false
		return ReturnObj
	end try
end SaveAndDisplayText

-- --------------------------------------------------------------------------------------------------------------------------
-- --------------------------------------------------------------------------------------------------------------------------
-- --------------------------------------------------------------------------------------------------------------------------
--                                                                                  Move emails that need moving

on MoveMessage(TheMessage, MailboxName)
	-- If the script gets an error wait for 5 seconds and try the same command again
	script ReturnObj
		property Successful : false
	end script
	
	try
		tell application "Mail"
			set ErrorMessage to "[*MOVE*] \"" & ((subject of TheMessage) as string) & "\" from \"" & ((extract name from (sender of TheMessage)) as string) & "\" to \"" & (MailboxName as string) & "\""
			move TheMessage to mailbox MailboxName
			my SaveAndDisplayText(ErrorMessage)
		end tell
		
		set (Successful of ReturnObj) to true
		return ReturnObj
	on error errMsg number errNum from offendingObject partial result resultList to expectedType
		try
			delay 5
			tell application "Mail"
				move TheMessage to mailbox MailboxName
				my SaveAndDisplayText(ErrorMessage)
			end tell
			set (Successful of ReturnObj) to true
			return ReturnObj
		on error errMsg number errNum from offendingObject partial result resultList to expectedType
			my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured." & return & return & errMsg)
			set (Successful of ReturnObj) to false
			return ReturnObj
		end try
	end try
end MoveMessage

-- --------------------------------------------------------------------------------------------------------------------------
-- --------------------------------------------------------------------------------------------------------------------------
-- --------------------------------------------------------------------------------------------------------------------------
--                                                           Get info from email to determine what to do with email

on GetMessageInfo(TheMessage)
	-- Sometimes when Apple Email is processing the incomming pop messages the message ID will be invalid and then imediatly
	-- after finishing the incoming  messages the message ID will be valid, and then when processing the inbox the message IDs should
	-- always be true.  When GetMessageInfo returns Successful = true, and Email_IDValid = false Then the
	-- "perform mail action with messages" will not not to process the current message but will process the other unprocessed messages
	-- When Successful = false then "perform mail action with messages" will stop processing messages and exit the script with an error.
	-- If Email_IDValid = false then the message ID is invalid and therefore none of the information in the message is acceable.
	script ReturnObj
		property Successful : false
		property Email_IDValid : true -- Initiallaly set to true, if ID turns out to be invalid then property is then set to false
		property MailSubject : ""
		property MailSender : ""
		property MailboxName : ""
		property SentDate : ""
		property ReceivedDate : ""
		property ListOfRecipients : ""
		property SenderName : ""
		property SenderAddress : ""
	end script
	
	try
		tell application "Mail"
			try
				set MailSubject of ReturnObj to (subject of TheMessage) as string
			on error errMsg number errNum
				if (errNum = -1719) then -- -1719 = errAEIllegalIndex 
					set (Email_IDValid of ReturnObj) to false
					set (Successful of ReturnObj) to true
					return ReturnObj
				else
					set (Successful of ReturnObj) to false
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the subject from the message." & return & return & errMsg)
				end if
				return ReturnObj
			end try
			
			try
				set MailSender of ReturnObj to (sender of TheMessage) as string
			on error errMsg number errNum
				
				if (errNum = -1719) then -- -1719 = errAEIllegalIndex 
					set (Email_IDValid of ReturnObj) to false
					set (Successful of ReturnObj) to true
					return ReturnObj
				else
					set (Successful of ReturnObj) to false
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the sender from the message." & return & return & errMsg)
				end if
				return ReturnObj
			end try
			
			try
				set SenderName of ReturnObj to (extract name from (sender of TheMessage)) as string
			on error errMsg number errNum
				if (errNum = -1719) then -- -1719 = errAEIllegalIndex 
					set (Email_IDValid of ReturnObj) to false
					set (Successful of ReturnObj) to true
					return ReturnObj
				else
					set (Successful of ReturnObj) to false
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the sender name from the message." & return & return & errMsg)
				end if
				return ReturnObj
			end try
			
			try
				set SenderAddress of ReturnObj to (extract address from (sender of TheMessage)) as string
			on error errMsg number errNum
				if (errNum = -1719) then -- -1719 = errAEIllegalIndex 
					set (Email_IDValid of ReturnObj) to false
					set (Successful of ReturnObj) to true
					return ReturnObj
				else
					set (Successful of ReturnObj) to false
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the sender address from the message." & return & return & errMsg)
				end if
				return ReturnObj
			end try
			
			try
				set MailboxName of ReturnObj to (name of mailbox of TheMessage) as string
			on error errMsg number errNum
				if (errNum = -1719) then -- -1719 = errAEIllegalIndex 
					set (Email_IDValid of ReturnObj) to false
					set (Successful of ReturnObj) to true
					return ReturnObj
				else
					set (Successful of ReturnObj) to false
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the mailbox name for the message." & return & return & errMsg)
				end if
				return ReturnObj
			end try
			
			try
				set SentDate of ReturnObj to (date sent of TheMessage) as string
			on error errMsg number errNum
				if (errNum = -1719) then -- -1719 = errAEIllegalIndex 
					set (Email_IDValid of ReturnObj) to false
					set (Successful of ReturnObj) to true
					return ReturnObj
				else
					set (Successful of ReturnObj) to false
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the date sent from the message." & return & return & errMsg)
				end if
				return ReturnObj
			end try
			
			try
				set ReceivedDate of ReturnObj to (date received of TheMessage) as string
			on error errMsg number errNum
				if (errNum = -1719) then -- -1719 = errAEIllegalIndex 
					set (Email_IDValid of ReturnObj) to false
					set (Successful of ReturnObj) to true
					return ReturnObj
				else
					set (Successful of ReturnObj) to false
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the date received from the message." & return & return & errMsg)
				end if
				return ReturnObj
			end try
			
			try
				set ListOfRecipients of ReturnObj to address of recipients of TheMessage -- Returns a value of type list
			on error errMsg number errNum
				if (errNum = -1719) then -- -1719 = errAEIllegalIndex 
					set (Email_IDValid of ReturnObj) to false
					set (Successful of ReturnObj) to true
					return ReturnObj
				else
					set (Successful of ReturnObj) to false
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the \"list of recipients\" from the message." & return & return & errMsg)
				end if
				return ReturnObj
			end try
		end tell
		
		set (Successful of ReturnObj) to true
		return ReturnObj
	on error errMsg number errNum
		my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while getting the info from the message." & return & return & errMsg)
		set (Successful of ReturnObj) to false
		return ReturnObj
	end try
end GetMessageInfo

-- --------------------------------------------------------------------------------------------------------------------------
-- --------------------------------------------------------------------------------------------------------------------------
-- --------------------------------------------------------------------------------------------------------------------------
--                                                                                             Process the emails

using terms from application "Mail"
	on ProcessSingleMailMessage(MailSubject, TheSender, SenderName, SenderAddress, MailboxName, SentDate, ReceivedDate, ListOfRecipients, TheMessage)
		if ((class of ListOfRecipients) as string) ≠ "list" then
			set TheResult to my HandleErrorSaveAndDisplay("\"ListOfRecipients,\" inside \"ProcessSingleMailMessage\" is not of class list")
			if (not (Successful of TheResult)) then return false
			return true
		end if
		
		try
			set NumOfRecipients to count of ListOfRecipients
			if NumOfRecipients < 1 then
				set TheResult to my HandleErrorSaveAndDisplay("\"ListOfRecipients\" has an invalid number (count = " & NumOfRecipients & ") of items.")
				if (not (Successful of TheResult)) then return false
				return true
			end if
		on error errMsg number errNum from offendingObject partial result resultList to expectedType
			my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while trying to get at item out of ListOfRecipients." & return & return & errMsg)
			return true
		end try
		
		
		try
			-- --------------------------------------------------------------------------------------------------------------------------
			-- --------------------------------------------------------------------------------------------------------------------------
			-- --------------------------------------------------------------------------------------------------------------------------
			--                                                                           Address & domain lists to keep or delete
			
			set DomainsToKeep to {{Domain:"audible.com", MailboxLocation:"Audible.com/General stuff"}, ¬
				{Domain:"wmonline@wm.com", MailboxLocation:"Creditors/Waste Management/Billing statemnent"}, ¬
				{Domain:"mnwd.com", MailboxLocation:"Creditors/Moulton Niguel Water District/Other email type"}, ¬
				{Domain:"sce.com", MailboxLocation:"Creditors/Southern California Edison"}, ¬
				{Domain:"scewebservices.com", MailboxLocation:"Creditors/Southern California Edison"}, ¬
				{Domain:"forum.latenightsw.com", MailboxLocation:"ScriptDebugger/Discourse"}, ¬
				{Domain:"thegreatcourses.com", MailboxLocation:"Teaching company"}, ¬
				{Domain:"teach12.com", MailboxLocation:"Teaching company"}, ¬
				{Domain:"thegreatcoursesplus.com", MailboxLocation:"Teaching company"}}
			
			set AddressesToKeep to {¬
				{MailAddress:"pattkopp@cox.net", MailboxLocation:"People/Patt Kopp"}, ¬
				{MailAddress:"patt_kopp@me.com", MailboxLocation:"People/Patt Kopp"}, ¬
				{MailAddress:"9496807538@vtext.com", MailboxLocation:"People/Patt Kopp"}, ¬
				{MailAddress:"pkopp@occ.cccd.edu", MailboxLocation:"People/Patt Kopp"}, ¬
				{MailAddress:"richard@electrophobia.com", MailboxLocation:"People/Richard Parker"}, ¬
				{MailAddress:"rlp@mac.com", MailboxLocation:"People/Richard Parker"}, ¬
				{MailAddress:"mnwd@onlinebiller.com", MailboxLocation:"Creditors/Moulton Niguel Water District/Billing statemnent"}, ¬
				{MailAddress:"customerservice@socalgas.com", MailboxLocation:"Creditors/Southern California Gas Company/Billing statemnent"}, ¬
				{MailAddress:"donotreply@mylifevantage.com", MailboxLocation:"Creditors/Protandim"}, ¬
				{MailAddress:"distributorsupport@mylifevantage.com", MailboxLocation:"Creditors/Protandim"}, ¬
				{MailAddress:"newsletter@kurzweilai.net", MailboxLocation:"Mailing lists/Kurzweil"}, ¬
				{MailAddress:"DiscoverMagazine@maillist.kalmbachmail.com", MailboxLocation:"Mailing lists/Discover Magazine"}}
			
			
			set DomainsToDelete to {"1000bulbs.com", "adobepress.info", "apress.com", "att-mail.com", ¬
				"bestbuy.com", "bowers.org", "craftsman.com", "deseretbook.com", "elsevier.com", "emails.deseretbook.com", "facebookmail.com", ¬
				"fandango.com", "filemaker.com", "getdismissed.com", "homedepot.com", "informit.net", "landsend.com", ¬
				"linkedin.com", "lynda.com", "macpaw.com", "macsales.com", "macales.com", "mheducation.com", ¬
				"micromat.com", "monoprice.com", "noreply@shs.com", "ntsusa.org", "nuanceus.digitalriver.com", ¬
				"ondesoft.com", "oreilly.com", "owcdigital.com", "peachpit.biz", "peachpit.net", "retrospect.com", "sears.com", ¬
				"searshomeservices.com", "shopyourwayrewards.com", "springer.com", "sylvane.com", "tedthacker.net", ¬
				"travis@90proofusa.com", "vmware.com", "vzwshop.com", "wondershare.com"}
			
			set AddressesToDelete to {"holymolymedia1@gmail.com", "info@mapmyfitness.messages4.com", ¬
				"LAComputerCompany@apple2.subscribermail.com", "nuance@reply.digitalriver.com", "robin@robinandersonfineart.com"}
			
			-- --------------------------------------------------------------------------------------------------------------------------
			-- --------------------------------------------------------------------------------------------------------------------------
			-- --------------------------------------------------------------------------------------------------------------------------
			--                                                                            Delete unwanted emails
			
			try
				try
					if (TheSender contains "Facebook <notification") and (TheSender contains "@facebookmail.com>") then
						set TheResult to MoveMessage(TheMessage, "Trash")
						if (not (Successful of TheResult)) then return false
						return true
					end if
				on error errMsg number errNum from offendingObject partial result resultList to expectedType
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured deleting a \"Facebook notification\" email." & return & return & errMsg)
					return false
				end try
				
				try
					if (TheSender contains "lacomputercompany.com") or (MailSubject contains "LAComputerCompany") or (MailSubject contains "LA Computer Company") or (MailSubject contains "L.A. Computer Company") then
						set TheResult to MoveMessage(TheMessage, "Trash")
						if (not (Successful of TheResult)) then return false
						return true
					end if
				on error errMsg number errNum from offendingObject partial result resultList to expectedType
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured deleting a \"LAComputerCompany\" email." & return & return & errMsg)
					return false
				end try
				
				try
					-- if (TheSender contains "wandablake@gmail.com") and (MailSubject contains "homes sold") then
					if (MailSubject contains "homes sold") then
						set TheResult to MoveMessage(TheMessage, "Trash")
						if (not (Successful of TheResult)) then return false
						return true
					end if
				on error errMsg number errNum from offendingObject partial result resultList to expectedType
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while deleting a \"wandablake@gmail.com\" email." & return & return & errMsg)
					return false
				end try
				
				-- Delete any other unwanted demails
				repeat with TheAddress in (DomainsToDelete & AddressesToDelete)
					if (TheSender contains TheAddress) then
						set TheResult to MoveMessage(TheMessage, "Trash")
						if (not (Successful of TheResult)) then return false
						return true
					end if
				end repeat
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while processing \"DomainsToDelete & AddressesToDelete\" emails." & return & return & errMsg)
				return false
			end try
			
			-- --------------------------------------------------------------------------------------------------------------------------
			-- --------------------------------------------------------------------------------------------------------------------------
			-- --------------------------------------------------------------------------------------------------------------------------
			--                                                                            Move special messages
			
			-- Handle Southern California Electric email	
			try
				if (TheSender contains "scewebservices.com") then
					set TheResult to MoveMessage(TheMessage, "Creditors/Southern California Edison")
					if (not (Successful of TheResult)) then return false
					return true
				end if
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while trying to move a \" Southern California Edison\" email." & return & return & errMsg)
				return false
			end try
			
			-- Handle Amazon email	                                                                               
			try
				if (TheSender contains "amazon.com") then
					if (TheSender contains "auto-confirm@amazon.com") or (TheSender contains "marketplace-messages@amazon.com") or ¬
						(TheSender contains "@marketplace.amazon.com") or (TheSender contains "orders@amazon.com") or ¬
						(TheSender contains "order-update@amazon.com") or (TheSender contains "payments-messages@amazon.com") or ¬
						(TheSender contains "payments-update@amazon.com") or (TheSender contains "shipment-tracking@amazon.com") then
						set TheResult to MoveMessage(TheMessage, "Amazon.com")
						if (not (Successful of TheResult)) then return false
					else if (TheSender contains "store-news@amazon.com") then
						set TheResult to MoveMessage(TheMessage, "Trash")
						if (not (Successful of TheResult)) then return false
					else
						set TheResult to MoveMessage(TheMessage, "Trash")
						if (not (Successful of TheResult)) then return false
					end if
					return true
				end if
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured processing \"amazon.com\" emails." & return & return & errMsg)
				return false
			end try
			
			-- Handle Scientific American email
			try
				if SenderAddress = "news@email.scientificamerican.com" then
					if (SenderName = "Scientific American") then
						set TheResult to MoveMessage(TheMessage, "Mailing lists/Scientific American")
						if (not (Successful of TheResult)) then return false
						return true
					else if (SenderName = "Scientific American MIND") then
						set TheResult to MoveMessage(TheMessage, "Mailing lists/Scientific American MIND")
						if (not (Successful of TheResult)) then return false
						return true
					else
						my HandleErrorSaveAndDisplay("An error occured while trying to move an email with a sender of \"news@email.scientificamerican.com\"")
						return false
					end if
				else
					if (SenderAddress = "specialoffers@email.scientificamerican.com") then
						set TheResult to MoveMessage(TheMessage, "Mailing lists/Scientific American")
						if (not (Successful of TheResult)) then return false
						return true
					end if
				end if
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while trying to moving a \"Scientific American\" email." & return & return & errMsg)
				return false
			end try
			
			-- Handle verizon email
			try
				if (TheSender contains "verizonwireless.com") then
					if (MailSubject = "Your Bill is Now Available") or (MailSubject = "Your online bill is available.") or (MailSubject = "Thank you for your payment.") then
						set TheResult to MoveMessage(TheMessage, "Creditors/Verizon/Billing statemnent")
						if (not (Successful of TheResult)) then return false
					else
						set TheResult to MoveMessage(TheMessage, "Creditors/Verizon/Other email type")
						if (not (Successful of TheResult)) then return false
					end if
					return true
				end if
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while trying to move a \"Verizon\" email." & return & return & errMsg)
				return false
			end try
			
			-- Handle Cox email
			try
				if (TheSender contains "Orange_County_Do_Not_Reply@cox.com") then
					if (MailSubject = "Your Cox Bill Statement is ready on Cox.com") then
						set TheResult to MoveMessage(TheMessage, "Creditors/Cox/Billing statemnent")
						if (not (Successful of TheResult)) then return false
					else
						set TheResult to MoveMessage(TheMessage, "Creditors/Cox/Other email type")
						if (not (Successful of TheResult)) then return false
					end if
					return true
				end if
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while trying to move a \"Cox\" email." & return & return & errMsg)
				return false
			end try
			
			-- Handle Bank of America emails
			try
				if (TheSender contains "bankofamerica.com") then
					if (MailSubject = "Your Account Statement Is Available") then
						set TheResult to MoveMessage(TheMessage, "Trash")
						return Successful of TheResult
					else if (MailSubject = "Receipt: Mobile Check Deposit Processing") then
						set background color of TheMessage to red
						set TheResult to MoveMessage(TheMessage, "Bank of America")
						return Successful of TheResult
					else
						set TheResult to MoveMessage(TheMessage, "Bank of America")
						return Successful of TheResult
					end if
				end if
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while trying to move a \"Bank of America\" email." & return & return & errMsg)
				return false
			end try
			
			-- Move any other emails with special addresses 
			try
				repeat with TheRecord in AddressesToKeep
					if (TheSender contains (MailAddress of TheRecord)) then
						set TheResult to MoveMessage(TheMessage, MailboxLocation of TheRecord)
						if (not (Successful of TheResult)) then return false
						return true
					end if
				end repeat
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while processing \"AddressesToKeep\" emails." & return & return & errMsg)
				return false
			end try
			
			-- Move any emails with a specified domain 
			try
				repeat with TheRecord in DomainsToKeep
					if (TheSender contains (Domain of TheRecord)) then
						set TheResult to MoveMessage(TheMessage, MailboxLocation of TheRecord)
						if (not (Successful of TheResult)) then return false
						return true
					end if
				end repeat
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while processing \"DomainsToKeep\" emails." & return & return & errMsg)
				return false
			end try
			
			try
				if (TheSender contains "barebones") then
					set TheResult to MoveMessage(TheMessage, "Software/BBEdit")
					if (not (Successful of TheResult)) then return false
					return true
				end if
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while trying to moving a \"barebones.com\" email." & return & return & errMsg)
				return false
			end try
			
			-- 83yv2z8@cox.net and 94yd286@cox.net were the old emails that were replaced by Backblaze1@cox.net and Backblaze2@cox.net
			set IsBackblazeEmail to (ListOfRecipients contains "Backblaze1@cox.net") or (ListOfRecipients contains "Backblaze2@cox.net") or (ListOfRecipients contains "84ps528@cox.net") or ¬
				(ListOfRecipients contains "94yd286@cox.net") or (ListOfRecipients contains "83yv2z8@cox.net")
			try
				-- Note: Blackbaze can include 1 or more recipients in their emails.  E.g. changing the email for the occount has a recipient for both the old and new email address as recipients
				if (IsBackblazeEmail) then
					if (MailSubject = "Your Backup Summary") then
						if (ListOfRecipients contains "Backblaze1@cox.net") or (ListOfRecipients contains "83yv2z8@cox.net") then
							set TheResult to MoveMessage(TheMessage, "Backblaze/Backup Summary/Bills first iMac")
							if (not (Successful of TheResult)) then return false
							return true
						else if (ListOfRecipients contains "Backblaze2@cox.net") or (ListOfRecipients contains "94yd286@cox.net") then
							set TheResult to MoveMessage(TheMessage, "Backblaze/Backup Summary/Bills second iMac")
							if (not (Successful of TheResult)) then return false
							return true
						else if (ListOfRecipients contains "84ps528@cox.net") then
							set TheResult to MoveMessage(TheMessage, "Backblaze/Backup Summary/Patts imac")
							if (not (Successful of TheResult)) then return false
							return true
						else
							my HandleErrorSaveAndDisplay("Received a backup summary for an invalid source.")
							return false
						end if
					else if (SenderAddress is "restore@backblaze.com") then
						set TheResult to MoveMessage(TheMessage, "Backblaze/Other email type")
						if (not (Successful of TheResult)) then return false
						return true
					else if (SenderAddress is "newsletter@backblaze.com") then
						set TheResult to MoveMessage(TheMessage, "Backblaze/Other email type")
						if (not (Successful of TheResult)) then return false
						return true
					else
						set TheResult to MoveMessage(TheMessage, "Backblaze/Support")
						if (not (Successful of TheResult)) then return false
						return true
					end if
					-- It sould never get here so if it does return false.
					return false
				end if
			on error errMsg number errNum from offendingObject partial result resultList to expectedType
				my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while trying to moving a \"backblaze.com\" email." & return & return & errMsg)
				return false
			end try
			
			-- If it gets here then no matches were found, so no email to delete or move
			return true
		on error errMsg number errNum from offendingObject partial result resultList to expectedType
			my HandleErrorSaveAndDisplay("ProcessSingleMailMessage got an error " & (errNum as string) & return & return & errMsg)
			return false
		end try
	end ProcessSingleMailMessage
	
	-- --------------------------------------------------------------------------------------------------------------------------
	-- --------------------------------------------------------------------------------------------------------------------------
	-- --------------------------------------------------------------------------------------------------------------------------
	
	on perform mail action with messages MessageList in mailboxes mbox for rule aRule
		try
			tell application "Mail"
				if ((class of MessageList) ≠ list) then
					my HandleErrorSaveAndDisplay("\"MessageList\" is not of type \"list.\"")
					return false
				end if
				try
					-- (class of MessageList) = list
					set MessageCount to count of MessageList
				on error errMsg number errNum from offendingObject partial result resultList to expectedType
					my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured getting the count of emails to process." & return & return & errMsg)
					return false
				end try
				
				if (MessageCount = 0) then
					my HandleErrorSaveAndDisplay("\"MessageList\" had no mail messages in it.")
					return false
				else if (MessageCount > 0) then
					try
						repeat with TheMessage in MessageList
							-- (class of the single message "TheMessage") = «class mssg» = class of type "message"
							
							-- If GetMessageInfo or ProcessSingleMailMessage returns false then an error occured.  Both handlers will notify the user of the error while running.
							-- The script will ignore those errors and keep proccesing the rest of the email list.
							-- To add code later that store errors during processing add code to the handlers GetMessageInfo and ProcessSingleMailMessage.
							
							try
								set MessageInfo to my GetMessageInfo(TheMessage)
								set EMailHasValidID to Email_IDValid of MessageInfo
							on error errMsg number errNum from offendingObject partial result resultList to expectedType
								my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while calling GetMessageInfo." & return & return & errMsg)
							end try
							if (EMailHasValidID) then
								try
									my ProcessSingleMailMessage(MailSubject of MessageInfo, MailSender of MessageInfo, SenderName of MessageInfo, SenderAddress of MessageInfo, MailboxName of MessageInfo, SentDate of MessageInfo, ReceivedDate of MessageInfo, ListOfRecipients of MessageInfo, TheMessage)
								on error errMsg number errNum from offendingObject partial result resultList to expectedType
									my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured while calling ProcessSingleMailMessage." & return & return & errMsg)
								end try
							end if
						end repeat
					on error errMsg number errNum from offendingObject partial result resultList to expectedType
						my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured handling a list of messages." & return & return & errMsg)
						return false
					end try
					
					my HandleErrorSaveAndDisplay("Mail processing complete")
					return true
				else
					my HandleErrorSaveAndDisplay("The mail script got an error reading the list of messages.")
					return false
				end if
			end tell
		on error errMsg number errNum from offendingObject partial result resultList to expectedType
			my HandleErrorSaveAndDisplay("Error " & (errNum as string) & " occured processing the emails." & return & return & errMsg)
		end try
	end perform mail action with messages
	-- Return false because control should never get here
	return false
end using terms from


Clean up email.scpt.zip (92.6 KB)


(Mark Alldritt) #2

I am able to reproduce a crash when I open your document and compile it several times. The stack trace suggests that AppleScript is pulling Script Debugger down:

|0   com.apple.applescript         |0x000000010e7b243a FasDumpValueBlock(TFasDumpTable*, short, TUASClassIndex) + 47|
|---|---|
|1   com.apple.applescript         |0x000000010e7b303b FasDumpList(TFasDumpTable*, short, TUASClassIndex) + 387|
|2   com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|3   com.apple.applescript         |0x000000010e7b24f3 FasDumpValueBlock(TFasDumpTable*, short, TUASClassIndex) + 232|
|4   com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|5   com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|6   com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|7   com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|8   com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|9   com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|10  com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|11  com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|12  com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|13  com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|14  com.apple.applescript         |0x000000010e7b303b FasDumpList(TFasDumpTable*, short, TUASClassIndex) + 387|
|15  com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|16  com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|17  com.apple.applescript         |0x000000010e7b303b FasDumpList(TFasDumpTable*, short, TUASClassIndex) + 387|
|18  com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|19  com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|20  com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|21  com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|22  com.apple.applescript         |0x000000010e7b303b FasDumpList(TFasDumpTable*, short, TUASClassIndex) + 387|
|23  com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|24  com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|25  com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|26  com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|27  com.apple.applescript         |0x000000010e7b303b FasDumpList(TFasDumpTable*, short, TUASClassIndex) + 387|
|28  com.apple.applescript         |0x000000010e7b23dc TInferiorDumpList::DoDump() + 114|
|29  com.apple.applescript         |0x000000010e7b221b FasDumpCommandBlock(TFasDumpTable*, short) + 392|
|30  com.apple.applescript         |0x000000010e7b4b0e FasDumpActor(TFasDumpTable*, short, TUASClassIndex) + 747|
|31  com.apple.applescript         |0x000000010e7b533f FasDump(TBinaryOutputStream*) + 145|
|32  com.apple.applescript         |0x000000010e7b79ae UASDump() + 62|
|33  com.apple.applescript         |0x000000010e753105 ASStore(unsigned int, unsigned int, int, AEDesc*) + 186|
|34  com.apple.applescript         |0x000000010e74f28c AppleScriptComponent + 1708|
|35  com.apple.openscripting       |0x00007fffb86d2444 OSAStore + 65|
|36  com.latenightsw.ScriptDebugger6|0x000000010bc7d65e COSAIDReader::Store(AEDesc*, bool) const + 66|
|37  com.latenightsw.ScriptDebugger6|0x000000010bc66167 CSEScriptFile::WriteScript(CFileSpec const*, bool, bool) + 695|
|38  com.latenightsw.ScriptDebugger6|0x000000010bc64d27 CScriptFile::SaveScript(CFileSpec const*, bool, bool) + 55|
|39  com.latenightsw.ScriptDebugger6|0x000000010bc75ffc -[ScriptDocumentBase(Saving) writeToFileName:scriptType:lineEndings:showStartup:stayOpen:writeFlags:tipping_hand_woman: older:originalFile:] + 1931|
...

However, when I copy and paste your script text into a new document I cannot reproduce the crash.

The errOSAStackOverflow error you’ve reported elsewhere suggests that something within your script is exhausting one of AppleScript’s many internal resource limitations. When AppleScript beings reporting errOSAStackOverflow errors memory corruption may have occurred. I quit and relaunch Script Debugger as soon as I possibly can to avoid problems when errOSAStackOverflow errors are reported.

If others can reproduce the problems you are experiencing we may get a better picture of what is happening.


#3

That is helpful. For some reason I didn’t think about something building up and overrunning even though it said stack over flow. I am forever tinkering with this script. So I’ll try to watch for pattern where something is building. This script does use a list of list manipulation stuff, more then I usually do.

I tried removing the big list in the script in the “Address & domain lists to keep or delete” section and the error changed to “Cannot Save Document. Mac OS error -1750.”

I started to delete section of script to see what happens. At one point the error changed to to "**AppleScript failed to save this document because the script code, or data contained in global variables or properties, exceeds AppleScript’s internal limits (errOSAInternalTableOverflow).

Clearing global variables and properties by recompiling the script may allow AppleScript to save the script. Do you want to recompile and save again?**" I clicked cancel in the dialog.

I just started cutting out sections of code to see how much needed to be removed before the error went away but script debugger crashed. SD eventually crashed.

When I tried to reopen the file I got the error "The script “Clean up email copy.scpt” failed to open because Signaled when integer or real value is too large to be represented (errOSANumericOverflow:-2702).

Because this script was saved with Script Debugger, it may be possible to recover its source code.

The recovered source information may be out of date or damaged. Would you like to proceed with the recovery?". I proceeded with the recovery and it seemed like the text was fully recovered. I am sending the SD crash report to you from Date/Time 2017-12-17 16:24:54.207 -0800.

A lot of things came to the console during this time.

default 16:24:27.095857 -0800 systemsoundserverd 628: -> Incoming Request : actionID 4096, inClientPID 5779(Script Debugger), inBehavior 1, customVibeDataProvided 0, loop 0, loopPeriod 0.000000, inFlags 0, inClientCompletionToken 3
default 16:24:48.255299 -0800 Script Debugger 0x120dddc00 - DocumentLoader::startLoadingMainResource: Returning empty document (frame = 0x11ffb9000, main = 1)
default 16:24:48.255354 -0800 Script Debugger Memory usage info dump at MainFrameLoadCompleted:
default 16:24:48.255384 -0800 Script Debugger phys_footprint: 121683968
default 16:24:48.255413 -0800 Script Debugger internal: 162783232
default 16:24:48.255428 -0800 Script Debugger pagecache_page_count: 0
default 16:24:48.255454 -0800 Script Debugger javascript_gc_heap_capacity: 65536
default 16:24:48.255493 -0800 Script Debugger compressed: 0
default 16:24:48.255506 -0800 Script Debugger resident_size: 203227136
default 16:24:48.255521 -0800 Script Debugger virtual_size: 4016439296
default 16:24:48.255534 -0800 Script Debugger javascript_gc_heap_extra_memory_size: 0
default 16:24:48.255562 -0800 Script Debugger document_count: 1
default 16:24:48.255669 -0800 Script Debugger 0x7fea92d2e5b0 - PerformanceMonitor::measureCPUUsageInActivityState: Process is using 31.3% CPU in state: VisibleNonActive
default 16:24:48.267186 -0800 Script Debugger Memory usage info dump at MainFrameLoadStarted:
default 16:24:48.267222 -0800 Script Debugger phys_footprint: 122310656
default 16:24:48.267250 -0800 Script Debugger internal: 163409920
default 16:24:48.267266 -0800 Script Debugger pagecache_page_count: 0
default 16:24:48.267282 -0800 Script Debugger javascript_gc_heap_capacity: 573440
default 16:24:48.267295 -0800 Script Debugger compressed: 0
default 16:24:48.267309 -0800 Script Debugger resident_size: 203956224
default 16:24:48.267348 -0800 Script Debugger virtual_size: 4016439296
default 16:24:48.267362 -0800 Script Debugger javascript_gc_heap_extra_memory_size: 0
default 16:24:48.267375 -0800 Script Debugger document_count: 1
default 16:24:48.268087 -0800 Script Debugger 0x11ffb9090 - FrameLoader::prepareForLoadStart: Starting frame load (frame = 0x11ffb9000, main = 1)
default 16:24:48.268274 -0800 Script Debugger 0x120dde800 - DocumentLoader::startLoadingMainResource: Returning cached main resource (frame = 0x11ffb9000, main = 1)
default 16:24:48.856460 -0800 Script Debugger Memory usage info dump at MainFrameLoadCompleted:
default 16:24:48.856499 -0800 Script Debugger phys_footprint: 298053632
default 16:24:48.856520 -0800 Script Debugger internal: 339238912
default 16:24:48.856535 -0800 Script Debugger pagecache_page_count: 0
default 16:24:48.856551 -0800 Script Debugger javascript_gc_heap_capacity: 575104
default 16:24:48.856565 -0800 Script Debugger compressed: 0
default 16:24:48.856600 -0800 Script Debugger resident_size: 380948480
default 16:24:48.856615 -0800 Script Debugger virtual_size: 4198662144
default 16:24:48.856630 -0800 Script Debugger javascript_gc_heap_extra_memory_size: 1664
default 16:24:48.856648 -0800 Script Debugger document_count: 2
default 16:24:48.856684 -0800 Script Debugger 0x11ffb9090 - FrameLoader::checkLoadCompleteForThisFrame: Finished frame load (frame = 0x11ffb9000, main = 1)
default 16:24:54.154978 -0800 Script Debugger Claim 2E05BF15-B4A6-41FA-A03B-3E5C048D193E granted in client
default 16:24:54.155011 -0800 Script Debugger Claim 2E05BF15-B4A6-41FA-A03B-3E5C048D193E invoked in client
error 16:25:49.005060 -0800 Script Debugger warning: dynamic accessors failed to find @property implementation for ‘uniqueId’ for entity ABCDInfo while resolving selector ‘uniqueId’ on class ‘ABCDInfo’. Did you remember to declare it @dynamic or @synthesized in the @implementation ?
error 16:25:49.007332 -0800 Script Debugger warning: dynamic accessors failed to find @property implementation for ‘uniqueId’ for entity ABCDContact while resolving selector ‘uniqueId’ on class ‘ABCDContact’. Did you remember to declare it @dynamic or @synthesized in the @implementation ?
default 16:25:49.013186 -0800 Script Debugger -awakeFromLoad
default 16:25:49.013342 -0800 Script Debugger -setServername: Parsed into scheme: https host: port: 0 path:
default 16:25:49.013464 -0800 Script Debugger -initWithUID: called on thread:
default 16:25:49.013722 -0800 Script Debugger -clearPrincipalProperties
default 16:25:49.013740 -0800 Script Debugger -clearHomeContainers
error 16:25:49.019378 -0800 Script Debugger warning: dynamic accessors failed to find @property implementation for ‘uniqueId’ for entity ABCDEmailAddress while resolving selector ‘uniqueId’ on class ‘ABCDEmailAddress’. Did you remember to declare it @dynamic or @synthesized in the @implementation ?
error 16:25:49.020279 -0800 Script Debugger warning: dynamic accessors failed to find @property implementation for ‘orderingIndex’ for entity ABCDEmailAddress while resolving selector ‘orderingIndex’ on class ‘ABCDEmailAddress’. Did you remember to declare it @dynamic or @synthesized in the @implementation ?
error 16:25:49.020344 -0800 Script Debugger warning: dynamic accessors failed to find @property implementation for ‘address’ for entity ABCDEmailAddress while resolving selector ‘address’ on class ‘ABCDEmailAddress’. Did you remember to declare it @dynamic or @synthesized in the @implementation ?
error 16:25:49.020380 -0800 Script Debugger warning: dynamic accessors failed to find @property implementation for ‘label’ for entity ABCDEmailAddress while resolving selector ‘label’ on class ‘ABCDEmailAddress’. Did you remember to declare it @dynamic or @synthesized in the @implementation ?
error 16:25:49.020413 -0800 Script Debugger warning: dynamic accessors failed to find @property implementation for ‘isPrimary’ for entity ABCDEmailAddress while resolving selector ‘isPrimary’ on class ‘ABCDEmailAddress’. Did you remember to declare it @dynamic or @synthesized in the @implementation ?
error 16:25:51.986681 -0800 Script Debugger warning: dynamic accessors failed to find @property implementation for ‘serialNumber’ for entity ABCDAddressBookSource while resolving selector ‘serialNumber’ on class ‘ABCDAddressBookSource’. Did you remember to declare it @dynamic or @synthesized in the @implementation ?
error 16:25:52.030222 -0800 Script Debugger warning: dynamic accessors failed to find @property implementation for ‘uniqueId’ for entity ABCDAddressBookSource while resolving selector ‘uniqueId’ on class ‘ABCDAddressBookSource’. Did you remember to declare it @dynamic or @synthesized in the @implementation ?

I’ll try the opposite approach and try adding code to the to an empty script until I get an error to figure out what is doing it. But I think this post is getting pretty big.

Bill


#4

Mark,

Problem with SD 6.0.7 (6A217) update part 2

I tried the reverse of deleting parts of the script and started with an empty script. I got all the way up to adding all the script back and it still worked without any problems. So this is a tricky problem. I’ll see if I can figure it and then get to testing some stuff.

Bill


(Mark Alldritt) #5

It’s very possible that AppleScript corrupted your original script file (this can happen when stack overflow errors occur). Once corrupted, the only way I’ve found to correct the situation is to quit and relaunch your editor (Script Debugger or Script Editor) and create the document from scratch (paste in script text).

When you are dealing with these types of corruptions, it’s difficult to reproduce errors reliably.