• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Why does -[NSURLConnection start] crash?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why does -[NSURLConnection start] crash?


  • Subject: Why does -[NSURLConnection start] crash?
  • From: Jeff Johnson <email@hidden>
  • Date: Mon, 30 Mar 2009 14:32:32 -0500

Here's the sample code:

http://lapcatsoftware.com/downloads/ConnectionStartCrash.m

It crashes when calling this:

_connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:NO];
[_connection start];


but not this:

_connection = [[NSURLConnection alloc] initWithRequest:request delegate:self startImmediately:YES];

Of course, you wouldn't normally want to call [_connection start] immediately; in my tool, I was using performSelector:afterDelay: to call it, and the crash still occurs.

Here's the backtrace:

#0 0x97092152 in CFSetApplyFunction ()
#1 0x95b0cdad in CFNSchedulingSetScheduleSource ()
#2 0x95b375bb in RunLoopMultiplexer::sourceForScheduling ()
#3 0x95b3769a in RunLoopMultiplexer::schedule ()
#4 0x95b88d96 in URLConnectionClient::start ()
#5 0x00001bd9 in -[MyConnectionDelegate connectWithCrash:] (self=0x103330, _cmd=0x1f5c, shouldCrash=1 '\001') at /Users/jeff/ Documents/Programming/TestProjects/ConnectionStartCrash/ ConnectionStartCrash.m:24
#6 0x00001d38 in main (argc=1, argv=0xbffff694) at /Users/jeff/ Documents/Programming/TestProjects/ConnectionStartCrash/ ConnectionStartCrash.m:50


The argument for cachePolicy: doesn't seem to matter, by the way.

Am I missing something? Is there some run loop setup I need to perform?

-Jeff

_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: Why does -[NSURLConnection start] crash?
      • From: Peter N Lewis <email@hidden>
  • Prev by Date: Re: [BUG?] - [NSLayoutManager usedRectForTextContainer:] returns incorrect value
  • Next by Date: Re: NSTableColumn's sort key in Interface Builder
  • Previous by thread: [SOLVED] Re: NSTableColumn's sort key in Interface Builder
  • Next by thread: Re: Why does -[NSURLConnection start] crash?
  • Index(es):
    • Date
    • Thread