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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T15:22:03+00:00 2026-06-09T15:22:03+00:00

In my view I have a button, which is hooked to this method: -(IBAction)showStore:(id)sender

  • 0

In my view I have a button, which is hooked to this method:

-(IBAction)showStore:(id)sender
{
    storeSinglePlayer *ssp = [[storeSinglePlayer alloc] init];
    ssp.imageH = self.imageURLH;
    ssp.imageV = self.imageURLV;
    CATransition* transition = [CATransition animation];
    transition.duration = 0.5;
    transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    transition.type = kCATransitionPush; 
    transition.subtype = kCATransitionFromTop;
    [self.navigationController.view.layer addAnimation:transition forKey:nil];
    [self.navigationController pushViewController:ssp animated:NO];
 }

When I click this button, it shows me the ‘store single player’ view controller. Also the ‘store single player’ view controller has a back button which is hooked to the following method:

-(IBAction)didPressBack:(id)sender
{
    CATransition* transition = [CATransition animation];
    transition.duration = 0.5;
    transition.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionEaseInEaseOut];
    transition.type = kCATransitionPush; 
    transition.subtype = kCATransitionFromBottom;
    [self.navigationController.view.layer addAnimation:transition forKey:nil];
    [self.navigationController popViewControllerAnimated:NO];

}

Clicking the back button also does get me back to my previous view.

But now here is the weird problem. If I repeat this 10 times, i.e. Click the button to show ‘storeSinglePlayer’ and then click the back button on ‘storeSinglePlayer’, I get the error:

[storeSinglePlayer respondsToSelector:]: message sent to deallocated instance 0xe5f6160

And, this not just only on my multiple tries, it just randomly crashes. It would work some time and some times it won’t.

I have ARC enabled.

Can’t get what’s wrong with just this simple code. Read a lot of questions on stack overflow, but none solve my problem.

EDIT: Stack Trace

2012-08-11 11:55:56.353 Magic Buzz[2088:707] (
    0   Magic Buzz                          0x000c7e19 -[gameOverScreen showStore:] + 700
    1   CoreFoundation                      0x3769c3fd -[NSObject performSelector:withObject:withObject:] + 52
    2   UIKit                               0x30891e07 -[UIApplication sendAction:to:from:forEvent:] + 62
    3   UIKit                               0x30891dc3 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 30
    4   UIKit                               0x30891da1 -[UIControl sendAction:to:forEvent:] + 44
    5   UIKit                               0x30891b11 -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 492
    6   UIKit                               0x30892449 -[UIControl touchesEnded:withEvent:] + 476
    7   UIKit                               0x3089092b -[UIWindow _sendTouchesForEvent:] + 318
    8   UIKit                               0x30890319 -[UIWindow sendEvent:] + 380
    9   UIKit                               0x30876695 -[UIApplication sendEvent:] + 356
    10  UIKit                               0x30875f3b _UIApplicationHandleEvent + 5826
    11  GraphicsServices                    0x3789222b PurpleEventCallback + 882
    12  CoreFoundation                      0x37716523 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 38
    13  CoreFoundation                      0x377164c5 __CFRunLoopDoSource1 + 140
    14  CoreFoundation                      0x37715313 __CFRunLoopRun + 1370
    15  CoreFoundation                      0x376984a5 CFRunLoopRunSpecific + 300
    16  CoreFoundation                      0x3769836d CFRunLoopRunInMode + 104
    17  GraphicsServices                    0x37891439 GSEventRunModal + 136
    18  UIKit                               0x308a4cd5 UIApplicationMain + 1080
    19  Magic Buzz                          0x000b094d main + 96
    20  Magic Buzz                          0x000b08e8 start + 40
)
2012-08-11 11:55:56.554 Magic Buzz[2088:707] *** -[storeSinglePlayer respondsToSelector:]: message sent to deallocated instance 0xf6cde30
  • 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-06-09T15:22:05+00:00Added an answer on June 9, 2026 at 3:22 pm

    some asynchronous method is calling storeSinglePlayer object after it deallocated, Try removing all the delegates to nil in ViewDidUnload/ViewWillDisappear. If you sending the some query to server and without waiting for it you press the Back button then also it will crash as after completing the request it will call storeSinglePlayer object. Hope this helps

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

Sidebar

Related Questions

I have a view with which I have a button calling the following method.
In a view controller i have a button which internally calls an IBAction and
i have view controller which contains a button which show the image library ,if
I have a button in a view which refuses to work. I've got in
I have a list view item which has a button and displays properties on
I have a grid view which contains a button in a template field. I
I have created a view in which there is a capture button. When i
When I have a button which only changes something in my view (e.g. such
I have a view with a button which downloads files when clicked. Question I
I have this button which i have added a custom icon to. I 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.