Skip navigation.
 
mlRe: EXC_BAD_ACCESS when trying to use [NSMutableURLRequest setHTTPBodyStream]
FROM : I. Savant
DATE : Thu Jan 10 19:34:23 2008

> I'm thinking that this use case is slightly different since it's based
> solely on Foundation in a command-line tool without any AppKit, Cocoa,
> etc. So it's quite possible that some other commonly-used framework is
> adding something that hides the bug.


  Also (slightly more) possible ... but also (slightly less) unlikely. ;-)

> I've already done that. In my first post, the entirety of my project
> was a single file, httptest.m, which was listed in the code at the
> bottom of the post. Anyway, I've now put the rest of the project up at


  You know, I completely missed the main() method at the bottom. I
blame gMail. ;-)

  Anyway, after a closer look, I see your initializer isn't quite
right ... you should be calling super -init ...

- (id)initMyOwnSpecialWay ...
{
  self = [super init];
  if (self)
  {
    // Do my own initialization
  }
  return self;
}

  I can't test your code (or my assertion) on this machine as this
particular office is Tiger-only, but if you haven't solved it by this
evening (East coast time), I'll take a look. My laptop was left at
home today ...

--
I.S.