Faulting code:
myTask = [NSTask launchedTaskWithLaunchPath: appPath arguments: initArray];
Where myTask is a global static NSTask* myTask = NULL;
and initArray is a global static NSMutableArray *initArray = NULL;
and appPath is a local NSString*
Exception Type: EXC_GUARD
Exception Codes: 0x4000000200000001, 0x326e91a2a5c769eb
Exception Subtype: GUARD_TYPE_FD, id=0x326e91a2a5c769eb, fd=1, flavor=0x00000002 (DUP)
Top of stack:
0 libsystem_kernel.dylib 0x00007fff2033848e dup + 10
1 com.apple.Foundation 0x00007fff2126df14 -[NSConcreteTask launchWithDictionary:error:] + 2491
2 com.apple.Foundation 0x00007fff21294c89 +[NSTask launchedTaskWithLaunchPath:arguments:] + 146
This issue is not reproducible and this code has not been changed since years. Please suggest some ways to debug this.
Additional info: Parent app which is launching this task has its output stream and error stream set to a log file but both the streams have been set after this app gets launched.
User contributions licensed under CC BY-SA 3.0