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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T03:16:21+00:00 2026-05-23T03:16:21+00:00

Any help figuring this out would be appreciated. I have 3 NSMutableArrays in a

  • 0

Any help figuring this out would be appreciated. I have 3 NSMutableArrays in a singleton (Game Manager) and only one of them will work when I go to access the data I try to store, even though I use them all the same.

Here is where I initialize them in my GameManager.h

- (GameManager *)init
{
    if ((self = [super init]))
    {
        gameTexts = [[NSMutableArray alloc] init];
        gameDrawings = [[NSMutableArray alloc] init];
        playerNames = [[NSMutableArray alloc] init];
    }
    return self;
}

Here is where I go to store values in them. This seems to be where the problem is from NSLogs I put in.

[[GameManager sharedManager].playerNames addObject:[NSString stringWithFormat:@"%@",nextPlayerName.text]];
[[GameManager sharedManager].gameTexts addObject:[NSString stringWithFormat:@"%@",inputText.text]];
[[GameManager sharedManager].gameDrawings addObject:([[GameManager sharedManager] previousDrawing])];

Here is where I try to retrieve the data.

names.text = [[GameManager sharedManager].playerNames objectAtIndex:(nameIndex)];
texts.text = [[GameManager sharedManager].gameTexts objectAtIndex:(textIndex)];
drawings.image = [[GameManager sharedManager].gameDrawings objectAtIndex:(drawingIndex)];

Only the playerNames array will work correctly. The other two give me bad access errors when I try to use the NSLog to see what is in them.
Any ideas are welcome, as I have been stuck on this a while. 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-23T03:16:22+00:00Added an answer on May 23, 2026 at 3:16 am

    It sounds like gameTexts and gameDrawings are getting over-released somewhere. That is almost always the cause of EXC_BAD_ACCESS.

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

Sidebar

Related Questions

Any help figuring out how to do this would be great: How much time
Any help would be appreciated on this one. I'm trying to implement a dynamic
This question has been bugging me a LOT lately. Any help would be appreciated.
Any help is highly appreciated. Say I have a MySQL database with a timestamp
I'm having problems with the Channel API - any help would be greatly appreciated.
any help you can give is very gratefully accepted. I've been looking at this
Is there an alternative to history.go(-1) for FireFox and Safari. Any Help would be
http://localhost/XYZ/Client/(S(enlodz55ov4ncafza0gpp045))/Info/Rates.aspx Does anyway know what /(S(enlodz55ov4ncafza0gpp045))/ means? Any help appreciated.
Are there any algorithms that can help with hierarchical clustering? Google's map-reduce has only
I really need help with interfaces in general... Any resources that you guys would

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.