Warning: Creating default object from empty value in /www/htdocs/harmless/hscs.php on line 239
harmless Cocoa: AMShellWrapper
AMShellWrapper 2007-03-16 00:32:35
Based on TaskWrapper from Apple's Moriarity sample code, use this class to run commandline tools from your application. Connect your own methods to stdout and stderr, get notified on process termination and more.
von Ricky Nelson

I did more testing. I took your sample application and converted it to ARC and it still works fine. So its looking like I have some other issue in my application. Sorry to bother you. I thought it might have been something to do with the ARC conversion. I don't like problems that work just fine in development, but not in production, they are so hard to figure out :(

von Ricky Nelson

I'm using your AMShellWrapper in my project and it works great. I made some minor adjustments to get it to build since my project utilizes ARC. However when I Archive the project and run it, I'm getting error:

Exception Codes: EXC_I386_GPFLT

in [AMShellWrapper getData:]. I'm not sure why. I even added @try/@catch blocks around everything and the exceptions are not caught. I was curious if you might have any insight on this?

Thread 0 Crashed:: Dispatch queue: com.apple.main-thread
0 libobjc.A.dylib 0x00007fff8cdd8f5e objc_release + 14
1 com.lark.software.Trogon 0x00000001034fe432 -[AMShellWrapper getData:] + 593 (AMShellWrapper.m:370)
2 com.apple.CoreFoundation 0x00007fff8f84b47a _CFXNotificationPost + 2554
3 com.apple.Foundation 0x00007fff91b45846 -[NSNotificationCenter postNotificationName:object:userInfo:] + 64
4 com.apple.Foundation 0x00007fff91c03a7c _performFileHandleSource + 1280
5 com.apple.CoreFoundation 0x00007fff8f818101 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
6 com.apple.CoreFoundation 0x00007fff8f817aed __CFRunLoopDoSources0 + 445
7 com.apple.CoreFoundation 0x00007fff8f83adc5 __CFRunLoopRun + 789
8 com.apple.CoreFoundation 0x00007fff8f83a6b2 CFRunLoopRunSpecific + 290
9 com.apple.HIToolbox 0x00007fff8cad90a4 RunCurrentEventLoopInMode + 209
10 com.apple.HIToolbox 0x00007fff8cad8e42 ReceiveNextEventCommon + 356
11 com.apple.HIToolbox 0x00007fff8cad8cd3 BlockUntilNextEventMatchingListInMode + 62
12 com.apple.AppKit 0x00007fff8fb4a613 _DPSNextEvent + 685
13 com.apple.AppKit 0x00007fff8fb49ed2 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 128
14 com.apple.AppKit 0x00007fff8fb41283 -[NSApplication run] + 517
15 com.apple.AppKit 0x00007fff8fae5cb6 NSApplicationMain + 869
16 com.lark.software.Trogon 0x00000001034f3c74 start + 52

Name:  Passwort: (1)
Email: (2)
Webseite: (3)
Obige Zeichen eingeben: (Groß-/Kleinschreibung egal)

1) Bitte geben Sie möglichst Ihren echten Namen an. (Momentan gibt es keine Möglichkeit, einen festen Account anzulegen.)

2) Ihre Email-Adresse wird nie veröffentlicht werden. Die Angabe ermöglicht mir, Sie ggf. zu kontaktieren.

3) Die Adresse Ihrer Webseite wird zusammen mit Ihrem Namen veröffentlicht. Bitte kurz halten.

Ich behalte mir das Recht vor, Beiträge aus beliebigen Gründen zu löschen.
Also bitte keinen SPAM posten, beim Thema bleiben, nicht unverschämt werden, etc.