God damn it, Lepton

As soon as I release the game I discover a showstopper that plain wasn't there in development.

Crashing into the water now crashes the game and very rapidly swallows all the memory for the machine. I've had to pull my entry until I can get it fixed.

Running with ulimit -v:

Loading chipmunk for Linux (64bit) [/home/mauve/.virtualenvs/flying/local/lib/python2.7/site-packages/pymunk/libchipmunk64.so]
Initializing cpSpace - Chipmunk v6.0.2 (Debug Enabled)
Compile with -DNDEBUG defined to disable debug mode and runtime assertion checks
Traceback (most recent call last):
  File "/home/mauve/.virtualenvs/flying/bin/korovic", line 9, in <module>
    load_entry_point('korovic==1.0', 'console_scripts', 'korovic')()
  File "/home/mauve/dev/flying/korovic/__main__.py", line 9, in main
    g.start(level=options.level)
  File "/home/mauve/dev/flying/korovic/game.py", line 42, in start
    pyglet.app.run()
  File "/usr/lib/pymodules/python2.7/pyglet/app/__init__.py", line 264, in run
    EventLoop().run()
  File "/usr/lib/pymodules/python2.7/pyglet/app/xlib.py", line 93, in run
    sleep_time = self.idle()
  File "/usr/lib/pymodules/python2.7/pyglet/app/__init__.py", line 187, in idle
    dt = clock.tick(True)
  File "/usr/lib/pymodules/python2.7/pyglet/clock.py", line 700, in tick
    return _default.tick(poll)
  File "/usr/lib/pymodules/python2.7/pyglet/clock.py", line 303, in tick
    item.func(ts - item.last_ts, *item.args, **item.kwargs)
  File "/home/mauve/dev/flying/korovic/game.py", line 76, in update
    self.scene.update(dt)
  File "/home/mauve/dev/flying/korovic/scene.py", line 74, in update
    self.world.update(dt)
  File "/home/mauve/dev/flying/korovic/world.py", line 206, in update
    self.check_crash()
  File "/home/mauve/dev/flying/korovic/world.py", line 231, in check_crash
    self.particle_splash(p, v(vx, vy))
  File "/home/mauve/dev/flying/korovic/world.py", line 82, in particle_splash
    e.emit(30, self.splash_group)
MemoryError

e is a lepton.emitter.StaticEmitter. So I'm fairly sure it's happening in lepton.

Strangely I've seen the splash effect work. It just worked as it was supposed to when I programmed it and didn't fail until after the deadline!

I'm going to try and find a workaround for you. If you've already downloaded it, don't play without a -v ulimit!

(log in to comment)

Comments

Ok, a new version is up that doesn't seem to have this problem. I worked around it by letting the emitter run for a fraction of a second rather than telling it to emit in a one-off hit.

I've even looked at the relevant code in Lepton, but I can't see what the problem might be.

Pygame occasionally Segfaults for me too, but that's on startup, and isn't as egregious a problem.