• 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 crashes when launched from finder, but not when launched from debugger or command line
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: App crashes when launched from finder, but not when launched from debugger or command line


  • Subject: Re: App crashes when launched from finder, but not when launched from debugger or command line
  • From: Rick Mann <email@hidden>
  • Date: Tue, 18 Nov 2008 02:14:50 -0800


On Nov 17, 2008, at 17:12:03, Jack Repenning wrote:

Try checking your program under MallocDebug (in the "Start with performance tool" menu). It can sometimes happen that a change in the inherited environment changes the behavior of bad alloc/free management in ways that have your symptom.


Well, it just seems to crash under MallocDebug, but I then have nothing to examine. Nothing else is reported before the crash occurs.

I've discovered the problem. I was failing to initialize a member to null, so when that object was requested, it wasn't getting (lazily) constructed. When launching under the debugger, that member was getting set to null, but when launched in the Finder, it was being set to a non-zero value (always 0x7).

So, out of curiosity, how might I have found this missing initialization using one of the tools? Could it have been found? It seems like a malloc that initializes the memory to some invalid and easily-noticed patter would've helped.

Thanks to all for helping me identify this!

--
Rick

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


  • Follow-Ups:
    • Re: App crashes when launched from finder, but not when launched from debugger or command line
      • From: Matt Gough <email@hidden>
    • Re: App crashes when launched from finder, but not when launched from debugger or command line
      • From: Andy Lee <email@hidden>
    • Re: App crashes when launched from finder, but not when launched from debugger or command line
      • From: Steve Checkoway <email@hidden>
References: 
 >Re: App crashes when launched from finder, but not when launched from debugger or command line (From: Greg Guerin <email@hidden>)
 >Re: App crashes when launched from finder, but not when launched from debugger or command line (From: Jack Repenning <email@hidden>)

  • Prev by Date: Re: App crashes when launched from finder, but not when launched from debugger or command line
  • Next by Date: Re: ORGANIZATIONNAME -- __MyCompany__ -- Not in User Defaults?!?
  • Previous by thread: Re: App crashes when launched from finder, but not when launched from debugger or command line
  • Next by thread: Re: App crashes when launched from finder, but not when launched from debugger or command line
  • Index(es):
    • Date
    • Thread