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

  • Home
  • SEARCH
  • 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 6072269
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T10:08:29+00:00 2026-05-23T10:08:29+00:00

#import DealList.h #import MyGroupOnDetailedViewController.h #import Deal.h #import DDXML.h @implementation DealList – (void)viewDidLoad { [super

  • 0
#import "DealList.h"
#import "MyGroupOnDetailedViewController.h"
#import "Deal.h"
#import "DDXML.h"
@implementation DealList


- (void)viewDidLoad {
    [super viewDidLoad];
    NSString *xmlString = [NSString stringWithContentsOfURL:url encoding:NSUTF8StringEncoding error:nil];
    xmlString = [self textToHtml:xmlString];    
    NSError *error = nil;
    DDXMLDocument *ddDoc = [[DDXMLDocument alloc] initWithXMLString:xmlString options:0 error:&error];
    NSLog(@"Error:%@",error);
    DDXMLElement *FeaturedDeal = [ddDoc rootElement];
    Deals = [[NSMutableArray alloc]init];
    for (DDXMLElement *n in [FeaturedDeal children]) {
        Deal *deal = [[Deal alloc]init];
        deal.DealID = [[[n elementsForName:@"DealId"]objectAtIndex:0] stringValue];
        deal.Available = [[[n elementsForName:@"Available"]objectAtIndex:0] stringValue];
        NSLog(@"%@",deal.Available);
    }
}

- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
    return 1;
}

- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
    return [Deals count];
}

- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
    return 120.0;
}

- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {

    static NSString *CellIdentifier = @"Cell";

    UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
    if (cell == nil) {
        cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleSubtitle reuseIdentifier:CellIdentifier] autorelease];

    }

    //this works
    NSLog(@"%@",[[Deals objectAtIndex:indexPath.row] Available]);
}


- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
    MyGroupOnDetailedViewController *myGroupOnDetailedViewController = [[MyGroupOnDetailedViewController alloc] initWithNibName:@"MyGroupOnDetailedViewController" bundle:nil];
    myGroupOnDetailedViewController.DealID = [[Deals objectAtIndex:indexPath.row] DealID];
//EXC_BAD_ACCESS:
myGroupOnDetailedViewController.available = [[Deals objectAtIndex:indexPath.row] Available];
}
@end

myGroupOnDetailedViewController.available = [[Deals objectAtIndex:indexPath.row] Available];
This line is getting bad access
But while writing the same code in cellForRowAtIndexPath printing the value of Available, DealID can be accessed everywhere.

This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all
Attaching to process 1652.
Pending breakpoint 1 - ""Settings.m":50" resolved
Pending breakpoint 2 - ""MyGroupOnDetailedViewController.m":103" resolved
Pending breakpoint 3 - ""DealList.m":184" resolved
Pending breakpoint 4 - ""DealList.m":166" resolved
Pending breakpoint 5 - ""MyGroupOnDetailedViewController.m":75" resolved
Pending breakpoint 6 - ""DealList.m":50" resolved
2011-06-28 14:21:18.139 Feature_list[1652:207] (null)
2011-06-28 14:21:18.151 Feature_list[1652:207] <FeaturedDeal><DealId>167</DealId><Text>$10 for $100 worth Indian fare</Text><ImageUrl>2011/06/large_167.jpg</ImageUrl><Hilights>999999999,88888888,8888888888,8888888888888888,788888,6666666666,555555555</Hilights><Fineprint>77777777777,666666666,555555555,444444444,333333333,2222222222,1111111111</Fineprint><Company>Taiba Foods</Company><ExpiryDate>2011-06-24 22:22:54</ExpiryDate><Value>100</Value><Discount>90</Discount><BuyerCount>1</BuyerCount></FeaturedDeal>
2011-06-28 14:21:18.152 Feature_list[1652:207] Deal ID is: (null)
(gdb) continue
Current language:  auto; currently objective-c
2011-06-28 14:21:23.694 Feature_list[1652:207] Error:(null)
2011-06-28 14:21:23.697 Feature_list[1652:207] 1
2011-06-28 14:21:23.697 Feature_list[1652:207] (null)
2011-06-28 14:21:23.698 Feature_list[1652:207] 1
2011-06-28 14:21:23.699 Feature_list[1652:207] (null)
2011-06-28 14:21:23.701 Feature_list[1652:207] deal 3
2011-06-28 14:21:23.703 Feature_list[1652:207] Expiry Date:2011-06-01 08:02:51 +0000
2011-06-28 14:21:23.704 Feature_list[1652:207] test
(gdb) continue
2011-06-28 14:21:24.117 Feature_list[1652:207] 1
2011-06-28 14:21:24.119 Feature_list[1652:207] $10 for $100 worth Indian fare
2011-06-28 14:21:24.120 Feature_list[1652:207] Expiry Date:2011-06-30 16:52:54 +0000
2011-06-28 14:21:24.121 Feature_list[1652:207] test
(gdb) continue
2011-06-28 14:21:25.333 Feature_list[1652:207] 1
2011-06-28 14:21:27.711 Feature_list[1652:207] <Deal: 0x4e86b40>
(gdb) continue
Program received signal:  “EXC_BAD_ACCESS”.
(gdb) 
  • 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-23T10:08:29+00:00Added an answer on May 23, 2026 at 10:08 am

    Add NSZombieEnabled in your XCode project..

    You can find out the error..

    http://www.cocoadev.com/index.pl?NSZombieEnabled

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

Sidebar

Related Questions

import java.lang.Math; public class NewtonIteration { public static void main(String[] args) { System.out.print(rootNofX(2,9)); }
import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.Date; public class DateDemo { public static void main(String[]
import java.io.*; import java.util.Scanner; import java.util.StringTokenizer; public class Filereader { public static void main(String[]
import java.util.*; public class Test { public static void main(String[] args) { List db
import java.util.ArrayList; import java.util.Random; public class Generator{ //9352141NTBG1223 public static void main(String[] args) {
import java.io.*; public class ThreadSanbox { public static void main(String[] args) { Thread t1
import java.util.HashMap; import java.util.Map; public class Main { public static void main(String[] args) {
#import Mutation.h //my class @implementation NTAppDelegate using app delegate as controller @synthesize window =
import urllib import urllib2 from urllib2 import Request url = 'https://www.google.com' response = urllib2.urlopen(url)
import java.io.*; public class Demo{ public static void main(String[] args){ File f = new

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.