pygame.event.post does not work on OS X with PPC binaries

illume avatarillume created an issue

Aaron Gallagher, 2008-04-25 23:33:51 -0700

I've been working on tracking down a bug for a while now and only just was able to attribute it to pygame failing. In my application, calling pygame.event.post simply does nothing if the binaries have been stripped to only contain the ppc code. The i386 code works, but the ppc code does not work on an i386 machine or a ppc machine. I have not yet tried a fat binary on a ppc machine, but I doubt it will make a difference.

Calling pygame.event.post raises no exception, and the event is not received from the event queue. The event queue still receives events normally, though.

My build environment:
OS: Mac OS 10.5.2
Python: 2.5.2, built with "-Wall -fno-strict-aliasing -g -O2 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -arch i386 -arch ppc -mmacosx-version-min=10.3.9" as CFLAGS and LDFLAGS.
PyObjC: 1.4, built painfully and using the same CFLAGS and LDFLAGS.
py2app: 0.3.6.

Aaron Gallagher, 2008-04-26 14:46:03 -0700

Created attachment 9
A simple proof-of-concept

This zipfile contains just enough code to demonstrate the bug. You most likely need a version of python linked against the 10.4u SDK. It might also work built on a PPC machine linked with only PPC binaries, but I don't have access to a PPC machine and I can't try it. At any rate, the event posted on mousedown only shows up in the queue from the i386 binary when I build it. Run mkbuild.sh to invoke py2app and separate the resulting bundle into PPC and i386 bundles.

Attachments: pygametest.zip

illume, 2008-05-02 16:10:53 -0700

Hello,

thanks for the report and test case.  I'm not near a mac at the moment, but should have access to one later in the week.



In the mean time...

Which version of SDL are you using?

SDL_PushEvent is the function used in SDL.  Are you able to check to see if that works ok by itself?  Then we will be able to see if it is an SDL specific bug, or a pygame specific bug.

I checked on the sdl bug tracker, and found no bugs to do with SDL_PushEvent listed, and I found none on google.

If you find it to be a SDL specific bug please make a bug report here:
http://bugzilla.libsdl.org/



cheers,

Aaron Gallagher, 2008-05-02 16:38:00 -0700

I did some more testing, and I found that it was something to do with how I was trying to bootstrap my application. If I don't use the runEventLoop function provided by PyObjC, it works fine. I'd say this is a nonissue because I got it to work. If somebody really wanted to look into why it doesn't work, that's fine, but I think it was partly my nonstandard usage of PyObjC with pygame.

Comments (0)

  1. Log in to comment
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.