• 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: Problem Getting Application to Launch Using Debugger
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problem Getting Application to Launch Using Debugger


  • Subject: Re: Problem Getting Application to Launch Using Debugger
  • From: "Paul Sanders" <email@hidden>
  • Date: Thu, 10 Dec 2009 09:20:39 -0000

Try setting a breakpoint on [NSObject
doesNotRecognizeSelector:].  That should catch the error at the
moment it occurs and give you a stack trace.  If that doesn't
catch it, try setting a breakpoint on objc_exception_throw.

>From the method signature, it looks like the message should have
been sent to an instance of NSString, rather than NSArray, but
the leading underscore indicates it is an internal method and
might indicate some 'class cluster' trickery going on behind the
scenes.

If you're still stuck, the cocoa-dev list might be a better
place to ask this question.  The reason it works outside the
debugger is probably because Cocoa sometimes fields exceptions
and throw them away, but the debugger is ever-vigilant.

Paul Sanders.

----- Original Message -----
From: "Crazy Joe" <email@hidden>
To: <email@hidden>
Sent: Thursday, December 10, 2009 5:51 AM
Subject: Problem Getting Application to Launch Using Debugger

I'm working with a Cocoa app compiling with gcc 4.0 in Xcode
3.2.1.  Both the debug and the release builds launch fine from
the Finder, but the app does not launch through the debugger.
The app's icon appears in the doc, but the app just hangs in the
debugger.

After Running..., the debugger console mysteriously reports two
sequential occurrences of "[NSCFArray
_getCString:maxLength:encoding:]: unrecognized selector sent to
instance", but with no immediate indication as to where.  I've
stepped through hundreds of lines of assembler code in multiple
debug sessions to get a better idea where.

The debugger console doesn't consistently report much of
anything, and offers variable messages depending on what I step
into and/or over confusing things a bit.   "Current language:
auto; currently objective-c".  "Warning - No location found for
"MainController.m:31" appeared once.  When I step into
_NSInitializeAppContext, at some point the debugger starts
spitting out "Unable to disassemble objc_assign_strongCast"  to
the console.

The is how far I got down the call stack when I ran out of
aspirin:

_RegisterApplication
GetCurrentProcess
GetSystemUIMode
IsMenuBarVisible
_NSInitializeAppContext
[NSApplication init]
[NSApplication sharedApplication]
main

I've cleaned all and restarted Xcode to no avail as well.

This app was debugging fine under Xcode 2.5 and 10.5.x.  And
unfortunately, I had to change the code in now countless places
just to get it to build in 3.2.1 and 10.6, that it'd be rather
difficult to trace back what change that I made which might be
causing this problem, if in fact that's even the case.

One area I'm suspecting the problem might light is with a
resources/nib file???  I played with them some, but was able to
back them out with the problem still occurring though.  Or,
perhaps it's a problem with some setting somewhere???

Why the release and debug apps launch fine from the finder and
not from within the debugger seems a bit odd to me, especially
when the debugger hangs.

Can someone point me in some direction here?

Thanks. _______________________________________________
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



 _______________________________________________
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

References: 
 >Problem Getting Application to Launch Using Debugger (From: Crazy Joe <email@hidden>)

  • Prev by Date: Re: Project handling multiple developers
  • Next by Date: Re: Converting Xcode paths to usable paths
  • Previous by thread: Problem Getting Application to Launch Using Debugger
  • Next by thread: Re: Problem Getting Application to Launch Using Debugger
  • Index(es):
    • Date
    • Thread