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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T21:55:44+00:00 2026-05-25T21:55:44+00:00

I having a problem with a Bad Exception that I could not locate at

  • 0

I having a problem with a Bad Exception that I could not locate at first, but now have it pinned down on a [super dealloc];, but I have no idea why this happens.

Here is my code :

EditingViewController.h

@interface EditingViewController : UIViewController 
{

    NSManagedObject *editedObject;
    NSString *editedFieldKey;
    NSString *editedFieldName;

}


@property (nonatomic, retain) NSManagedObject *editedObject;
@property (nonatomic, retain) NSString *editedFieldKey;
@property (nonatomic, retain) NSString *editedFieldName;


- (IBAction)cancel;
- (IBAction)save;

@end

EditingViewController.m

#import "EditingViewController.h"

@implementation EditingViewController

@synthesize editedObject, editedFieldKey, editedFieldName;

#pragma mark -
#pragma mark View lifecycle

- (void)viewDidLoad
{

    self.title = NSLocalizedString(editedFieldName, nil);

    // Configure the save and cancel buttons.
    UIBarButtonItem *saveButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemSave target:self action:@selector(save)];
    self.navigationItem.rightBarButtonItem = saveButton;
    [saveButton release];

    UIBarButtonItem *cancelButton = [[UIBarButtonItem alloc] initWithBarButtonSystemItem:UIBarButtonSystemItemCancel target:self action:@selector(cancel)];
    self.navigationItem.leftBarButtonItem = cancelButton;
    [cancelButton release];
}


- (void)viewWillAppear:(BOOL)animated 
{

    [super viewWillAppear:animated];

}

- (IBAction)save 
{
    [self.navigationController popViewControllerAnimated:YES];
}


- (IBAction)cancel
{
    // Don't pass current value to the edited object, just pop.
    [self.navigationController popViewControllerAnimated:YES];
}

- (void)dealloc 
{
    [editedObject release];
    [editedFieldKey release];
    [editedFieldName release];
    //[super dealloc];
}


@end

As you can see, I commented the [super dealloc];, which is causing the Bad Exception, but this is obviously not a good solution.

Any idea what I am doing wrong ?

Thanks

  • 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-25T21:55:45+00:00Added an answer on May 25, 2026 at 9:55 pm

    The properties might have never been used, so they haven’t been initialized in any way

    - (void)dealloc 
    {
        self.editedObject = nil;
        self.editedFieldKey = nil;
        self.editedFieldName = nil;
        [super dealloc];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are having problem with the server migration. We have one application that are
Having problem with the middle Div not expanding to the width http://acs.graphicsmayhem.com/images/middiv.jpg Ok, how
I'm having problem in the following line: rd.PrintOptions.PaperSize = PaperSize.PaperFanfoldStdGerman; it throws an exception
I'm having problem when running my Windows Forms program. In the program, I have
I'm having a problem with good ol' bdeadmin.exe in Vista. First, let's get the
I'm having an interesting but difficult problem with my JavaScript code. Basically, I'm trying
I'm having a problem that's intriguing me. I decided make a few changes (in
I am having a problem passing an NSError object back. The first line of
I'm having problem with global variable in PHP. I have mysqli config file which
I'm having a problem with a CSS. I have a little image with the

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.