Crash on mac mini when trying to eject disk


#1

Hi,

I’ve got a turntouch with software 1.0.4 connected to a mac mini running Mac OS 10.11.6. I’m trying to use the custom “run script” option to program two of the buttons to eject dvds. I am using the command drutil -drive 2 tray eject. This works in terminal but does not work for turntouch, which crashes (the application closes). Console reports the error at the end of this message.

As well as wondering if I’m doing things right, I wonder if there’s a better method of ejecting disks? I’d like to try apple-e but I can’t see how to program that as a shortcut.

Thanks in advance for any help or advice,

Jo

+++++++++++++++++++++++++++++++++++++

07/02/2019 22:37:19.292 Finder[547]: osascript(6847) System Policy: deny scripting-addition-send 'HUBC'/'load'
07/02/2019 22:37:22.962 Turn Touch Mac[6774]:  ---> Bluetooth data: <fe00> (0/1/0) was:N:0 E:0 W:0 S:0 is:N:1 E:0 W:0 S:0
07/02/2019 22:37:22.962 Turn Touch Mac[6774]:  ---> Button down
07/02/2019 22:37:22.984 Turn Touch Mac[6774]:  ---> Fade in action: 1
07/02/2019 22:37:23.007 Turn Touch Mac[6774]: Buttons: 1: N:1 E:0 W:0 S:0
07/02/2019 22:37:23.189 Turn Touch Mac[6774]:  ---> Bluetooth data: <ff00> (0/0/0) was:N:1 E:0 W:0 S:0 is:N:0 E:0 W:0 S:0
07/02/2019 22:37:23.189 Turn Touch Mac[6774]:  ---> Button up: 0
07/02/2019 22:37:23.190 Turn Touch Mac[6774]:  ---> Fade in action: 1
07/02/2019 22:37:23.191 Turn Touch Mac[6774]: Buttons: 0: N:0 E:0 W:0 S:0
07/02/2019 22:37:23.487 Turn Touch Mac[6774]: Running: 1 - runTTModeCustomScript
07/02/2019 22:37:23.488 Turn Touch Mac[6774]:  -> Getting action options TT:mode:TTModeCustom-north:action:TTModeCustomScript-north:option:customScriptText: drutil -drive 3 tray eject
07/02/2019 22:37:23.492 Turn Touch Mac[6774]: An uncaught exception was raised
07/02/2019 22:37:23.492 Turn Touch Mac[6774]: Couldn't posix_spawn: error 8
07/02/2019 22:37:23.492 Turn Touch Mac[6774]: (
	0   CoreFoundation                      0x00007fff97bde452 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff85e0f73c objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff97c4549d +[NSException raise:format:] + 205
	3   Foundation                          0x00007fff86acdadd -[NSConcreteTask launchWithDictionary:] + 3134
	4   Turn Touch Mac                      0x0000000109fc431d Turn Touch Mac + 819997
	5   Turn Touch Mac                      0x0000000109f68464 Turn Touch Mac + 443492
	6   Turn Touch Mac                      0x0000000109f681bd Turn Touch Mac + 442813
	7   Turn Touch Mac                      0x0000000109f5fcc0 Turn Touch Mac + 408768
	8   libdispatch.dylib                   0x00007fff8655e93d _dispatch_call_block_and_release + 12
	9   libdispatch.dylib                   0x00007fff8655340b _dispatch_client_callout + 8
	10  libdispatch.dylib                   0x00007fff865661f9 _dispatch_after_timer_callback + 77
	11  libdispatch.dylib                   0x00007fff8655340b _dispatch_client_callout + 8
	12  libdispatch.dylib                   0x00007fff86563675 _dispatch_source_latch_and_call + 2235
	13  libdispatch.dylib                   0x00007fff86557a83 _dispatch_source_invoke + 983
	14  libdispatch.dylib                   0x00007fff8656672d _dispatch_main_queue_callback_4CF + 422
	15  CoreFoundation                      0x00007fff97b93949 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	16  CoreFoundation                      0x00007fff97b5282d __CFRunLoopRun + 1949
	17  CoreFoundation                      0x00007fff97b51e28 CFRunLoopRunSpecific + 296
	18  HIToolbox                           0x00007fff9317d935 RunCurrentEventLoopInMode + 235
	19  HIToolbox                           0x00007fff9317d76f ReceiveNextEventCommon + 432
	20  HIToolbox                           0x00007fff9317d5af _BlockUntilNextEventMatchingListInModeWithFilter + 71
	21  AppKit                              0x00007fff90670df6 _DPSNextEvent + 1067
	22  AppKit                              0x00007fff90670226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
	23  AppKit                              0x00007fff90664d80 -[NSApplication run] + 682
	24  AppKit                              0x00007fff9062e368 NSApplicationMain + 1176
	25  libdyld.dylib                       0x00007fff920cf5ad start + 1
	26  ???                                 0x0000000000000001 0x0 + 1
)
07/02/2019 22:37:23.492 Turn Touch Mac[6774]: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Couldn't posix_spawn: error 8'
*** First throw call stack:
(
	0   CoreFoundation                      0x00007fff97bde452 __exceptionPreprocess + 178
	1   libobjc.A.dylib                     0x00007fff85e0f73c objc_exception_throw + 48
	2   CoreFoundation                      0x00007fff97c4549d +[NSException raise:format:] + 205
	3   Foundation                          0x00007fff86acdadd -[NSConcreteTask launchWithDictionary:] + 3134
	4   Turn Touch Mac                      0x0000000109fc431d Turn Touch Mac + 819997
	5   Turn Touch Mac                      0x0000000109f68464 Turn Touch Mac + 443492
	6   Turn Touch Mac                      0x0000000109f681bd Turn Touch Mac + 442813
	7   Turn Touch Mac                      0x0000000109f5fcc0 Turn Touch Mac + 408768
	8   libdispatch.dylib                   0x00007fff8655e93d _dispatch_call_block_and_release + 12
	9   libdispatch.dylib                   0x00007fff8655340b _dispatch_client_callout + 8
	10  libdispatch.dylib                   0x00007fff865661f9 _dispatch_after_timer_callback + 77
	11  libdispatch.dylib                   0x00007fff8655340b _dispatch_client_callout + 8
	12  libdispatch.dylib                   0x00007fff86563675 _dispatch_source_latch_and_call + 2235
	13  libdispatch.dylib                   0x00007fff86557a83 _dispatch_source_invoke + 983
	14  libdispatch.dylib                   0x00007fff8656672d _dispatch_main_queue_callback_4CF + 422
	15  CoreFoundation                      0x00007fff97b93949 __CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE__ + 9
	16  CoreFoundation                      0x00007fff97b5282d __CFRunLoopRun + 1949
	17  CoreFoundation                      0x00007fff97b51e28 CFRunLoopRunSpecific + 296
	18  HIToolbox                           0x00007fff9317d935 RunCurrentEventLoopInMode + 235
	19  HIToolbox                           0x00007fff9317d76f ReceiveNextEventCommon + 432
	20  HIToolbox                           0x00007fff9317d5af _BlockUntilNextEventMatchingListInModeWithFilter + 71
	21  AppKit                              0x00007fff90670df6 _DPSNextEvent + 1067
	22  AppKit                              0x00007fff90670226 -[NSApplication _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 454
	23  AppKit                              0x00007fff90664d80 -[NSApplication run] + 682
	24  AppKit                              0x00007fff9062e368 NSApplicationMain + 1176
	25  libdyld.dylib                       0x00007fff920cf5ad start + 1
	26  ???                                 0x0000000000000001 0x0 + 1
)
07/02/2019 22:37:23.496 diagnosticd[130]: error evaluating process info - pid: 6774, puniqueid: 6774
07/02/2019 22:37:23.498 com.apple.xpc.launchd[1]: (com.turntouch.mac-remote.119712[6774]) Service exited due to signal: Abort trap: 6
07/02/2019 22:37:23.534 com.apple.xpc.launchd[1]: (com.apple.ReportCrash[6849]) Endpoint has been activated through legacy launch(3) APIs. Please switch to XPC or bootstrap_check_in(): com.apple.ReportCrash
07/02/2019 22:37:24.028 ReportCrash[6849]: Saved crash report for Turn Touch Mac[6774] version 1.0.4 (48) to /Users/jo/Library/Logs/DiagnosticReports/Turn Touch Mac_2019-02-07-223724_Joanne-Kayes-Mac-mini.crash

#2

Hello,

Maybe try adding the shebang to your script :

#!/bin/bash
drutil -drive 3 tray eject

#3

Hi,

Oh silly me! Yes that worked fine, thanks for the reminder!

Jo