AVSpeechSynthesizer causing crashes on ios11.4 - crash

I got a crash relate AVSpeechSynthersizer. and my code is,
AVSpeechUtterance *utterance = [[AVSpeechUtterance alloc] initWithString:text];
utterance.rate = rate;
utterance.pitchMultiplier = pitchMultiplier;
utterance.voice = [AVSpeechSynthesisVoice voiceWithLanguage:languageCode];
_startTime = [[NSDate date] timeIntervalSince1970];
[self.speechSynthesizer speakUtterance:utterance];
There is only one user case this crash. OS version is 11.4, device is iPhone6.
crash stack info:
Incident Identifier: 24E003DC-47C0-45B0-A22E-A351B2A8046A
CrashReporter Key: c8844c975fe64b90aad2b813254959a928e4c4ea
Hardware Model: iPhone7,2
Process: qcs.r [779]
Path: /var/containers/Bundle/Application/0242C042-0AE5-4033-AE07-D1BECD6DD910/qcs.r.app/qcs.r
Identifier: com.meituan.qcs.r.ios
Version: 2.1.9 (1682)
Code Type: ARM-64
Parent Process: ? [1]
Date/Time: 2018-06-14 13:41:58.000 +0800
OS Version: iOS 11.4 (15F79)
Report Version: 104
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000 at 0x0000000000000000
Crashed Thread: 53
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** +[NSString stringWithUTF8String:]: NULL cString
UserInfo:(null)'
Thread 53 Crashed:
0 CoreFoundation __exceptionPreprocess+ 228
1 libobjc.A.dylib objc_exception_throw (in libobjc.A.dylib) + 56
2 CoreFoundation -[NSException initWithCoder:]+ 0
3 Foundation +[NSString stringWithUTF8String:]+ 92
4 TTSSpeechBundle 0x0000000105f87544 0x105f70000 + 95556
5 libsystem_pthread.dylib _pthread_body (in libsystem_pthread.dylib) + 272
6 libsystem_pthread.dylib _pthread_body (in libsystem_pthread.dylib) + 0
7 libsystem_pthread.dylib thread_start (in libsystem_pthread.dylib) + 4

Could your text argument here be nil by any chance? initWithString:text

Related

macOS app works fine in Mojave but crashes in Catalina Beta version

