• 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: Very odd program hang??
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Very odd program hang??


  • Subject: Re: Very odd program hang??
  • From: Andrew Merenbach <email@hidden>
  • Date: Sun, 21 Jul 2002 18:27:02 -0700

I debugged my program with the breakpoint -[NSException raise], no optimization, and debugging symbols on, but nothing happened, except that it froze again at the same point.

I just came across something startling. I took my code and made a return statement right after my declarations, and the program still froze. Then I tried removing even the declarations. Same thing. An old idea I had one time popped into mind: is there something wrong with my window itself?

I'm not a really advanced programmer at all, but I wonder if, when I copied and pasted in the tab view that contains the window that causes the freeze, some flaw in the code that got tranferred along with it?

Here's something even more odd: I've tried clicking the default button instead of hitting return, and there's no freeze-up at all then. Therefore, there's something wrong with pressing return in my window.

Take care,
Andrew Merenbach


On Sunday, July 21, 2002, at 05:39 PM, Mark de Jong wrote:

Andrew,

The way I do it is to create a new target. I usually call it "<projectName>-Debug" :-)

Make sure "Generating Debug Symbols" is selected, "Optimization Level: None" and the following "Build Settings" are set:

COPY_PHASE_STRIP = NO
DEBUGGING_SYMBOLS = YES

In the "Breakpoints" tab click on "New" and enter "-[NSException raise]" This will cause the debugger to break whenever an uncaught exception has been raised. To me, this stuff is *very* revealing of what's going on in my code.

Hope this helps,

-- Mark


On Sunday, July 21, 2002, at 05:03 PM, Andrew Merenbach wrote:

There's nothing at all in the Console, except some messages from before. I would like to get this thing run in GDB, but how do I go about it? I've gotten about as far as running the executable from within Project Builder with the debugger turned on, but how do I get the NSExceptionRaise thing to work, and where do I put it?

Thank you,
Andrew Merenbach

On Sunday, July 21, 2002, at 04:34 PM, Mark de Jong wrote:

Andrew,

Hmmm... this sounds bizarre. You don't see anything at all in the console? Or do you mean you don't see anything that seems to relate to the problem?

If you haven't done so, I'd run this in gdb with a breakpoint set to catch uncaught exceptions.

(gdb) break -[NSException raise])

I have found all kinds of weird bugs in my code this way. :-)

HTH,

-- Mark

On Sunday, July 21, 2002, at 04:21 PM, Andrew Merenbach wrote:

I'm working on a big program at the moment, and I'm encountering the same sort of error I encountered while using AppleScript Studio to do my work: when I enter a value of 200 into a certain text field and click a button, my program hangs and I need to force quit. This was the main reason I switched to Cocoa in the first place, and though I'm very glad I did, this is disconcerting. Nothing appear in the Console (both in Project Builder and in /Applications/Utilities/), and this only seems to happen when I enter a large number. (The oddest thing is that the windows that hang my program now are the exact same ones that caused the crash under AppleScript Studio.)

My program functions differently from the AS-S one, too, in that it sends calculations to the BC calculator program, so I haven't told my program to do any arithmetic on its own.

Any suggestions? Is this a known problem? Will it be fixed in Jaguar?

Thanks in advance,
Andrew Merenbach
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.






--
Andrew Merenbach
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Prev by Date: Again about services
  • Next by Date: Resource Manager - Thread Safe?
  • Previous by thread: Re: Very odd program hang??
  • Next by thread: Again about services
  • Index(es):
    • Date
    • Thread