Jindra Sarson | 17 Mar 00:08 2005
Picon

Re: Pygame app on Mac

Thank you,

but it's not that case. I tried it on simple examples delivered with 
instalation package of Pygame 1.7. I tried it to run from terminal. It
genaretes many:

python[342] *** _NSAutoreleaseNoPool(): Object 0x38c0e0 of class 
NSCFString autoreleased with no pool in place - just leaking

and at the end:
<NSInternalInconsitencyException> Error (1002) creating CGSWindow
Trace/BPT trap

Thank you for help,

Jindra

Bob Ippolito wrote:
> 
> On Mar 16, 2005, at 16:25, Jindra Sarson wrote:
> 
>> Arthur Elsenaar wrote:
>>
>>>> I'm just beginner on Mac platform. I'd like to create standalone 
>>>> app  of my pygame program. I don't know anything - I tried to 
>>>> install  PyGame package for Mac, it istalled OK, but when I tried to 
>>>> test any  pygame source, it finished with some "cannot create screen".
>>>>
>>>> Is there any "step by step" describtion, how to do just package 
>>>> with  my app, that will run on Mac without anything special installed?
(Continue reading)

Bob Ippolito | 17 Mar 00:17 2005

Re: Re: Pygame app on Mac

That simply can't happen if you do indeed have PyObjC 1.2 installed and 
are using the correct Python interpreter.

As stated, the installation packages are for the stock distribution of 
Python 2.3.0.  Try executing them with /usr/bin/python and see if that 
makes a difference.  If it does, then you've got the wrong Python on 
your PATH.

-bob

On Mar 16, 2005, at 6:08 PM, Jindra Sarson wrote:

> Thank you,
>
> but it's not that case. I tried it on simple examples delivered with 
> instalation package of Pygame 1.7. I tried it to run from terminal. It
> genaretes many:
>
> python[342] *** _NSAutoreleaseNoPool(): Object 0x38c0e0 of class 
> NSCFString autoreleased with no pool in place - just leaking
>
> and at the end:
> <NSInternalInconsitencyException> Error (1002) creating CGSWindow
> Trace/BPT trap
>
> Thank you for help,
>
> Jindra
>
>
(Continue reading)

Bob Ippolito | 17 Mar 03:15 2005

Re: Re: Pygame app on Mac

Just to clarify here, after some testing I am absolutely positive you  
didn't listen the first time.  You will ONLY get these error messages  
if you do not have PyObjC installed.

I've just committed a little hook in CVS, which will be present in the  
next build of pygame for Mac OS X, that will make this REALLY obvious:

Traceback (most recent call last):
   File "moveit.py", line 15, in ?
     import os, pygame
   File  
"/Users/bob/src/pygame/build/lib.darwin-7.8.0-Power_Macintosh-2.3/ 
pygame/__init__.py", line 37, in ?
     _check_darwin()
   File  
"/Users/bob/src/pygame/build/lib.darwin-7.8.0-Power_Macintosh-2.3/ 
pygame/__init__.py", line 34, in _check_darwin
     raise ImportError("PyObjC 1.2 or later is required to use pygame on  
Mac OS X")
ImportError: PyObjC 1.2 or later is required to use pygame on Mac OS X

-bob

On Mar 16, 2005, at 6:17 PM, Bob Ippolito wrote:

> That simply can't happen if you do indeed have PyObjC 1.2 installed  
> and are using the correct Python interpreter.
>
> As stated, the installation packages are for the stock distribution of  
> Python 2.3.0.  Try executing them with /usr/bin/python and see if that  
(Continue reading)

Jack Nutting | 17 Mar 09:39 2005
Picon

Re: Re: Pygame app on Mac

On Thu, 17 Mar 2005 00:08:20 +0100, Jindra Sarson <jindra@...> wrote:
> Thank you,
> 
> but it's not that case. I tried it on simple examples delivered with
> instalation package of Pygame 1.7. I tried it to run from terminal. It
> genaretes many:
> 
> python[342] *** _NSAutoreleaseNoPool(): Object 0x38c0e0 of class
> NSCFString autoreleased with no pool in place - just leaking

I've seen this happen many, many times with downloaded pygame projects
that the author had never tried on Mac OS X.  It has always been
solved by adding a line in the source, right after pygame is imported:

pygame.init()

For some reason other platforms can get by without that, but the Mac
needs it.  This has been mentioned before.  I think Bob said that
pygame 1.7 should fix this problem, but maybe you're using 1.6?

--

-- 
// jack

Bob Ippolito | 17 Mar 10:21 2005

Re: Re: Pygame app on Mac

On Mar 17, 2005, at 3:39, Jack Nutting wrote:

> On Thu, 17 Mar 2005 00:08:20 +0100, Jindra Sarson <jindra@...> 
> wrote:
>> but it's not that case. I tried it on simple examples delivered with
>> instalation package of Pygame 1.7. I tried it to run from terminal. It
>> genaretes many:
>>
>> python[342] *** _NSAutoreleaseNoPool(): Object 0x38c0e0 of class
>> NSCFString autoreleased with no pool in place - just leaking
>
> I've seen this happen many, many times with downloaded pygame projects
> that the author had never tried on Mac OS X.  It has always been
> solved by adding a line in the source, right after pygame is imported:
>
> pygame.init()

The problem is that he does not have PyObjC 1.2 or later installed.  He 
says "it's not the case", but he is definitely wrong.    Importing the 
objc package will create an NSAutoreleasePool that will never go away.  
However, due to the way pygame autoinit works, it will mask out the 
ImportError, and instead expect you to check the status of the video 
subsystem yourself.  The examples do not check for this condition.

Due to this confusion, pygame CVS now explicitly checks for the 
presence of PyObjC 1.2 or later on Mac OS X upon import, not 
initialization, so you WILL see the ImportError.

None of the examples exhibit any problems on Mac OS X if pygame and its 
dependencies are installed properly.
(Continue reading)

Jindra Sarson | 17 Mar 12:37 2005
Picon

Re: Pygame app on Mac

Hi,

you'r right, the problem was with missing PyObjC. Thank you very much 
for your help. I'm just beginner on Apple platform, so that I'm sorry 
for missing of basic knowledges.

Thanks,

Jindra Sarson
> 
> 
> The problem is that he does not have PyObjC 1.2 or later installed.  He 
> says "it's not the case", but he is definitely wrong.    Importing the 
> objc package will create an NSAutoreleasePool that will never go away.  
> However, due to the way pygame autoinit works, it will mask out the 
> ImportError, and instead expect you to check the status of the video 
> subsystem yourself.  The examples do not check for this condition.
> 


Gmane