[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] pygame and SDL on osx



On Jun 13, 2004, at 1:34 PM, Daniel Bisig wrote:

we are currently developing a shared library bundle on osx and linux which relies on SDL. For this library we created our own python bindings using SWIG. On osx, when loading the library into python we end up with zillions of error messages of the following type:

_NSAutoreleaseNoPool(): Object 0x33b6c0 of class NSCFString autoreleased with no pool in place - just leaking

We are aware that this error message relates to the fact, that SDL is not properly initialized. We circumvented the problem by first importing pygame and calling pygame.init(). Of course it is not a particularly beautiful solution to rely on pygame just in order to make SDL happy. We would really like to figure out what exactly pygame is doing to initialize SDL on osx so we could integrate this part of the code in our library.
Look at lib/macosx.py or SDLMain.m.. you need an NSApplication running before you start to use SDL on OS X.

-bob

Attachment: smime.p7s
Description: application/pkcs7-signature