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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T03:53:09+00:00 2026-06-14T03:53:09+00:00

if (! self.mainPage) { self.mainPage= [[MainGameDisplay alloc] initWithNibName:nil bundle:nil]; } [self presentViewController: self.mainPage animated:YES

  • 0
  if (! self.mainPage)
{ self.mainPage= [[MainGameDisplay alloc] initWithNibName:nil bundle:nil]; }
[self presentViewController: self.mainPage animated:YES completion:NULL];

[self.view addSubview:self.mainPage.view];
self.mainPage.view.frame = CGRectMake(568, 0, 568, 320);//(N = horizontal, N = vertical)
[UIView animateWithDuration:1.0f
                 animations:^{
                     //actual frame needed with an animation.
                     self.mainPage.view.frame = CGRectMake(0, 0, 568, 320);
                 }
                 completion:^(BOOL finished) {
                     //ENTER HERE ANYTHING TO RUN AFTER ANIMATION IS COMPLETED:
                     [self presentViewController: self.mainPage animated:NO completion:NULL];
                     //This will make the next page load correctly after the transition, otherwise you cannot. interact with anything.
                 }];

@property (strong) MainGameDisplay *mainPage;

is declared in the .h file.
This code works perfectly but only once, If I was to transition to the mainPage view, come back and transition there again, it would crash at the end of the transition. I’ve played around so much to fix this but it just doesn’t work.

=================
Stack Trace for MainGameDisplay viewDidLoad:

//First transition, A-Okay.
2012-11-11 12:27:07.547 Test_Game [584:c07] (
    0   Test_Game                              0x00002dab -[MainGameDisplay viewDidLoad] + 91
    1   UIKit                               0x000f8817 -[UIViewController loadViewIfRequired] + 536
    2   UIKit                               0x000f8882 -[UIViewController view] + 33
    3   Test_Game                              0x0000240e -[ViewController StartGame:] + 334
    4   libobjc.A.dylib                     0x010e3705 -[NSObject performSelector:withObject:withObject:] + 77
    5   UIKit                               0x0001a920 -[UIApplication sendAction:to:from:forEvent:] + 96
    6   UIKit                               0x0001a8b8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
    7   UIKit                               0x000db671 -[UIControl sendAction:to:forEvent:] + 66
    8   UIKit                               0x000dbbcf -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
    9   UIKit                               0x000dad38 -[UIControl touchesEnded:withEvent:] + 546
    10  UIKit                               0x0004a33f -[UIWindow _sendTouchesForEvent:] + 846
    11  UIKit                               0x0004a552 -[UIWindow sendEvent:] + 273
    12  UIKit                               0x000283aa -[UIApplication sendEvent:] + 436
    13  UIKit                               0x00019cf8 _UIApplicationHandleEvent + 9874
    14  GraphicsServices                    0x01beddf9 _PurpleEventCallback + 339
    15  GraphicsServices                    0x01bedad0 PurpleEventCallback + 46
    16  CoreFoundation                      0x01c07bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
    17  CoreFoundation                      0x01c07962 __CFRunLoopDoSource1 + 146
    18  CoreFoundation                      0x01c38bb6 __CFRunLoopRun + 2118
    19  CoreFoundation                      0x01c37f44 CFRunLoopRunSpecific + 276
    20  CoreFoundation                      0x01c37e1b CFRunLoopRunInMode + 123
    21  GraphicsServices                    0x01bec7e3 GSEventRunModal + 88
    22  GraphicsServices                    0x01bec668 GSEventRun + 104
    23  UIKit                               0x0001765c UIApplicationMain + 1211
    24  Test_Game                              0x00001cfd main + 141
    25  Test_Game                              0x00001c25 start + 53
)



//Second transition, crashes now.
2012-11-11 12:27:11.223 Test_Game [584:c07] (
    0   Test_Game                            0x00002dab -[MainGameDisplay viewDidLoad] + 91
    1   UIKit                               0x000f8817 -[UIViewController loadViewIfRequired] + 536
    2   UIKit                               0x000f8882 -[UIViewController view] + 33
    3   Test_Game                              0x0000240e -[ViewController StartGame:] + 334
    4   libobjc.A.dylib                     0x010e3705 -[NSObject performSelector:withObject:withObject:] + 77
    5   UIKit                               0x0001a920 -[UIApplication sendAction:to:from:forEvent:] + 96
    6   UIKit                               0x0001a8b8 -[UIApplication sendAction:toTarget:fromSender:forEvent:] + 61
    7   UIKit                               0x000db671 -[UIControl sendAction:to:forEvent:] + 66
    8   UIKit                               0x000dbbcf -[UIControl(Internal) _sendActionsForEvents:withEvent:] + 578
    9   UIKit                               0x000dad38 -[UIControl touchesEnded:withEvent:] + 546
    10  UIKit                               0x0004a33f -[UIWindow _sendTouchesForEvent:] + 846
    11  UIKit                               0x0004a552 -[UIWindow sendEvent:] + 273
    12  UIKit                               0x000283aa -[UIApplication sendEvent:] + 436
    13  UIKit                               0x00019cf8 _UIApplicationHandleEvent + 9874
    14  GraphicsServices                    0x01beddf9 _PurpleEventCallback + 339
    15  GraphicsServices                    0x01bedad0 PurpleEventCallback + 46
    16  CoreFoundation                      0x01c07bf5 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE1_PERFORM_FUNCTION__ + 53
    17  CoreFoundation                      0x01c07962 __CFRunLoopDoSource1 + 146
    18  CoreFoundation                      0x01c38bb6 __CFRunLoopRun + 2118
    19  CoreFoundation                      0x01c37f44 CFRunLoopRunSpecific + 276
    20  CoreFoundation                      0x01c37e1b CFRunLoopRunInMode + 123
    21  GraphicsServices                    0x01bec7e3 GSEventRunModal + 88
    22  GraphicsServices                    0x01bec668 GSEventRun + 104
    23  UIKit                               0x0001765c UIApplicationMain + 1211
    24  Test_Game                              0x00001cfd main + 141
    25  Test_Game                              0x00001c25 start + 53
)
  • 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-14T03:53:11+00:00Added an answer on June 14, 2026 at 3:53 am

    maybe you release you property in viewDidDisapear or something like this ?
    what type of crash – BAD_ACCESS ?

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

Sidebar

Related Questions

self.scrollView.frame=CGRectMake(CGRectGetMinX(self.bounds),CGRectGetMaxY(self.bounds),CGRectGetWidth(self.bounds),CGRectGetHeight(self.bounds)); [self.scrollView addSubview:self.hourView]; [self.scrollView addSubview:self.gridView]; Now after embedding some views in the gridview, I
I have this class: class View(object): def main_page(self, extra_placeholders = None): file = '/media/Shared/sites/www/subdomains/pypular/static/layout.tmpl'
[[self mainFrame] loadHTMLString:@<html><body><link href='main.css' rel='stylesheet' type='text/css' /></body></html> baseURL:nil]; I am trying to load a
self.myArray = [NSArray arrayWithObjects: [NSArray arrayWithObjects: [self generateMySecretObject], [self generateMySecretObject],nil], [NSArray arrayWithObjects: [self generateMySecretObject],
class MainPage(webapp.RequestHandler): def get(self): user = users.get_current_user() tasks_query = Task.all() tasks = tasks_query.fetch(1000) if
I have the following python code. class MainPage(BaseHandler): def post(self, location_id): reservations = self.request.get_all('reservations')
[[self enclosingScrollView] setHorizontalLineScroll:0]; the above api doesnt works. Help Appreciated...
self.mood_scale = { '-30':Panic, '-20':'Fear', '-10':'Concern', '0':'Normal', '10':'Satisfaction', '20':'Happiness', '30':'Euphoria'} I need to set
self.boxesOnLift = [NSMutableArray array]; [self init]; [[CCSpriteFrameCache sharedSpriteFrameCache] addSpriteFramesWithFile:@Animation.plist]; NSMutableArray *walkAnimFrames = [NSMutableArray array];
def self.jq_column_models COLUMN_NAME.collect {|x| {:name => x.to_s, :width => 80, :format => 'integer' if

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.