Re: program crashes because of a variable declaration
Re: program crashes because of a variable declaration
- Subject: Re: program crashes because of a variable declaration
- From: Andy Lee <email@hidden>
- Date: Thu, 11 Jun 2009 12:18:40 -0400
On Thursday, June 11, 2009, at 10:28AM, "Martin Batholdy" <email@hidden> wrote:
>There are no compiler warnings in the code.
>
>
>this is printed in the debugger console;
Once again: show us the code that is crashing. I don't know how to put it any more simply. Most of the time (though not 100%) this is the most important clue. Use the "Debug" command instead of "Run". Almost always when your program crashes the debugger will stop and show you where it crashed. Go to the "Run" menu and select "Debugger" to open the debugger window. If the debugger doesn't work, try inserting NSLog statements to find out exactly how far your program gets before crashing.
>It is pretty strange to me.
>I changed something in another file that has nothing to do with the
>file that I am having problems with and now it works ...
>
>Does anyone know how this could be?
>
Seemingly random crashes that mysteriously fix themselves are often because:
* Your change wasn't as unrelated as you thought.
* You need to do a clean build -- do "Clean All" and compile again.
* You have a threading problem.
* You have a memory bug.
>> Try also enabling NSZombieEnabled, as it sounds like you may have a
>> memory management problem (over-release most likely).
>
>
>So I release more stuff than I should be?
>But wouldn't that lead to more obvious wrong behavior, as the app
>don't have the information it needs at some point ..?
The consequences of over-release are not always obvious or immediate. Try Graham's suggestion. It's easy to do and it will give you information one way or another. If you don't know how, Google for it. If what you find is not clear, come back with specific questions.
--Andy
_______________________________________________
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