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

Re: [pygame] Intel Mac Problems



Kamilche,

Is there a version of Pygame out there compiled for Mac OSX 10.4 Intel machines?

Pre-compiled? Not that I'm aware of. If you use fink, then yes:

When I try to run my game, I get the following message:

File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ python2.4/site-packages/pygame/__init__.py", line 75, in -toplevel-
from pygame.base import *
ImportError: Inappropriate file type for dynamic loading

I don't see this error:

209}python
Python 2.4.2 (#1, Jun 15 2006, 23:03:16)
[GCC 4.0.1 (Apple Computer, Inc. build 5250)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from pygame.base import *
>>>

This PyGame was installed under fink (pygame-py24) and is version 1.7.1.

I did run into one problem that is not yet fixed, but for which there is a workaround.
See the note below.


	Regards,

		Jim


From: chaos@xxxxxxxxxxxxxxx Subject: BUG with fix: PyGame crash on Intel Duo Core (Mac OS X 1.4.X) Date: June 29, 2006 5:02:34 PM PDT To: pygame-users@xxxxxxxx

Dear PyGamers,

I recently installed Python 2.4 and PyGame using fink (the Debian- derived package
manager) on Mac OS X (10.4.6 and 10.4.7). It was installed on PowerPC Macs (dual G5) and
PowerBook G4 and ran fine.
It was also installed on a MacBook Pro (duo Core Intel), but crashed with "Illegal
Instruction". This note is about a work-around that allows PyGame to run on the Mac Intel
platform. It also indicates more or less where the problem lies.
I hope you find this useful.


	Regards,

		Jim

James P. Crutchfield Professor
Computational Science & Engineering Center
Physics Department chaos@xxxxxxxxxxxxxxx
University of California cse.ucdavis.edu/~chaos
One Shields Avenue 530-752-0600 or 297-4620, 754-4885 (fax)
Davis, California 95616-8572
Center Manager: Linda Potoski lrpotoski@xxxxxxxxxxx; 530-754-4405


MacBook Pro (due core Intel, 2.16 GHz) 15"
Mac OS X 10.4.6 and 10.4.7:

Fink installer.
Packages: python24 and pygame-py24.

Problem:
When python script executes pygame.init() it crashes with "Illegal Instruction".
Traceback reveals that the crash occurs in CoreGraphics, which is called by WMEnable()
in /sw/lib/python2.4/site-packages/pygame/macosx.py. For example:


Thread 0 Crashed:
0   com.apple.CoreGraphics 	0x90451dc3 _CGSAppShowHideOp + 82
1   com.apple.CoreGraphics 	0x90451d62 CPSPostShowReq + 175
2   com.apple.HIServices   	0x917e2a48 SetFrontProcessWithOptions + 82
3   com.apple.HIServices   	0x917e29f2 SetFrontProcess + 25
...

The fix:
(i) Force PyGrame to run macsox.py and not macosx.pyc by renaming latter.
(ii) In macsox.py comment out the line in function WMEnable()


		    # err = d['SetFrontProcess'](psn)

Consequence: The PyGame window will not be put on top of all others. But at least
it runs again.