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 4120160
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T23:11:06+00:00 2026-05-20T23:11:06+00:00

I don’t really know if what I’m doing is the right way to do

  • 0

I don’t really know if what I’m doing is the right way to do it. Right now it seems to be working until it hits a certain point with a EXC_BAD_ACCESS message.

I’ll describe what I’m doing as best and with the most relevant details I can tell:
I have a CalendarViewController that inherits UIViewController which is loading from a .xib file (CalendarViewController.xib). The class contains a UIView called contentView which I created and which I initialize with another nib file based on a class which is also inherited from UIViewController:

- (void)viewDidLoad {

      [super viewDidLoad];

      calendarView = [[CalendarView alloc] initWithNibName:@"CalendarView" bundle:nil];

      [contentView addSubview:calendarView.view]; 

   }

(calendarView is the class inheriting UIViewController and viewDidLoad is from CalendarViewController.

CalendarView.xib has a UITableViewController with it’s respective UITableView. This Table View Controller is linked to a CalendarTableController to which I also generated a .xib file for it.

Everything is being created just right (apparently) but it is crashing somewhere very unexpected. CalendarTableController also implements a DateLoaderDelegate which loads information from an xml on an external url.

- (void)connectionDidFinishLoading:(NSURLConnection *)connection {

   // When the data has all finished loading, we set a copy of the  
  // loaded data for us to access. This will allow us to not worry about
 //  whether a load is already in progress when accessing the data. 

    self.lastLoadedMatchXMLData = [self.matchXMLData copy]; 

 // Make sure the _delegate object actually has the xmlDidFinishLoading     
 // method, and if it does, call it to notify the delegate that the     
 // data has finished loading.  

 if ([_delegate respondsToSelector:@selector(xmlDidFinishLoading)])
 {      
     [_delegate xmlDidFinishLoading];
 } 

}

The application is getting to this point without any problem. _delegate is containing the correct object (a CalendarTableController which implements the DateLoaderDelegate). But when it arrives to the line:

  if ([_delegate respondsToSelector:@selector(xmlDidFinishLoading)])

it crashes with the EXC_BAD_ACCESS, I don’t really know the reason, if I look at the debugger, the crash is not occurring in any of my classes as any of them are appearing in the execution stack. URLConnectionClient seems to be generating it, but I don’t really know why. The loading of the xml had worked earlier before I rearranged the ViewControllers to work as I have described now.

Any ideas?

  • 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-20T23:11:07+00:00Added an answer on May 20, 2026 at 11:11 pm

    Check that you have defined properties for all of your subviews and that you are retaining everything that you need to be. Bad Access May mean that you’re attempting to call respondsToSelector on an object that has been released.

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

Sidebar

Related Questions

Don't really know how to formulate the title, but it should be pretty obvious
Don't know how to google for such, but is there a way to query
I don't really know too much about core JavaScript, just a dot of jQuery.
Don't know if I worded the question right, but basically what I want to
Don't know if this has been asked before, so point me to another question
Don't know if this is the right place to ask this, but I will
Don't know why, but sometimes LocationManager is still working also after closing application. I
Don't know if it's I'm doing it wrong or if there's a bug (I
Don't need to do this right now but thinking about the future... What would
Don't know if there is a better way to do this, so that is

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.