Re: _NSAutoreleaseNoPool missing in Snow Leopard
Re: _NSAutoreleaseNoPool missing in Snow Leopard
- Subject: Re: _NSAutoreleaseNoPool missing in Snow Leopard
- From: Klaus Backert <email@hidden>
- Date: Mon, 31 Aug 2009 03:17:51 +0200
On 31 Aug 2009, at 02:45, Kyle Sluder wrote:
On Aug 30, 2009, at 5:33 PM, Klaus Backert <Klaus.Backert@t-
online.de> wrote:
No Objective-C program code of my own has been executed up to this
point. I have not been able to manage this.
Are you doing anything before calling NSApplicationMain?
My NSApplicationMain is the "standard" one:
#import <Cocoa/Cocoa.h>
int main(int argc, char *argv[])
{
return NSApplicationMain(argc, (const char **) argv);
}
Previous to any of my own Objective-C code the following C++ module
initializer function is executed, which is contained in a C++ library
of mine:
static bool WorldIsInitialized = false;
static void __attribute__((constructor)) InitializeWorld()
{
DKT_LOG_INVOKING;
if (!dkt::WorldIsInitialized)
{
DKT_LOG("initialize ODE library");
dkt::Integer isODEInitialized = dInitODE2(0);
DKT_ASSERT(isODEInitialized);
dkt::WorldIsInitialized = true;
}
}
(The macros DKT_LOG_INVOKING and DKT_LOG display the pertinent
messages you can see below.)
The debugger console displays the following, after having stepped out
of NSLog():
[Session started at 2009-08-31 03:03:06 +0200.]
GNU gdb 6.3.50-20050815 (Apple version gdb-966) (Tue Mar 10 02:46:18
UTC 2009)
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 "powerpc-apple-darwin".tty /dev/ttys001
sharedlibrary apply-load-rules all
Loading program into debugger…
Program loaded.
run
[Switching to process 2101 local thread 0x2e03]
bash(2101) malloc: enabling scribbling to detect mods to free blocks
arch(2101) malloc: enabling scribbling to detect mods to free blocks
objc[2101]: OBJC_PRINT_OPTIONS is set
objc[2101]: OBJC_PRINT_CXX_CTORS is set
objc[2101]: OBJC_PRINT_EXCEPTIONS is set
objc[2101]: OBJC_PRINT_ALT_HANDLERS is set
objc[2101]: OBJC_DISABLE_GC is set
objc[2101]: GC: forcing GC OFF because OBJC_DISABLE_GC is set
Running…
Blotto(2101) malloc: enabling scribbling to detect mods to free blocks
objc[2101]: OBJC_PRINT_OPTIONS is set
objc[2101]: OBJC_PRINT_CXX_CTORS is set
objc[2101]: OBJC_PRINT_EXCEPTIONS is set
objc[2101]: OBJC_PRINT_ALT_HANDLERS is set
objc[2101]: OBJC_DISABLE_GC is set
objc[2101]: GC: forcing GC OFF because OBJC_DISABLE_GC is set
<void dkt::InitializeWorld()> invoking at /Volumes/C/Development/
Projects/Demokrit/DktWorld.cpp:18
<void dkt::InitializeWorld()> initialize ODE library at /Volumes/C/
Development/Projects/Demokrit/DktWorld.cpp:21
(gdb) continue
2009-08-31 03:03:28.075 Blotto[2101:813] *** _NSAutoreleaseNoPool():
Object 0xa0c13290 of class NSCFString autoreleased with no pool in
place - just leaking
Stack: (0x94350dac 0x9427de14 0x9134ca24 0x940bcab4 0x940bc934
0x940bb010 0x96df69d8 0x940c49b0 0x940bd4ec 0x8fe02d7c 0x8fe0f220
0x8fe0f198 0x8fe0f36c 0x8fe03848 0x8fe08144 0x8fe01774 0x8fe01048)
(gdb)
Klaus
_______________________________________________
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