[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[pygame] Segmentation Fault?
Greetings fellow pygame developers.
Today I have reached a very interesting problem. At a particular blit in
my game, the whole thing fails with:
Pygame Parachute Traceback:
File "main.py", line 486, in blitToBG
Fatal Python error: (pygame parachute) Segmentation Fault
This application has requested the Runtime o terminate it in an unusual way.
Please contact the application's support team for more information.
Strange since I am used to seeing much more helpful python tracebacks.
Anyway, the function blitToBG simply takes a surface and a position then
blits the two. The function is used many more times than just that one
time! The thing fails at the same place every time. In fact, the function
blitToBG is so simple I'm placing it here:
def blitToBG(self, surface, pos):
# Routine to change the bg of this screen.
The line where it fails is: self.bg_clear.blit(surface, pos). bg_clear is
a surface with a colourkey, bg is a fully opaque version. The really weird
thing is that the images I'm asking the thing to blit have been blitted to
other backgrounds earlier, using that same function! I just don't
understand it at all. pos is passed in correctly, the same co-ordinates are
used earlier. surface is just a convert()ed image loaded with a colourkey.
Does anyone have an idea?
Thanks in advance,