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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:50:49+00:00 2026-05-22T11:50:49+00:00

I am developing an iphone app in which I am extracting RSS feeds and

  • 0

I am developing an iphone app in which I am extracting RSS feeds and then parsing them.My code is as bellow:

 - (void)viewDidAppear:(BOOL)animated
{
    [super viewDidAppear:animated];
    NSLog(@"in view did appear");

    if ([stories count] == 0) {
        NSString * path = @"http://www.shire.com/shireplc/rss.jsp";

        //[self parseXMLFileAtURL:path];
        //[self performSelectorInBackground:@selector(parseXMLFileAtURL:) withObject:path];
        NSLog(@"internet is %d",[self checkInternet]);
        if([self checkInternet]==1)
        [NSThread detachNewThreadSelector:@selector(parseXMLFileAtURL:) 
                              toTarget:self withObject:path];

}
}

 - (void)parseXMLFileAtURL:(NSString *)URL
  { 
  NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init];
  stories = [[NSMutableArray alloc] init];

  //you must then convert the path to a proper NSURL or it won't work
  NSURL *xmlURL = [NSURL URLWithString:URL];

  // here, for some reason you have to use NSClassFromString when trying to alloc NSXMLParser, otherwise you will get an object not found error
  // this may be necessary only for the toolchain
  rssParser = [[NSXMLParser alloc] initWithContentsOfURL:xmlURL];

  // Set self as the delegate of the parser so that it will receive the parser delegate methods callbacks.
[rssParser setDelegate:self];

// Depending on the XML document you're parsing, you may want to enable these features of NSXMLParser.
[rssParser setShouldProcessNamespaces:NO];
[rssParser setShouldReportNamespacePrefixes:NO];
[rssParser setShouldResolveExternalEntities:NO];

[rssParser parse];

 [pool release];

}

Can anyone tell me where I am going wrong?
My log is as bellow:
log: [Switching to thread 12803]
[Switching to thread 12035]
2011-05-10 11:31:30.932 Annual Report[454:490b] found file and started parsing
[Switching to thread 14339]
2011-05-10 11:32:04.742 Annual Report[454:640b] found file and started parsing
[Switching to thread 13827]
[Switching to thread 13827]
Program received signal: “EXC_BAD_ACCESS”.

gdb stack trace at 'putpkt: write failed':
0   gdb-arm-apple-darwin                0x0019026b remote_backtrace_self + 54
  • 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-22T11:50:50+00:00Added an answer on May 22, 2026 at 11:50 am

    Finally,I used a flag to check if the view is appeared or not(by making flag true in viewdidAppear) and if the view is not appearing,don’t run the thread function.That solved the problem!!!

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

Sidebar

Related Questions

I am developing an iPhone app which is a Navigation based app. In this
I am developing an iPhone app which is related to books. I have 5
I m developing an iPhone app which includes facebook wall posting.After log in, I
i'm developing an iPhone app which embed a mapView made with mkmapkit. I got
Hello good morning everyone, I am developing an iphone app which provide push notification
I am developing an iphone app, which records user voice and change it into
I am developing an iPhone app where I don’t want/need the multitasking capability and
Hey i am developing an iPhone app of a existing PhP mySQL website. i
I am developing an iPhone app, and I am the following problem. I have
WHats the easy way to accomplish this ..?? I am developing an iphone app

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.