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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T18:51:37+00:00 2026-05-25T18:51:37+00:00

This is probably some simple mistake, I just can’t seem to find it in

  • 0

This is probably some simple mistake, I just can’t seem to find it in my code.

When ever I click a cell in my tableview I get an exception

This is my interface:

@interface MenuViewController : UIViewController <UITableViewDataSource, UITableViewDelegate>

@end

I don’t use XIB files so this is my loadView

- (void)loadView
{
    UIView *myview = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
    self.title = @"Menu";
    UITableView *tableViewMenuItems = [[UITableView alloc] initWithFrame:CGRectMake(10, 10, 300, 150) style:UITableViewStyleGrouped];
    tableViewMenuItems.backgroundColor = [UIColor clearColor];
    tableViewMenuItems.delegate = self;
    tableViewMenuItems.dataSource = self;
    tableViewMenuItems.scrollEnabled = NO;
    [myview addSubview:tableViewMenuItems];
    [tableViewMenuItems release];
    self.view = myview;
    [myview release];
}

And this is the delegate method for selecting a row

-(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
{
    SendMessageViewController *sendMessageViewController = [[SendMessageViewController alloc] init];
    [self.navigationController pushViewController:sendMessageViewController animated:YES];
    [sendMessageViewController release];
}

And my bt

#0  0x94e3c9c6 in __pthread_kill ()
#1  0x98079f78 in pthread_kill ()
#2  0x9806abdd in abort ()
#3  0x9588a921 in abort_message ()
#4  0x958881bc in default_terminate ()
#5  0x010ee23b in _objc_terminate ()
#6  0x958881fe in safe_handler_caller ()
#7  0x95888268 in std::terminate ()
#8  0x958892a0 in __cxa_throw ()
#9  0x010ee416 in objc_exception_throw ()
#10 0x00f9c0bb in -[NSObject(NSObject) doesNotRecognizeSelector:] ()
#11 0x00f0b966 in ___forwarding___ ()
#12 0x00f0b522 in __forwarding_prep_0___ ()
#13 0x0008c870 in -[UITableView _selectRowAtIndexPath:animated:scrollPosition:notifyDelegate:] ()
#14 0x00082b05 in -[UITableView _userSelectRowAtPendingSelectionIndexPath:] ()
#15 0x0079c79e in __NSFireDelayedPerform ()
#16 0x00f7b8c3 in __CFRUNLOOP_IS_CALLING_OUT_TO_A_TIMER_CALLBACK_FUNCTION__ ()
#17 0x00f7ce74 in __CFRunLoopDoTimer ()
#18 0x00ed92c9 in __CFRunLoopRun ()
#19 0x00ed8840 in CFRunLoopRunSpecific ()
#20 0x00ed8761 in CFRunLoopRunInMode ()
#21 0x011d21c4 in GSEventRunModal ()
#22 0x011d2289 in GSEventRun ()
#23 0x00023c93 in UIApplicationMain ()
#24 0x00002589 in main (argc=1, argv=0xbffff698) at main.m:14

What am I doing wrong?

  • 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-25T18:51:38+00:00Added an answer on May 25, 2026 at 6:51 pm

    Ok found my problem:

    In my delegate is was doing this

    MenuViewController *menuViewController = [[[MenuViewController alloc] init] autorelease];
    UINavigationController *navController = [[[UINavigationController alloc] initWithRootViewController:menuViewController] autorelease];
    

    So in the end I was calling methods on objects that where released. So I removed the autorelease and the problem was solved. Thanks for all that responded

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

Sidebar

Related Questions

Probably some simple derp but I just can't figure this out, I'm using almost
Where can I find some simple sample code for public key encryption and decryption
I'm having some issues with my code. This is probably due to some design
ANSWER: Allright, that was quite simple (probably I made this mistake coz I need
I am wondering if someone could help me with some probably rather simple code,
This is probably something simple but it's driving me nuts. I'm making some pagination
This is probably simple but I do not seem to get it to work.
I'm using .Net 2.0 and this is driving me crazy but there's probably some
This probably has a simple answer, but I must not have had enough coffee
I know this probably really simple but Im not sure what im doing wrong...

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.