NSTask stealth bug in readDataOfLength!! :(
NSTask stealth bug in readDataOfLength!! :(
- Subject: NSTask stealth bug in readDataOfLength!! :(
- From: "Theodore H. Smith" <email@hidden>
- Date: Wed, 25 Oct 2006 18:19:58 +0100
I'm trying to debug this strange problem with NSTask:
NSTask* t = [NSTask new];
[t setLaunchPath:@"/usr/bin/curl"];
[t setArguments:array];
NSPipe* pope = [NSPipe pipe];
NSFileHandle* fh = [pope fileHandleForReading];
[t setStandardOutput:pope];
[t launch];
NSData* data = [fh readDataToEndOfFile];
Now readDataToEndOfFile seems to call through to readDataOfLength.
Upon running, this gives me an
"_NSfileHandleRaiseOperatioNException". No idea why.
But if I step through the debugger, it works just fine!!!
So if i try to debug it, the bug goes away. This is why I call it a
stealth bug. It's making no sense. Any answers anyone??
Why is the task raising an exception anyhow? Is it because the task
hasn't loaded yet or what?
This is driving me crazy! I follow the examples here http://
www.cocoadev.com/index.pl?WrappingUnixApps and it doesn't work!! :(
--
http://elfdata.com/plugin/
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden