Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6370281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T00:54:36+00:00 2026-05-25T00:54:36+00:00

I have a class that is derived from NSURLConnection. Curiously, description and dealloc fail

  • 0

I have a class that is derived from NSURLConnection. Curiously, description and dealloc fail when directed to the NSURLConnection (even though the actual data transfer operation succeeds).

Here is the init method of my class:

-(id) init {
    self = [super init];
    NSLog(@"%s -- self description is %@", __PRETTY_FUNCTION__, [self description]);
    NSLog(@"%s -- super description is %@", __PRETTY_FUNCTION__, [super description]);
    return self;
}

Here is the log output from executing this code (I implemented description for my class):

2011-08-24 10:41:40.493 SleepyHead[77578:207] -[BinaryExchange init] -- self description is <BinaryExchange>
(gdb) continue
Program received signal:  “EXC_BAD_ACCESS”.

When this happens the debugger is stopped on the [super description] line, and in the call to NSURLConnection description.

What the heck is going on?

(I tried allocating and not initing another copy of the class before this one, on the off-chance that there was a piece of bogus heap getting used, but I still get the same failure.)

Added:

Even this sequence fails:

NSURLConnection* dummy = [[NSURLConnection alloc] init];
NSLog(@"%s -- dummy NSURLConnection description is %@", __PRETTY_FUNCTION__, [dummy description]);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T00:54:36+00:00Added an answer on May 25, 2026 at 12:54 am

    If there is a crash, there is a backtrace. Post it.

    Odd crash, though.

    [super description] is pretty close to nonsense. The description method is not intended to ever be used in a production environment; is a development-only method.

    Did you override description in your subclass, perchance?

    Also allocating and not initing another doesn’t really do anything. It may not even allocate anything. Most class clusters and many other classes (as implementation details) will return a singleton on alloc and it isn’t until the initialization that a particular subclass is instantiated.


    Oh — NSURLConnection doesn’t use init as the designated initializer. It needs a request. More likely than not, by calling init, you aren’t actually initializing the class and it crashes rather spectacularly as a result of undefined internal state.

    Use initWithRequest:....

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic class that derived subclasses inherit from, it carries the basic
I have a class that is derived from ostream: class my_ostream: public std::ostream {
I have a class that has been derived from NSObject. How can copy be
I have a virtual class that has been derived from a non virtual class.
I have a base class and several subclasses derived from that base class. I
I have a base class that inherits List<> which has multiple classes derived from
I have a class Derived<T> that is derived from Base<T> . Which of the
I have a custom class that is derived from userControl, it describes what features
Assume I have a class A and a class B that is derived from
I have a basic sound manager class that's derived from an online example: http://www.xnawiki.com/index.php?title=Basic_Sound_Manager_For_XNA_GS_3.0

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.