I was trying to test app that works fine on Mojave but keeps crashing on Catalina. I am providing the crash details below for any help.What could be the reason for it to not work on Catalina?
I was trying to test app that works fine on Mojave but keeps crashing on Catalina. I am providing the crash details below for any help.What could be the reason for it to not work on Catalina?
Process: SSWatcher [9887]
Path: /Library/Application Support/safe/MacOS/SSWatcher
Identifier: com.safe.sswatcher
Version: 1.0
Code Type: X86-64 (Native)
Parent Process: ??? [1]
Responsible: SSWatcher [9887]
User ID: 501
Date/Time: 2019-09-18 16:02:08.870 +0800
OS Version: Mac OS X 10.15 (19A558d)
Report Version: 12
Anonymous UUID: 75520E05-90C3-B100-E7E3-3AE1B6910181
Sleep/Wake UUID: 551DFEAF-E97E-42BB-9610-A525913A821B
Time Awake Since Boot: 6900 seconds
Time Since Wake: 4600 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Application Specific Information:
*** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** -[__NSArrayM insertObject:atIndex:]: object cannot be nil'
terminating with uncaught exception of type NSException
abort() called
Application Specific Backtrace 1:
0 CoreFoundation 0x00007fff396d8033 __exceptionPreprocess + 250
1 libobjc.A.dylib 0x00007fff6f6e6bd4 objc_exception_throw + 48
2 CoreFoundation 0x00007fff3979adda _CFThrowFormattedException + 202
3 CoreFoundation 0x00007fff39798dc0 -[__NSArrayM insertObject:atIndex:].cold.2 + 0
4 CoreFoundation 0x00007fff39618811 -[__NSArrayM insertObject:atIndex:] + 1255
5 SSWatcher 0x000000010d1a5314 -[DNCurrentWindow SetFrontMostWindow] + 1540
6 SSWatcher 0x000000010d1a3e15 _Z29InstallSSWatcherEventHandlersv + 85
7 SSWatcher 0x000000010d1a9111 -[DNMainController awakeFromNib] + 545
8 CoreFoundation 0x00007fff3968d735 -[NSSet makeObjectsPerformSelector:] + 231
9 AppKit 0x00007fff36855e8c -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1485
10 AppKit 0x00007fff36853eaf loadNib + 401
11 AppKit 0x00007fff3685345e +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 693
12 AppKit 0x00007fff368530b4 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
13 AppKit 0x00007fff36852e8d +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 446
14 AppKit 0x00007fff368490b6 NSApplicationMain + 505
15 SSWatcher 0x000000010d1a37e2 main + 34
16 libdyld.dylib 0x00007fff70a452a5 start + 1
17 ??? 0x0000000000000001 0x0 + 1
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libsystem_kernel.dylib 0x00007fff70b942aa __pthread_kill + 10
1 libsystem_pthread.dylib 0x00007fff70c51707 pthread_kill + 384
2 libsystem_c.dylib 0x00007fff70b1ca08 abort + 120
3 libc++abi.dylib 0x00007fff6dbe8bc8 abort_message + 231
4 libc++abi.dylib 0x00007fff6dbe8d7c demangling_terminate_handler() + 262
5 libobjc.A.dylib 0x00007fff6f6e8aaa _objc_terminate() + 96
6 libc++abi.dylib 0x00007fff6dbf5da7 std::__terminate(void (*)()) + 8
7 libc++abi.dylib 0x00007fff6dbf5b55 __cxxabiv1::failed_throw(__cxxabiv1::__cxa_exception*) + 27
8 libc++abi.dylib 0x00007fff6dbe734f __cxa_throw + 113
9 libobjc.A.dylib 0x00007fff6f6e6d02 objc_exception_throw + 350
10 com.apple.CoreFoundation 0x00007fff3979adda _CFThrowFormattedException + 202
11 com.apple.CoreFoundation 0x00007fff39798dc0 -[__NSArrayM insertObject:atIndex:].cold.1 + 35
12 com.apple.CoreFoundation 0x00007fff39618811 -[__NSArrayM insertObject:atIndex:] + 1255
13 com.esafe.sswatcher 0x000000010d1a5314 -[DNCurrentWindow SetFrontMostWindow] + 1540
14 com.esafe.sswatcher 0x000000010d1a3e15 InstallSSWatcherEventHandlers() + 85
15 com.esafe.sswatcher 0x000000010d1a9111 -[DNMainController awakeFromNib] + 545
16 com.apple.CoreFoundation 0x00007fff3968d735 -[NSSet makeObjectsPerformSelector:] + 231
17 com.apple.AppKit 0x00007fff36855e8c -[NSIBObjectData nibInstantiateWithOwner:options:topLevelObjects:] + 1485
18 com.apple.AppKit 0x00007fff36853eaf loadNib + 401
19 com.apple.AppKit 0x00007fff3685345e +[NSBundle(NSNibLoading) _loadNibFile:nameTable:options:withZone:ownerBundle:] + 693
20 com.apple.AppKit 0x00007fff368530b4 -[NSBundle(NSNibLoading) loadNibNamed:owner:topLevelObjects:] + 201
21 com.apple.AppKit 0x00007fff36852e8d +[NSBundle(NSNibLoading) loadNibNamed:owner:] + 446
22 com.apple.AppKit 0x00007fff368490b6 NSApplicationMain + 505
23 com.esafe.sswatcher 0x000000010d1a37e2 main + 34
24 libdyld.dylib 0x00007fff70a452a5 start + 1
Thread 1:
0 libsystem_pthread.dylib 0x00007fff70c4e5b4 start_wqthread + 0
Thread 2:
0 libsystem_pthread.dylib 0x00007fff70c4e5b4 start_wqthread + 0
Thread 3:
0 libsystem_pthread.dylib 0x00007fff70c4e5b4 start_wqthread + 0
Thread 4:
0 libsystem_pthread.dylib 0x00007fff70c4e5b4 start_wqthread + 0
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000118023d40 rcx: 0x00007ffee2a5b8f8 rdx: 0x0000000000000000
rdi: 0x0000000000000307 rsi: 0x0000000000000006 rbp: 0x00007ffee2a5b920 rsp: 0x00007ffee2a5b8f8
r8: 0x00007ffee2a5b7c0 r9: 0x00007ffee2a5b990 r10: 0x0000000000000000 r11: 0x0000000000000246
r12: 0x0000000000000307 r13: 0x0000003000000008 r14: 0x0000000000000006 r15: 0x0000000000000016
rip: 0x00007fff70b942aa rfl: 0x0000000000000246 cr2: 0x00007fff9d6a7628
Logical CPU: 0
Error Code: 0x02000148
Trap Number: 133
Hope the details are enough

