• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Crash after an NSNotification is posted
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Crash after an NSNotification is posted


  • Subject: Crash after an NSNotification is posted
  • From: Peter Browne <email@hidden>
  • Date: Sun, 28 Nov 2004 12:09:52 +0000

I have an application that on startup runs through a mock 'loading' animation. When the animation finishes, an NSNotification is posted alerting those classes that need to know. Equally, when the user chooses 'Quit' an animation sequence runs through before the application actually terminates. If the user chooses quit BEFORE the loading animation has finished (and therefore before the notification has been posted), then everything works fine.. the loading animation stops, and the shutdown animation begins. But if the user chooses 'quit' AFTER the loading animation has finished and the notification been posted, the program suddenly quits with signal 10 (SIGBUS). I can only assume the problem is with the notification posting, as the shutdown animation worked fine before i added the code for the notifications. The problem seems to lie in this method (the custom 'Quit' action). The first NSLog is displayed, but the program chokes before it gets to the next lot of NSLogs. Any ideas?

- (id)sender
{
[IDcenter release];
NSLog(@"Released notification center thing");


shutdownSequenceTimer = [[NSTimer scheduledTimerWithTimeInterval:0.5

target:self

selector:@selector(shutdownTimerFired:) // Runs the shutdown animation until all buttons are disabled, then terminates app

userInfo:nil repeats:YES]
retain];
if ([loadingSequenceTimer isValid]) { // Checks to see if quit was called before the start up text animationhad finished
[loadingSequenceTimer invalidate];
[loadingSequenceTimer release];
}


i = 1;


[MFDtabView selectTabViewItemWithIdentifier:@"5"]; // Changes the view to the shutdown screen


[synth startSpeakingString:@"Fam Cats control system shutting down."];


NSLog(@"\n");

NSLog(@"!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
NSLog(@"Beginning shutdown sequence.");

NSLog(@"!!!!!!!!!!!!!!!!!!!!!!!!!!!!");
NSLog(@"\n");
[quitMenuItem setAction:nil]; // Prevent the user from choosing 'quit' again

}


Thanks in advance, Peter
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: Crash after an NSNotification is posted
      • From: j o a r <email@hidden>
  • Prev by Date: Re: Nib files and outlets
  • Next by Date: Re: Crash after an NSNotification is posted
  • Previous by thread: Re: How do I get around this?
  • Next by thread: Re: Crash after an NSNotification is posted
  • Index(es):
    • Date
    • Thread