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

Re: Re: [pygame] Segfault using surface.fill()



Hi,

this is fixed now, with a unit test too.

Here's the issue Lenard made for it:
    https://bitbucket.org/pygame/pygame/issue/93/method-surfacefill-can-segfault-is-passed

cheers,





On Wed, Oct 5, 2011 at 3:38 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
This is an unhandled bug. It is now issue #93.
 
Lenard Lindstrom

On Oct 2, 2011, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
Hi,
 
This may have been fixed in Pygame 1.9.2 (commit 902b98865c6c). I will check.
 
Lenard Lindstrom
 
On Oct 2, 2011, Chris Pezley <chrispezley@xxxxxxxxx> wrote:
I did a little google-fu and found an old entry which describes my
problem, but nobody answered:
http://www.mail-archive.com/pygame-users@xxxxxxxx/msg09485.html

What I'm trying to do is basically the following:

#taken from the Mouse class
       self.posx, self.posy = mouse.get_pos()
       self.posx = int(self.posx/16)
       self.posy = int(self.posy/16)
       self.pos = self.posx*16, self.posy*16
       self.rect = self.pos, (16,16)

#this is the part from the program
       windowinfo = pygame.display.Info()
       size = width, height = windowinfo.current_w/2,
windowinfo.current_h/2
       screen = pygame.display.set_mode(size)
       screen.fill([20,20,20], Mouse.rect, BLEND_RGB_ADD)

The only time the segfault happens is when I move the cursor to the
bottom of the window. The left, top and right sides do not cause this
problem.

Any insight?

Thanks,
Chris