In MAC 10.10.5 MyApp crashes

MyApp has crashed and I have collected the below crash log from that MAC book. As it is mentioned the application crashed at thread 3, I could not able to figure out what has happened,
I was suspecting it could be because of a NSTimer Lock and tryLock, but not sure how to figure it out. Crash is not happening with all MAC book but only to a certain set of users all of them are just migrated to MAC 10.10.5. But I have also other MAC book which has MAC 10.10.5 in which MyApp is running perfectly.
can anyone help me out to find the problem?
If i looked at the code at [AppMainController sendPacketForLoginStatus] + 1644
it is just a comment line just after the curly brace { starting of an else{}
if
...
else
{
<< line no: 1644>> // Change the status icon if necessary when losing the focus
[self performSelectorOnMainThread:#selector(showClickStatusIconWhenLoseFocusInThread) withObject:nil waitUntilDone:NO];
...
Crash log:
Process: MyAppAgent [581]
Path: /Applications/MyAppAgent.app/Contents/MacOS/MyAppAgent
Identifier: com.Mycmp.MyApp.MyAppAgent
Version: 1.0.0.1
Code Type: X86 (Native)
Parent Process: ??? [1]
Responsible: MyAppAgent [581]
User ID: 501
Date/Time: 2015-09-08 10:32:09.940 -0400
OS Version: Mac OS X 10.10.5 (14F27)
Crashed Thread: 3
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000000022b0dd78
....
Thread 3 Crashed:
0 com.Mycmp.MyApp.MyAppAgent 0x00012a74 -[AppMainController sendPacketForLoginStatus] + 1644
1 com.Mycmp.MyApp.MyAppAgent 0x0001012c -[AppMainController timerQueryDiscovery:] + 1726
2 com.apple.Foundation 0x943ba76f __NSFireTimer + 119
3 com.apple.CoreFoundation 0x90653006 __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ + 22
4 com.apple.CoreFoundation 0x90652ab4 __CFRunLoopDoTimer + 1316
5 com.apple.CoreFoundation 0x906ce54f __CFRunLoopDoTimers + 351
6 com.apple.CoreFoundation 0x9060a531 __CFRunLoopRun + 2081
7 com.apple.CoreFoundation 0x90609aa6 CFRunLoopRunSpecific + 390
8 com.apple.CoreFoundation 0x9060990b CFRunLoopRunInMode + 123
9 com.apple.Foundation 0x944043ea -[NSRunLoop(NSRunLoop) runMode:beforeDate:] + 305
10 com.apple.Foundation 0x944847fa -[NSRunLoop(NSRunLoop) run] + 76
11 com.Mycmp.MyApp.MyAppAgent 0x00002ff0 -[AppMainController threadDiscovery:] + 360
12 com.apple.Foundation 0x943acb8d -[NSThread main] + 45
13 com.apple.Foundation 0x943ac936 __NSThread__main__ + 1538
14 libsystem_pthread.dylib 0x9abfcc25 _pthread_body + 138
15 libsystem_pthread.dylib 0x9abfcb9b _pthread_start + 162
16 libsystem_pthread.dylib 0x9abf9e32 thread_start + 34

Reading a Crash Log iOS

Apparently my apps crashes when using the live server. I'm downloading XML when a user changed the mapregion. The server returns data for the boundingbox and my apps shows the annotation. However when a place has a url variable set my app just crashes. It doesnt even break on a exception breakpoint but just goes straight to main.m.
My device crash log looks like this:
Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Triggered by Thread: 0
Thread 0 Crashed:
0 libsystem_kernel.dylib 0x3b06f1fc __pthread_kill + 8
1 libsystem_pthread.dylib 0x3b0d6a4e pthread_kill + 54
2 libsystem_c.dylib 0x3b020028 abort + 72
3 libsystem_malloc.dylib 0x3b09d758 szone_error + 312
4 libsystem_malloc.dylib 0x3b09da1a free_tiny_botch + 62
5 CoreFoundation 0x30692fd6 CFRelease + 890
6 APPName 0x0011ef04 -[MyPlaceClass dealloc] (MyPlaceClass.mm:650)
7 APPName 0x0011f684 -[MyTextPlace dealloc] (MyTextPlace.m:46)
8 libobjc.A.dylib 0x3aacab06 objc_object::sidetable_release(bool) + 170
9 CoreFoundation 0x30692e88 CFRelease + 556
10 CoreFoundation 0x3069e3b4 -[__NSArrayM dealloc] + 156
11 libobjc.A.dylib 0x3aacab06 objc_object::sidetable_release(bool) + 170
12 libobjc.A.dylib 0x3aabc01e (anonymous namespace)::AutoreleasePoolPage::pop(void*) + 354
13 CoreFoundation 0x306961c4 _CFAutoreleasePoolPop + 12
14 UIKit 0x32edf80c _wrapRunLoopWithAutoreleasePoolHandler + 32
15
I checked (MyPlaceClass.mm:650) and (MyTextPlace.m:46). And that just looks like this:
MyPlaceClass.mm on line 650
- (void)dealloc {
.....
[placeURL release]; // <- This is line 650
[super dealloc];
}
MyTextPlace.m on line 46
- (void)dealloc {
[textContent release]; // <- This is line 46
[super dealloc];
}
Does somebody know whats causing my error and crash on my device? I find it really hard te debug because my exception breakpoints just dont work.
placeURL was already being released.

App hangs and finally crashes, calling [NSView cursorUpdate:] n times

I have been seeing above mentioned crash upon clicking on return key or space bar, while i am editing my textfield. crash log has no reference to any line of my code.
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_PROTECTION_FAILURE at 0x00007fff54c2fff8
VM Regions Near 0x7fff54c2fff8:
MALLOC_SMALL 00007f85ec000000-00007f85ee000000 [ 32.0M] rw-/rwx SM=PRV
--> STACK GUARD 00007fff51430000-00007fff54c30000 [ 56.0M] ---/rwx SM=NUL stack guard for thread 0
Stack 00007fff54c30000-00007fff55430000 [ 8192K] rw-/rwx SM=COW thread 0
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 com.apple.CoreGraphics 0x00007fff92b7b149 CGSLogTrace + 24
1 com.apple.CoreGraphics 0x00007fff92b82d9d CGSGetCurrentCursorLocation + 125
2 com.apple.CoreGraphics 0x00007fff92bb417b CGSGetWindowMouseLocation + 73
3 com.apple.AppKit 0x00007fff96d3f3cd PScurrentmouse + 74
4 com.apple.AppKit 0x00007fff96d3f32c _NSCurrentMouseLocationInWindow + 71
5 com.apple.AppKit 0x00007fff96e8cbe5 -[NSWindow(NSCarbonExtensions) _findCursorForView:] + 94
6 com.apple.AppKit 0x00007fff96e8cb42 -[NSView cursorUpdate:] + 84
7 com.apple.AppKit 0x00007fff96e8ce17 forwardMethod + 125
8 com.apple.AppKit 0x00007fff96e8cb7b -[NSView cursorUpdate:] + 141
and same thing goes on forever. Can any one help me with this? thanks a ton in advance.

Application crashes unless run from Xcode

I have this code:
NSColor *color = [NSColor colorWithDeviceHue:hue
saturation:saturation
brightness:brightness
alpha:1.0];
NSString *scriptString = [NSString stringWithFormat:
#"try\n"
#"tell application \"Adobe Photoshop CS5\" \n"
#"set foreground color to {class:RGB color, red:%f, green:%f, blue:%f} \n"
#"end tell\n"
#"on error\n"
#"try\n"
#"tell application \"Adobe Photoshop CS4\" \n"
#"set foreground color to {class:RGB color, red:%f, green:%f, blue:%f} \n"
#"end tell\n"
#"end try\n"
#"end try",
[color redComponent] * 255,
[color greenComponent] * 255,
[color blueComponent] * 255];
NSLog(#"script string: %#", scriptString);
NSAppleScript *script = [[NSAppleScript alloc] initWithSource:scriptString];
NSDictionary *error;
[script executeAndReturnError:&error];
NSLog(#"result: %#", error);
When I run it from xcode's run feature, it works just fine. When I build it as an application and run it standalone, it quite often crashes in this part.
Any idea why this might be?
EDIT: Most of the crash log (can't fit it all in here)
Process: The Color Picker Sync [1283]
Path: /Users/USER/*/The Color Picker Sync.app/Contents/MacOS/The Color Picker Sync
Identifier: com.Loupe.The-Color-Picker-Sync
Version: 1.1 (1.1)
Code Type: X86-64 (Native)
Parent Process: launchd [160]
Date/Time: 2012-01-21 14:04:54.025 +0000
OS Version: Mac OS X 10.7.2 (11C74)
Report Version: 9
Sleep/Wake UUID: 6BFBE167-51ED-433B-BB70-17D6C4054817
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: 0x000000000000000d, 0x0000000000000000
VM Regions Near 0:
-->
__TEXT 0000000101782000-000000010178c000 [ 40K] r-x/rwx SM=COW /Users/USER/*/The Color Picker Sync.app/Contents/MacOS/The Color Picker Sync
Application Specific Information:
objc_msgSend() selector name: respondsToSelector:
objc[1283]: garbage collection is OFF
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff90d8114d objc_msgSend_vtable5 + 13
1 com.apple.Foundation 0x00007fff8c239456 _NSDescriptionWithLocaleFunc + 50
2 com.apple.CoreFoundation 0x00007fff911284d5 __CFStringAppendFormatCore + 11365
3 com.apple.CoreFoundation 0x00007fff9117acdb _CFStringCreateWithFormatAndArgumentsAux + 107
4 com.apple.CoreFoundation 0x00007fff911f3182 _CFLogvEx + 114
5 com.apple.Foundation 0x00007fff8c2b3b53 NSLogv + 89
6 com.apple.Foundation 0x00007fff8c2b3af1 NSLog + 130
7 com.Loupe.The-Color-Picker-Sync 0x0000000101784103 -[StatusMenuItemSampleAppDelegate didReceiveMessage:] + 1023 (StatusMenuItemSampleAppDelegate.m:294)
8 com.Loupe.The-Color-Picker-Sync 0x00000001017848fb -[LocalRoom receivedNetworkPacket:viaConnection:] + 104 (LocalRoom.m:161)
9 com.Loupe.The-Color-Picker-Sync 0x0000000101785aa2 -[NetworkConnection readFromStreamIntoIncomingBuffer] + 416 (NetworkConnection.m:359)
10 com.apple.CoreFoundation 0x00007fff91183b7b _signalEventSync + 107
11 com.apple.CoreFoundation 0x00007fff91183b02 _cfstream_solo_signalEventSync + 98
12 com.apple.CoreFoundation 0x00007fff91183928 _CFStreamSignalEvent + 632
13 com.apple.CFNetwork 0x00007fff87459613 SocketStream::dispatchSignalFromSocketCallbackUnlocked(SocketStreamSignalHolder*) + 45
14 com.apple.CFNetwork 0x00007fff87458c72 SocketStream::socketCallback(__CFSocket*, unsigned long, __CFData const*, void const*) + 232
15 com.apple.CFNetwork 0x00007fff87458b72 SocketStream::_SocketCallBack_stream(__CFSocket*, unsigned long, __CFData const*, void const*, void*) + 100
16 com.apple.CoreFoundation 0x00007fff9117b714 __CFSocketPerformV0 + 980
17 com.apple.CoreFoundation 0x00007fff91133b51 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
18 com.apple.CoreFoundation 0x00007fff911333bd __CFRunLoopDoSources0 + 253
19 com.apple.CoreFoundation 0x00007fff9115a1a9 __CFRunLoopRun + 905
20 com.apple.CoreFoundation 0x00007fff91159ae6 CFRunLoopRunSpecific + 230
21 com.apple.HIToolbox 0x00007fff8e14d3d3 RunCurrentEventLoopInMode + 277
22 com.apple.HIToolbox 0x00007fff8e15463d ReceiveNextEventCommon + 355
23 com.apple.HIToolbox 0x00007fff8e1544ca BlockUntilNextEventMatchingListInMode + 62
24 com.apple.AppKit 0x00007fff8c5533f1 _DPSNextEvent + 659
25 com.apple.AppKit 0x00007fff8c552cf5 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 135
26 com.apple.AppKit 0x00007fff8c54f62d -[NSApplication run] + 470
27 com.apple.AppKit 0x00007fff8c7ce80c NSApplicationMain + 867
28 com.Loupe.The-Color-Picker-Sync 0x000000010178302c 0x101782000 + 4140
Thread 1:: Dispatch queue: com.apple.libdispatch-manager
0 libsystem_kernel.dylib 0x00007fff8b3cc7e6 kevent + 10
1 libdispatch.dylib 0x00007fff8bf615be _dispatch_mgr_invoke + 923
2 libdispatch.dylib 0x00007fff8bf6014e _dispatch_mgr_thread + 54
Thread 2:: com.apple.CFSocket.private
0 libsystem_kernel.dylib 0x00007fff8b3cbdf2 __select + 10
1 com.apple.CoreFoundation 0x00007fff911a2f9b __CFSocketManager + 1355
2 libsystem_c.dylib 0x00007fff90aad8bf _pthread_start + 335
3 libsystem_c.dylib 0x00007fff90ab0b75 thread_start + 13
Thread 3:
0 libsystem_kernel.dylib 0x00007fff8b3cc192 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff90aaf594 _pthread_wqthread + 758
2 libsystem_c.dylib 0x00007fff90ab0b85 start_wqthread + 13
Thread 4:
0 libsystem_kernel.dylib 0x00007fff8b3cc192 __workq_kernreturn + 10
1 libsystem_c.dylib 0x00007fff90aaf594 _pthread_wqthread + 758
2 libsystem_c.dylib 0x00007fff90ab0b85 start_wqthread + 13
Thread 0 crashed with X86 Thread State (64-bit):
rax: 0x0000000000000000 rbx: 0x0000000000000000 rcx: 0x00007fff6137ec80 rdx: 0x00007fff8c481ccc
rdi: 0x20200a3b31203d20 rsi: 0x00007fff76a0f730 rbp: 0x00007fff6137e970 rsp: 0x00007fff6137e958
r8: 0x000000000000000a r9: 0x000000000000057e r10: 0x0000000000000000 r11: 0x00007fca58557e21
r12: 0x00007fff91128644 r13: 0x000000000000000a r14: 0x20200a3b31203d20 r15: 0x0000000000000000
rip: 0x00007fff90d8114d rfl: 0x0000000000010246 cr2: 0x000000006a86fdc0
Logical CPU: 1
External Modification Summary:
Calls made by other processes targeting this process:
task_for_pid: 11
thread_create: 0
thread_set_state: 0
Calls made by this process:
task_for_pid: 0
thread_create: 0
thread_set_state: 0
Calls made by all processes on this machine:
task_for_pid: 4860
thread_create: 1
thread_set_state: 0
VM Region Summary:
ReadOnly portion of Libraries: Total=211.3M resident=105.4M(50%) swapped_out_or_unallocated=105.9M(50%)
Writable regions: Total=48.2M written=3504K(7%) resident=19.3M(40%) swapped_out=1856K(4%) unallocated=29.0M(60%)
REGION TYPE VIRTUAL
=========== =======
CG backing stores 8K
CG raster data 64K
CG shared images 168K
CoreGraphics 16K
CoreServices 2004K
MALLOC 22.0M
MALLOC guard page 32K
Memory tag=240 4K
Memory tag=242 12K
Memory tag=243 16K
Memory tag=249 156K
STACK GUARD 56.0M
Stack 9820K
VM_ALLOCATE 16.1M
__CI_BITMAP 80K
__DATA 21.8M
__IMAGE 1256K
__LINKEDIT 47.6M
__RC_CAMERAS 236K
__TEXT 163.7M
__UNICODE 544K
mapped file 17.1M
shared memory 312K
=========== =======
TOTAL 358.7M
The most common mistake: NSAppleScript can only be used in the main app thread because it shares a AppleScript ComponentInstance. But if you show up crash log it helps.
You need to set error to nil initially:
NSDictionary *error = nil;
[script executeAndReturnError:&error] will change the value of error only if it fails. That's why you get a bad access if there's no error.