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

Re: [pygame] changes from pygame 1.7.1 to pygame 1.8.1



(sorry if you receive this message twice; I have replied with the
wrong email account; the fourth paragraph is new though)

Hi,

About the crash, I have found this line:
return pygame.color.Color( <some ugly expression returning a
string with a color name> )

Replacing it with the following line gives the same result (Segmentation fault):
return pygame.color.Color("red")

Replacing it with the following line avoids the crash:
return (255, 255, 255)

[Edit: I have moved the Color() calls so they are done as soon as the
module is loaded, but the result is similar: the game crashes as soon
as it is loaded. Maybe the size of the already loaded modules is
enough to cause the segmentation fault while a simpler program doesn't
show this problem.]

I have some code where blit is called to the same surface (to make the
surface scroll), but this part didn't cause the crash (at least, it
wasn't probably called during the test; so it may still be harmful
when it is executed):
self.text_screen.blit(self.text_screen, (0, -20))


2008/8/16 René Dudfield <renesd@xxxxxxxxx>:
> hi,
>
> thanks for the report.
>
> If you could make a small test case that crashes, or just post the
> function body that crashes that'd be a big help in tracking down the
> problem.
>
>
> cu.
>
> On Fri, Aug 15, 2008 at 1:21 AM, sy12 <sy12@xxxxxxxxxxxxxxxx> wrote:
>> Hello,
>>
>> Here are the changes that I have noticed on Windows XP when porting my
>> game from Python 2.4 / pygame 1.7.1 to Python 2.5 / pygame 1.8.1
>> (actually after moving back to Python 2.5 / pygame 1.7.1 the changes
>> have disappeared, so they are probably linked to pygame 1.8.1).
>>
>> 1. The F10 keypress event now reaches the window, and activates the
>> window menu (maximize, move, close, ...), so the F10 key is not usable
>> anymore.
>>
>> 2. The game crashes after a display feature is activated (I haven't
>> located the exact line that causes the crash, but it's a function that
>> uses draw_line, display.flip, draw_rect, blit ; I can locate the line
>> but I would have to reinstall 1.8.1 ; in the worst case I will check
>> if the next version fixes this problem, since there are already
>> reports about the blit function).
>>
>> Additionally, I have noticed that the pygame.mixer.find_channel()
>> function still can return a reserved channel (I don't have a simple
>> enough program to guarantee this; at least the Sound.play() method
>> seemed to avoid the reserved channels).
>>
>> Hope it helps.