• 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
Re: app delegate +initialize
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: app delegate +initialize


  • Subject: Re: app delegate +initialize
  • From: Jens Alfke <email@hidden>
  • Date: Wed, 7 Oct 2009 10:48:25 -0700


On Oct 6, 2009, at 11:30 PM, John Baldwin wrote:

When the application crashes on launch, there is no record of the +initialize method being called. When the application launches successfully, there is a record of the +initialize method being called.

I haven't been following the whole thread, but are you assuming that all classes are initialized immediately when the process launches (similar to C++ static initializers)? Because that isn't the way it works. A class isn't initialized until the first time it's used — by creating an instance, calling a class method, or looking up the class by name.


So it's entirely possible that something unrelated to this class is causing a crash before that class ever gets referenced. Are you able to get a backtrace or crash log?

—Jens_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: app delegate +initialize
      • From: John Baldwin <email@hidden>
References: 
 >Re: app delegate +initialize (From: John Baldwin <email@hidden>)
 >Re: app delegate +initialize (From: John Baldwin <email@hidden>)

  • Prev by Date: Re: [iPhone] Application running for the very first time...
  • Next by Date: Re: Strange Core Data problem after upgrade
  • Previous by thread: Re: app delegate +initialize
  • Next by thread: Re: app delegate +initialize
  • Index(es):
    • Date
    • Thread