Even for 64bit my users continue to get hard crashes in NSAppleScriptMBS:
[quote]Thread 3:
0 com.apple.AE 0x00007fff470809b5 OpaqueAEStreamRef::closeDesc() + 165
1 com.apple.applescript 0x00007fff56ec7cb2 AEStream_WriteKeyDesc + 12
2 com.apple.applescript 0x00007fff56ef203a UASStartObjectSpecifier(AEStream&, unsigned int) + 64
3 com.apple.applescript 0x00007fff56ef1b4a TUASProperty::WriteWithoutContainer(AEStream&) + 78
4 com.apple.applescript 0x00007fff56ef1f6c TUASProperty::WriteForTarget(AEStream&, unsigned char) + 14
5 com.apple.applescript 0x00007fff56f06ad0 TUASValue::BecomeAEDescLocation(AEDesc&, TUASApplication*, unsigned char) + 104
6 com.apple.applescript 0x00007fff56ef9853 UASBuildEvent(TStackFrame_UASRemoteSend*, unsigned char, AEDesc*) + 1835
7 com.apple.applescript 0x00007fff56efa81a UASRemoteSend(unsigned char, unsigned char, unsigned char, unsigned char, unsigned char, unsigned char*) + 498
8 com.apple.applescript 0x00007fff56ef1368 UASRemoteGetData(TUASObjectAlias*, TUASApplication*, TUASClassIdentifier*, unsigned char*) + 934
9 com.apple.applescript 0x00007fff56f04c43 UASGetDataNoCircularities(unsigned char, TUASClassIdentifier*) + 139
10 com.apple.applescript 0x00007fff56f04cbc UASGetData(unsigned char, TUASClassIdentifier*) + 54
11 com.apple.applescript 0x00007fff56ef0edf TUASObjectAlias::DidBecomeType(TUASClassIndex, TUASValue*&, TUASClassIdentifier*) + 95
12 com.apple.applescript 0x00007fff56f0306e TUASValue::BecomeType(TUASValue*&, TUASClassIdentifier*) + 64
13 com.apple.applescript 0x00007fff56efe6fa BCNot() + 38
14 com.apple.applescript 0x00007fff56edd9bf UASExecute1() + 1037
15 com.apple.applescript 0x00007fff56edd56f UASExecute(unsigned char) + 192
16 com.apple.applescript 0x00007fff56eac8b5 ASExecute(unsigned int, unsigned int, int, unsigned int*) + 464
17 com.apple.applescript 0x00007fff56ea8cb4 AppleScriptComponent + 1536
18 com.apple.applescript 0x00007fff56ec2e3b AGenericCall::Delegate(ComponentInstanceRecord*) + 37
19 com.apple.applescript 0x00007fff56ec2e01 AGenericManager::HandleOSACall(ComponentParameters*) + 57
20 com.apple.applescript 0x00007fff56ec23e1 GenericComponent + 161
21 com.apple.openscripting 0x00007fff45365eff OSAExecute + 54
22 com.apple.Foundation 0x00007fff48255e01 -[NSAppleScript(NSPrivate) _executeWithMode:andReturnError:] + 122
23 MBS_MacCocoa_NSAppleScript_Plugin_19677.dylib 0x000000010c842d99 executeAndReturnError(REALobjectStruct*, _REALdictionary*&) + 169
24 com.mothsoftware.mailarchiverx 0x0000000105505007 NSAppleScriptMBS.execute%o%o&o + 71
25 com.mothsoftware.mailarchiverx 0x0000000105835590 RunAS.executeScript%%o + 896
26 com.mothsoftware.mailarchiverx 0x0000000105837ee8 RunAS.ExecuteScriptWithParameters%%oo + 696
27 com.mothsoftware.mailarchiverx 0x00000001064c8592 emlxIterator.getHeader%s%o + 3122[/quote]
I have never seen such a crash myself. I only know that this usually happens for Mail and large mailboxes:
The crashing script is this one:
[code]Private Function MakeScriptTextHeader() as String()
dim theScript(-1) as String
for currentDepth as Integer = 0 to CountFields(MailboxPath, globals.MailboxDivider) - 1
theScript.append “property Mailbox” + Str(currentDepth) + “: ‘’”
next
theScript.Append “property currentMessageStr: ‘0’”
theScript.Append “property NoOfMailsStr : ‘1’”
theScript.Append “set currentMessage to currentMessageStr as integer”
theScript.append “set AllHeaders to {}”
theScript.append “tell application ‘Mail’”
theScript.Append “try”
theScript.Append “repeat with messageNo from currentMessage to currentMessage + 9”
if doAlternate then
theScript.append "set theMessage to (message MessageNo of " + AlternateMailboxString + “)”
else
theScript.append "set theMessage to (message MessageNo of " + MailboxString + “)”
end if
theScript.append “if not deleted status of theMessage then”
theScript.append “set theRes to (all headers of theMessage)”
theScript.append “if theRes = ‘’ then”
theScript.append “copy (‘empty’) to end of AllHeaders”
theScript.append “else”
theScript.append “copy theRes to end of AllHeaders”
theScript.append “end if”
theScript.append “else”
theScript.append “copy (‘deleted’) to end of AllHeaders”
theScript.append “end if”
theScript.append “end repeat”
theScript.append “return AllHeaders”
theScript.append “on error errMsg number errNr”
theScript.append “if errNr = -1719 then”
theScript.append “return AllHeaders”
theScript.append “end if”
theScript.append “end try”
theScript.append “end tell”
Return theScript
End Function[/code]
The script is executed lots of times so that I use NSAutoreleasePoolMBS regularly.
Any ideas how to solve this?
Xojo 2018r1, MBS from June 2018, High Sierra.