ChildProcess & File Permissions


#1

Hi all,

On OSX I was running into an odd crash when trying to call an executable via ChildProcess (from a juce plugin within Reaper64). It turns out the permissions on the executable were set to read & write only.  Adding the "executable" permission fixed it.

Perhaps I am missing something, but can ChildProcess not gracefully handle such an error? It seems pretty dramatic to just crash & burn than to return an error code or boolean false. Below is the crash report stack trace that insues.


EXC_BAD_ACCESS (SIGSEGV) KERN_INVALID_ADDRESS at 0x0000000000000110
5174C641-77F5-4A7A-ADBE-4663EE3C0309 D3BE965E-425A-426E-BF9E-7A8F454213DD


VM Regions Near 0x110: -->
__TEXT 0000000100000000-00000001009a4000 [ 9872K] r-x/rwx SM=COW /Applications/REAPER64.app/Contents/MacOS/REAPER


Application Specific Information:
*** multi-threaded process forked *** crashed on child side of fork pre-exec


Thread 0 Crashed:: Dispatch queue: source
0 libdispatch.dylib 0x00007fff97d9279a _dispatch_barrier_async_f_slow + 360
1 libdispatch.dylib 0x00007fff97d90c13 _dispatch_client_callout + 8 2 libdispatch.dylib 0x00007fff97d96294 _dispatch_barrier_trysync_f_invoke + 57
3 com.apple.AppKit 0x00007fff91a47465 ____NSHysteresisBlock_block_invoke160 + 252
4 com.apple.AppKit 0x00007fff912caac0 -[NSPersistentUIManager acquireDirtyState] + 348
5 com.apple.AppKit 0x00007fff912ca788 -[NSPersistentUIManager changeWindow:toStatus:withConditionalGeneration:] + 109
6 com.apple.AppKit 0x00007fff913f1173 -[NSWindow _reallyDoOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 4278
7 com.apple.AppKit 0x00007fff913efe17 -[NSWindow _doOrderWindow:relativeTo:findKey:forCounter:force:isModal:] + 829
8 com.apple.AppKit 0x00007fff913efa6b -[NSWindow
orderWindow:relativeTo:] + 159 9 com.apple.AppKit _close]_block_invoke + 444
10 com.apple.AppKit
11 com.apple.FinderKit
[FI_TFloatingInputWindowController dealloc] + 69
12 libobjc.A.dylib 0x00007fff9447b68c objc_object::sidetable_release(bool) + 236
13 com.apple.AppKit 0x00007fff913cf804 -[NSWindowController release] + 154
14 com.apple.FinderKit 0x00007fff9701e4cc TRef<FI_TFloatingInputWindowController*, OBJCRetainReleasePolicy<FI_TFloatingInputWindowController*> >::~TRef() + 12
15 libsystem_c.dylib
16 libsystem_c.dylib
17 juce::ChildProcess::ActiveProcess::ActiveProcess(juce::StringArray const&, int) + 1155
18 juce::ChildProcess::ActiveProcess::ActiveProcess(juce::StringArray const&, int) + 35 
19 juce::ChildProcess::start(juce::StringArray const&, int) + 107