I'm having trouble debugging a crash and I'm hoping someone here has a
clue what's going on.

The problem is that the game just freezes up, so I'm not getting a
traceback or anything, and I can't quite figure out how to use pdb or
other modules to analyze my program at the point where it freezes
(i.e., just trying pdb.set_trace() doesn't let me inspect the stack at
the moment where things freeze).

If anyone has suggestions on debugging tools that'd be great,
otherwise here is the code in error:

        for other in things.others:
            if (((self.x-self.width//2) < other.x < (self.x
+self.width//2)) and
                ((self.y-self.height//2) < other.y < (self.y
+self.height//2))):
                        x = int(other.x)
                        y = int(other.y)
                        vertex_list = batch.add(4, pyglet.gl.GL_QUADS,
layer_2,
                        ('v2i', (x, y,  x+8, y,  x+8, y+8,  x, y+8)),
                        ('c3B', (255, 0, 0,  255, 0, 0,  255, 0, 0,
255, 0, 0)))

here is a pastebin link to that in case it's mangled: 
http://pastebin.com/m108e579e

This for loop draws the quads whenever the player presses the x key.
It checks first if the 'other' sprite is contained within the player,
and if so it draws the quads based on the other's position. The freeze
up happens when (as far as I can figure out) the player presses x and
moves with the arrow keys.

If batch.add() is called 'too fast' could this be the problem? What am
I doing wrong here?

Here is the complete source if anyone wants to try this out
themselves: http://media.pyweek.org/dl/8/georgek/open_src_r1.tar.gz


Thanks for any help.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to