After the Fall problem on MacOSX

It seems to be getting confused about the size of something and trying to allocate a huge block of memory.

Python(492,0xa000ed88) malloc: *** vm_allocate(size=3657748480) failed (error code=3)
Python(492,0xa000ed88) malloc: *** error: can't allocate region
Python(492,0xa000ed88) malloc: *** set a breakpoint in szone_error to debug
Traceback (most recent call last):
  File "run_game.py", line 176, in <module>
    run()
  File "run_game.py", line 164, in run
    import main
  File "lib/main.py", line 27, in <module>
    import gamemode
  File "lib/gamemode.py", line 17, in <module>
    import objects
  File "lib/objects.py", line 52, in <module>
    class PlatformActor(PhysicsObject):
  File "lib/objects.py", line 54, in PlatformActor
    'walk': animation.Animation.load('run.anim'),
  File "lib/animation.py", line 44, in load
    a.fromfile(f, n)
MemoryError

(log in to comment)

Comments

What's your system?
Interesting. FYI it worked for me on OS X 10.5.8 with Python 2.6.2.
I'm wondering whether it's an endianness issue. Is your Mac Intel or PPC?
Intel. You may be right.
After The Fall definitely won't run on a big-endian system as it stands. While it wouldn't be that hard to fix things so that they work, I'm not really in a position to do so at the moment, and don't currently have access to a big-endian machine to test on.
Martin wrote this bit of code, but unfortunately he's out of the country at the moment and unlikely to be able to answer. If you're on a PPC Mac, it does look very much like an endianness issue, though. What happens if you add a call to a.byteswap() after each call to a.fromfile() in animation.py?
Martin proves me wrong by replying while I'm composing a message to say he won't be able to. Where are you, man?
In a small village in Südtirol, checking my internets, but not fixing bugs.
What happens if you add a call to a.byteswap() after each call to a.fromfile() in animation.py?

Yep, that fixes it, thanks.

(Plays for a while)

Wow, impressive game! Best one of the bunch so far, I think!