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.
Related
code :
- (void)stopCurrentSessionFromSuite:(NSNotification*)notification{
isCloseCurrentSession = YES;
dispatch_async(self.dataSendingQueue, ^{
CARD8 messageToDisableSession = rpcHostDisableMsg;
[readerNwriter writeExact:(char*)&messageToDisableSession ofLenght:sizeof(CARD8) secApplied:NO];
});
[rpcCaptureMgr stopCaptureSession];
}
Crash :
Time Awake Since Boot: 1400 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes:
KERN_INVALID_ADDRESS at 0x0000000000000070 Exception Note:
EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11 Termination Reason:
Namespace SIGNAL, Code 0xb Terminating Process: exc handler [0]
VM Regions Near 0x70:
-->
__TEXT 000000010871a000-000000010873a000 [ 128K] r-x/rwx SM=COW
/Applications/RemotePCSuite/*/RemotePCDesktop.app/Contents/MacOS/RemotePCDesktop
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0
libdispatch.dylib 0x00007fff72de50db
_dispatch_continuation_async + 5 1 com.prosoftnet.remotepcDesktop 0x0000000108727fd5
-[RPCDesktopAppDelegate stopCurrentSessionFromSuite:] + 104 2 com.apple.CoreFoundation 0x00007fff4b7a333c
CFNOTIFICATIONCENTER_IS_CALLING_OUT_TO_AN_OBSERVER + 12 3 com.apple.CoreFoundation 0x00007fff4b7a32cf
_CFXRegistrationPost_block_invoke + 63 4 com.apple.CoreFoundation 0x00007fff4b7ab92c __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK + 12 5
com.apple.CoreFoundation 0x00007fff4b78e8a3 __CFRunLoopDoBlocks
+ 275 6 com.apple.CoreFoundation 0x00007fff4b78e668 __CFRunLoopRun + 3128 7 com.apple.CoreFoundation 0x00007fff4b78d797 CFRunLoopRunSpecific + 487 8 com.apple.HIToolbox
0x00007fff4aaa2866 RunCurrentEventLoopInMode + 286 9
com.apple.HIToolbox 0x00007fff4aaa25d6
ReceiveNextEventCommon + 613 10 com.apple.HIToolbox
0x00007fff4aaa2354 _BlockUntilNextEventMatchingListInModeWithFilter +
64 11 com.apple.AppKit 0x00007fff48d9fa23 _DPSNextEvent
+ 2085 12 com.apple.AppKit 0x00007fff49534e6c -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 3044 13 com.apple.AppKit 0x00007fff48d94831 -[NSApplication run]
+ 764 14 com.apple.AppKit 0x00007fff48d639d2 NSApplicationMain + 804 15 libdyld.dylib
0x00007fff72e0c145 start + 1
I have been working with Obj-C, Xcode from years, but at times these crash happens to a project. I have no clue how to deal with these.
If someone has any idea, please guide me towards right direction, so that I can workout.
NOTE: The following logs are sent by customer from the live app.
Snipped of crash log is;
Date/Time: 2018-02-08 16:39:36.053 +0530
OS Version: Mac OS X 10.12.6 (16G29)
Report Version: 12
Anonymous UUID: 163431E3-7543-821C-B71C-392218AA5AD3
Sleep/Wake UUID: 1D59C34E-52D6-4F57-A2CE-4C8FAC4387FE
Time Awake Since Boot: 9100 seconds
Time Since Wake: 6000 seconds
System Integrity Protection: enabled
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: EXC_I386_GPFLT
Exception Note: EXC_CORPSE_NOTIFY
Termination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [0]
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libdispatch.dylib 0x00007fffdb6ca521 _dispatch_call_block_and_release + 9
1 libdispatch.dylib 0x00007fffdb6c18fc _dispatch_client_callout + 8
2 libdispatch.dylib 0x00007fffdb6ceaac _dispatch_main_queue_callback_4CF + 925
3 com.apple.CoreFoundation 0x00007fffc5facbc9 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
4 com.apple.CoreFoundation 0x00007fffc5f6dc0d __CFRunLoopRun + 2205
5 com.apple.CoreFoundation 0x00007fffc5f6d114 CFRunLoopRunSpecific + 420
6 com.apple.HIToolbox 0x00007fffc54cdebc RunCurrentEventLoopInMode + 240
7 com.apple.HIToolbox 0x00007fffc54cdcf1 ReceiveNextEventCommon + 432
8 com.apple.HIToolbox 0x00007fffc54cdb26 _BlockUntilNextEventMatchingListInModeWithFilter + 71
9 com.apple.AppKit 0x00007fffc3a66a54 _DPSNextEvent + 1120
10 com.apple.AppKit 0x00007fffc41e27ee -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 2796
11 com.apple.AppKit 0x00007fffc3a5b3db -[NSApplication run] + 926
12 com.apple.AppKit 0x00007fffc3a25e0e NSApplicationMain + 1237
13 libdyld.dylib 0x00007fffdb6f7235 start + 1
Thread 1:
0 libsystem_kernel.dylib 0x00007fffdb825bf2 __psynch_cvwait + 10
1 libsystem_pthread.dylib 0x00007fffdb9117fa _pthread_cond_wait + 712
2 libc++.1.dylib 0x00007fffda28e4cd std::__1::condition_variable::wait(std::__1::unique_lock<std::__1::mutex>&) + 47
3 com.apple.JavaScriptCore 0x00007fffc8f7b43c void std::__1::condition_variable_any::wait<std::__1::unique_lock<bmalloc::Mutex> >(std::__1::unique_lock<bmalloc::Mutex>&) + 108
4 com.apple.JavaScriptCore 0x00007fffc8f7b3bb bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadRunLoop() + 155
5 com.apple.JavaScriptCore 0x00007fffc8f7b28d bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>::threadEntryPoint(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*) + 29
6 com.apple.JavaScriptCore 0x00007fffc8f7b53d void* std::__1::__thread_proxy<std::__1::tuple<void (*)(bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*), bmalloc::AsyncTask<bmalloc::Heap, void (bmalloc::Heap::*)()>*> >(void*) + 93
7 libsystem_pthread.dylib 0x00007fffdb91093b _pthread_body + 180
8 libsystem_pthread.dylib 0x00007fffdb910887 _pthread_start + 286
9 libsystem_pthread.dylib 0x00007fffdb91008d thread_start + 13
0 libdispatch.dylib 0x00007fffdb6ca521 _dispatch_call_block_and_release + 9
1 libdispatch.dylib 0x00007fffdb6c18fc _dispatch_client_callout + 8
2 libdispatch.dylib 0x00007fffdb6ceaac _dispatch_main_queue_callback_4CF + 925
The crash is happening when GCD is trying to execute a block on the main thread. Check you callback blocks to make sure they are cleanly capturing state and that all blocks that need to be copied are copied correctly.
This is likely because there is some object captured by the block that was prematurely released or because the block itself was over-released (unlikely).
I have integrated CEF Framework into my project.
Its working fine for mouse based window close but it crashes If I use inbuilt touch pad of mac book pro while closing browser pop up window.
The pop up window is generate by CEF.
I am able to reproduce the crash like above most of the times.
Here is the crash log
Process: cefclient [1271] Path:
/Users/USER/Documents/*/cefclient.app/Contents/MacOS/cefclient
Identifier: com.genband.omni.mac Version:
1.0.0.30 (1.0.0.30) Code Type: X86-64 (Native) Parent Process: ??? [1] Responsible: cefclient [1271] User
ID: 501
Date/Time: 2016-07-07 14:54:14.865 +0530 OS Version:
Mac OS X 10.10.2 (14C1514) Report Version: 11 Anonymous UUID:
0F54FCED-4D82-FEB9-5CD2-3A541BF3C022
Sleep/Wake UUID: C774E441-04B7-4295-A913-3AD622E6B6F3
Time Awake Since Boot: 4300 seconds Time Since Wake: 710 seconds
Crashed Thread: 0 CrBrowserMain Dispatch queue:
com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV) Exception Codes:
KERN_INVALID_ADDRESS at 0x0000443e46cfbec0
VM Regions Near 0x443e46cfbec0:
mapped file 0000000124936000-0000000124b36000 [ 2048K] rw-/rwx SM=ALI /private/var/folders//.3KjSNY
-->
MALLOC_NANO 0000600000000000-0000600000200000 [ 2048K] rw-/rwx SM=PRV
Application Specific Information: objc_msgSend() selector name:
respondsToSelector: Performing #selector(_close:) from sender
_NSThemeCloseWidget 0x608000186320
Thread 0 Crashed:: CrBrowserMain Dispatch queue:
com.apple.main-thread 0 libobjc.A.dylib
0x00007fff9303f0dd objc_msgSend + 29 1 com.apple.AppKit
0x00007fff87802735 -[NSWindow close] + 312 2 libsystem_trace.dylib
0x00007fff84178cd7 _os_activity_initiate + 75 3 com.apple.AppKit
0x00007fff877b9b71 -[NSApplication sendAction:to:from:] + 452 4
com.apple.AppKit 0x00007fff877b9970 -[NSControl
sendAction:to:] + 86 5 com.apple.AppKit
0x00007fff8798f86c __26-[NSCell _sendActionFrom:]_block_invoke + 131 6
libsystem_trace.dylib 0x00007fff84178cd7
_os_activity_initiate + 75 7 com.apple.AppKit 0x00007fff87802509 -[NSCell _sendActionFrom:] + 144 8
libsystem_trace.dylib 0x00007fff84178cd7
_os_activity_initiate + 75 9 com.apple.AppKit 0x00007fff87801d66 -[NSButtonCell performClick:] + 1027 10
com.apple.Foundation 0x00007fff83eaecdc
__NSThreadPerformPerform + 293 11 com.apple.CoreFoundation 0x00007fff90285681
__CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION + 17 12 com.apple.CoreFoundation 0x00007fff902778dc
__CFRunLoopDoSources0 + 476 13 com.apple.CoreFoundation 0x00007fff90276e3f __CFRunLoopRun + 927 14 com.apple.CoreFoundation
0x00007fff90276858 CFRunLoopRunSpecific + 296 15 com.apple.HIToolbox
0x00007fff8ab26aef RunCurrentEventLoopInMode + 235 16
com.apple.HIToolbox 0x00007fff8ab2686a
ReceiveNextEventCommon + 431 17 com.apple.HIToolbox
0x00007fff8ab266ab _BlockUntilNextEventMatchingListInModeWithFilter +
71 18 com.apple.AppKit 0x00007fff875eaf81
_DPSNextEvent + 964 19 com.apple.AppKit 0x00007fff875ea730 -[NSApplication
nextEventMatchingMask:untilDate:inMode:dequeue:] + 194 20
com.apple.AppKit 0x00007fff875de593 -[NSApplication
run] + 594 21 org.chromium.ContentShell.framework 0x000000010d1b7c81
0x10d080000 + 1277057 22 org.chromium.ContentShell.framework
0x000000010d1b72e4 0x10d080000 + 1274596 23
org.chromium.ContentShell.framework 0x000000010d1ef893 0x10d080000 +
1505427 24 org.chromium.ContentShell.framework 0x000000010d1dd80d
0x10d080000 + 1431565 25 com.genband.omni.mac
0x000000010ceb9d69 client::MainMessageLoopStd::Run() + 9
(main_message_loop_std.cc:15) 26 com.genband.omni.mac
0x000000010cee6c12 main + 2354 (cefclient_mac.mm:1747) 27
libdyld.dylib 0x00007fff8433d5c9 start + 1
Any suggestions are highly welcome
Changing the window_ delegate to nil, in dealloc method of root_window_mac.mm cleared the crash problem for me.
OS X 10.10.3.
What can cause the following crash in Cocoa document based document app? It occurs only when a window save popup panel disappeared:
if a "file already exists" alert sheet appears:
UPDATE: sometimes the app crashes also when simply close the popup but with guarantee when alert sheet appears.
The crash stack:
Crashed Thread: 0 Dispatch queue: com.apple.main-thread
Exception Type: EXC_BAD_ACCESS (SIGSEGV)
Exception Codes: KERN_INVALID_ADDRESS at 0x0000061890cbbec0
VM Regions Near 0x61890cbbec0:
MALLOC_LARGE 000000011da03000-000000011eca3000 [ 18.6M] rw-/rwx SM=ZER
-->
__TEXT 0000123400000000-00001234004a5000 [ 4756K] r-x/rwx SM=COW /System/Library/Extensions/AppleIntelHD4000GraphicsGLDriver.bundle/Contents/MacOS/AppleIntelHD4000GraphicsGLDriver
Application Specific Information:
objc_msgSend() selector name: isKindOfClass:
Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff899120dd objc_msgSend + 29
1 com.apple.ViewBridge 0x00007fff8cadbe74 -[NSRemoteViewBase viewWillMoveToWindow:] + 367
2 com.apple.AppKit 0x00007fff94ca90de -[NSView _setWindow:] + 257
3 com.apple.CoreFoundation 0x00007fff8fafa705 __53-[__NSArrayM enumerateObjectsWithOptions:usingBlock:]_block_invoke + 133
4 com.apple.CoreFoundation 0x00007fff8faf9e09 -[__NSArrayM enumerateObjectsWithOptions:usingBlock:] + 313
5 com.apple.AppKit 0x00007fff9542d474 __21-[NSView _setWindow:]_block_invoke735 + 169
6 com.apple.AppKit 0x00007fff94ca9c54 -[NSView _setWindow:] + 3191
7 com.apple.AppKit 0x00007fff94cb73d7 -[NSVisualEffectView _setWindow:] + 214
8 com.apple.AppKit 0x00007fff94f12747 -[NSPopoverFrame _setWindow:] + 111
9 com.apple.AppKit 0x00007fff94ef961f -[NSWindow dealloc] + 1201
10 com.apple.AppKit 0x00007fff94f8c9f5 -[_NSPopoverWindow dealloc] + 74
11 com.apple.AppKit 0x00007fff94ca68cc -[NSWindow release] + 193
12 com.apple.CoreFoundation 0x00007fff8faf78ec __CFRUNLOOP_IS_CALLING_OUT_TO_A_BLOCK__ + 12
13 com.apple.CoreFoundation 0x00007fff8fae99f5 __CFRunLoopDoBlocks + 341
14 com.apple.CoreFoundation 0x00007fff8fae91ae __CFRunLoopRun + 910
15 com.apple.CoreFoundation 0x00007fff8fae8bd8 CFRunLoopRunSpecific + 296
16 com.apple.HIToolbox 0x00007fff92b7256f RunCurrentEventLoopInMode + 235
17 com.apple.HIToolbox 0x00007fff92b722ea ReceiveNextEventCommon + 431
18 com.apple.HIToolbox 0x00007fff92b7212b _BlockUntilNextEventMatchingListInModeWithFilter + 71
19 com.apple.AppKit 0x00007fff94d079bb _DPSNextEvent + 978
20 com.apple.AppKit 0x00007fff94d06f68 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346
21 com.apple.AppKit 0x00007fff94cfcbf3 -[NSApplication run] + 594
22 com.apple.AppKit 0x00007fff94c79354 NSApplicationMain + 1832
I changed Base SDK from 10.9 to 10.10 in my app and it solved the problem.
As I see crash occurs only on 10.10.3 and higher system version.
If you want to crash TextEdit just change Base SDK to 10.9 or open TextEdit 1.9 or earlier version.
Also someone already wrote radar
http://openradar.appspot.com/20991953
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.