In my small Ruby project using OpenGL via Gosu and Chingu I’m now seeing a number of these errors pop up during my tests:
2011-09-30 23:31:01.789 ruby[832:903] * attempt to pop an unknown autorelease pool (0x12c55a00)
UPDATE: I’m now also seeing some of these forms, definitely indicating a leak:
2011-10-01 03:50:00.281 ruby[3212:903] * __NSAutoreleaseNoPool(): Object 0x461aa0 of class NSCFNumber autoreleased with no pool in place – just leaking
2011-10-01 03:50:00.282 ruby[3212:903] * __NSAutoreleaseNoPool(): Object 0x461ae0 of class NSConcreteValue autoreleased with no pool in place – just leaking
2011-10-01 03:50:00.283 ruby[3212:903] * __NSAutoreleaseNoPool(): Object 0x10ce230 of class NSCFNumber autoreleased with no pool in place – just leaking
2011-10-01 03:50:00.285 ruby[3212:903] * __NSAutoreleaseNoPool(): Object 0x42abb0 of class NSConcreteValue autoreleased with no pool in place – just leaking
2011-10-01 03:50:00.286 ruby[3212:903] * __NSAutoreleaseNoPool(): Object 0xa031570 of class NSCFDictionary autoreleased with no pool in place – just leaking
Any thoughts on what likely causes might be for this? It’s somewhat enigmatic message to me — or at least it doesn’t provide enough context for me to immediately diagnose. It doesn’t seem to cause any of the tests to fail or anything, but I’m certain I am leaking memory — probably from not closing a resource down properly, I would guess, but I’m not really sure how to go about tracking this down. Can ruby-debug help me figure out what’s going on here? What should my next steps in the investigation here be?
This looks related. If you are using explicit threading in your application, check to see if you can register the cleanup widget they mention there. If not, try dusting off the C++ underneath your gem dependency and see if you can’t grep it there.