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

Re: [pygame] BUG with fix: PyGame crash on Intel Duo Core (Mac OS X 1.4.X)



cool, thanks.

What does your platform string return?

import sys,platform
print platform.platform(), sys.version


On 6/30/06, James P. Crutchfield <chaos@xxxxxxxxxxxxxxx> wrote:
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.