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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T13:34:55+00:00 2026-05-31T13:34:55+00:00

My iPhone game crashed whilst on the device and I am attempting to understand

  • 0

My iPhone game crashed whilst on the device and I am attempting to understand what happened.

Every time a user exits the game screen it will send a message to the HomePageController (my top level controller) telling it to save the user data. This works fine all the time except for in this particular instance. The exception thrown seems to state that HomePageController did not recognize the saveUserData selector but I can’t see how that can happen as that function is definitely in that controller and it works the rest of the time.

Can anyone offer any advice?

Exception Type:  EXC_CRASH (SIGABRT)
Exception Codes: 0x00000000, 0x00000000
Crashed Thread:  0

Last Exception Backtrace:
0 CoreFoundation      0x3756a88f __exceptionPreprocess + 163
1 libobjc.A.dylib     0x35a70259 objc_exception_throw + 33
2 CoreFoundation      0x3756da9b -[NSObject doesNotRecognizeSelector:] + 175
3 CoreFoundation      0x3756c915 ___forwarding___ + 301
4 CoreFoundation      0x374c7650 _CF_forwarding_prep_0 + 48
5 P------k            0x0000ebe1 -[HomePageController saveUserData] (HomePageController.m:125)
6 P------k            0x00008a0b -[RootViewController viewDidAppear:] (RootViewController.m:102)

Line 125 in HomePageController.m:

- (void)saveUserData{
    NSString *documentsPath = [NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,
                                                                   NSUserDomainMask, YES) objectAtIndex:0];
    //10x10
    {
        NSMutableDictionary *dict = [[[NSMutableDictionary alloc] init] autorelease];
        for (int i = 0; i < _puzzles10x10.count; i++){
            LevelData *currentPuzzle = [_puzzles10x10 objectAtIndex:i];
            /*(line 125)*/ [dict setObject:[currentPuzzle getPuzzleUserData] forKey:currentPuzzle.title];
        }

        [dict writeToFile:[documentsPath stringByAppendingPathComponent:@"userdata.dat"] atomically:YES];
    }
    // more here
}
  • 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-31T13:34:56+00:00Added an answer on May 31, 2026 at 1:34 pm

    If currentPuzzle doesn’t recognize the selector getPuzzleUserData then the problem is one of these two:

    1. LevelData does not define a method getPuzzleUserData.
    2. currentPuzzle is not an instance of LevelData

    So check if the method is actually defined in the class LevelData and not in HomePageController and that when you add items to _puzzles10x10 they are actually instances of LevelData.

    To debug further, split your code into as many lines as possible (one instruction per line), add a lot of NSLog calls and see what happens:

    NSLog(@"_puzzles10x10: %@", _puzzles10x10);
    for (int i = 0; i < _puzzles10x10.count; i++){
        LevelData *currentPuzzle = [_puzzles10x10 objectAtIndex:i];
        NSLog(@"currentPuzzle#%d: %@", i, currentPuzzle);
        UserData *userData = [currentPuzzle getPuzzleUserData]; // change UserData to the correct t class
        NSLog(@"userData#%d: %@", i, userData);
        NSString *key = currentPuzzle.title;
        NSLog(@"key#%d: %@", i, key);
        [dict setObject:userData forKey:key];
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm building an iPhone game and I have a UIBarButtonItem that will provide the
For my iphone game program, I need to take what the user draws and
I am working on an iPhone game, which will have many types of creeps,
I'm creating an iPhone Game where I want the user to get a unique
I am working on iPhone game application, in which user can play game and
I am making an iPhone game that will be using Game Center to support
I am developing an iPhone game, and I will implement Game Center in it.
I am making an iPhone game where I have the user selecting what color
I am making an iPhone game. I have all the required app sizes except
I'm writing an iPhone game in objective-C using XCode. I'd like to profile 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.