__NSAutoreleaseNoPool() - just leaking

Archives Forums/MacOS X Discussion/__NSAutoreleaseNoPool() - just leaking

Difference(Posted 2010) [#1]
I often get messages like the ones below when quitting my program.

Sometimes in the debuglog, sometimes a popup message.

It's under Snow leopard ,not multithreaded

Does anybody know if there a known cause or cure, and will it haunt my users in release mode?

If I knew how to provoke it, I'd make a code sample.






Brucey(Posted 2010) [#2]
If you run it with the leak checker instrument (included as part of XCode tools), you should be able to get things like stack traces for the specific leaking areas.

Are you using any 3rd-party mods (like MaxGUI) ?


xlsior(Posted 2010) [#3]
Also, what are the versions of: OS X, XCode, and Blitzmax that you are running?


Difference(Posted 2010) [#4]
OS X 10.6.3, XCode Version 3.2.1, Component versions
Xcode IDE: 1613.0
Xcode Core: 1614.0
ToolSupport: 1591.0

BlitzMax 1.38 , GCC 4.2.1, G++ 4.2.1

The program uses Bah.LibXML and Bah.Volumes at startup.

How do I run the Leak tool on a BlitzMax executable?


Brucey(Posted 2010) [#5]
/Developer/Applications/Instruments

I'll leave you to work out the rest :-)


Difference(Posted 2010) [#6]
Got "Leaks" working although the program has not yet produced the leak.

The Object alloc tool look good too, thanks for showing me these!


Difference(Posted 2010) [#7]
I found a problem in my code, that prevented BlitzMax Garbarge collecter from freeing objects.

I'm hoping this was the main cause of the leak, but I also found out that some of the leak messages can be reproduced with the code below.
It also seems to be the source of the popup described above.

SuperStrict
' OS.X 10.6.3
' Run this and then CMD+TAB to the standard Blitz IDE and back to the dialog, It produces something like:
' 2010-04-22 09:43:53.817 untitled1.debug[754:60b] *** attempt to pop an unknown autorelease pool (0x90f600)

Graphics 800,600,0,-1
Flip
Confirm "Really"