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: Martin Batholdy <email@hidden>
- Date: Thu, 11 Jun 2009 16:28:32 +0200
ok, I am sorry.
It's rare that an app crashes silently. Is anything printed to the
console? Do you have a crash log? If you run the app in the
debugger, what line of code does it crash on?
Also, are there any compiler warnings that you are ignoring?
There are no compiler warnings in the code.
this is printed in the debugger console;
[Session started at 2009-06-11 16:07:48 +0200.]
Loading program into debugger…
GNU gdb 6.3.50-20050815 (Apple version gdb-962) (Sat Jul 26 08:14:40
UTC 2008)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and
you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB. Type "show warranty" for
details.
This GDB was configured as "i386-apple-darwin".Program loaded.
sharedlibrary apply-load-rules all
Attaching to program: `/Users/jorggro/Documents/Programmierung/Cocoa/
Builds/Debug/Fibo.app/Contents/MacOS/Fibo', process 1375.
The Debugger Debugger is attaching to process
Is this the same problem as your earlier post? It seems like maybe
you're trying to do stuff with NSObjects before the runtime is
initialised properly. Obviously it's not adding the extra ivar
that's causing the problem, but some other problem that this
exposes. What objects are you creating when? Are you doing anything
in main()? Generally your app shouldn't start to do any processing
until the app delegate gets the green light in the form of -
applicationWillFinishLaunching: or similar.
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?
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 ..?
Am 11.06.2009 um 15:50 schrieb Andy Lee:
On Jun 11, 2009, at 9:38 AM, Martin Batholdy wrote:
But it crashes on startup when I add something like;
@interface AppleScriptHandler : NSObject {
NSDictionary *errorInfo;
NSArray *test;
NSString *appFolder, *filePathFinderFiles;
}
It's rare that an app crashes silently. Is anything printed to the
console? Do you have a crash log? If you run the app in the
debugger, what line of code does it crash on?
Also, are there any compiler warnings that you are ignoring?
These are the very first things you should look at when you're
debugging, and if you're still stumped, this is the kind of
information that would help us help you. When you post a question,
try to include relevant information.
--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