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

Re: [pygame] surfaces and memory



A Surface can have a maximum height and width of 16384,16384.

For debuging I mainly use print statements.  Also I use an
interpreter, like ipython.

For C level stuff I also use printf, and sometimes gdb and valgrind. 
Also linking libraries like  SDL statically can help with C level
debugging a lot.

Perhaps try putting the images in a zipfile, and reading them from
there?  Don't use compression on the zip though.

It sounds like all the images are using up too much memory.  Are they
already at 8/16bit colour?


Cheer.



On 8/20/05, Luke Miller <dodgyville@xxxxxxxxx> wrote:
> Hi everyone.
>  
>  I have a very complicated animation (100+ frames) I want to load up in
> pygame. When I load each image individually, it loads (takes a while to read
> from disk though) and then runs fine. However, when I compile the frames
> into a wide montage in a single file and try to load it as one surface, I
> get:
>  <pygame.error instance at 0x4029896c> Out of memory exceptions.
>  
>  Two questions:
>  Does anyone have an idea of how big a surface can be?
>  
>  And also, does anyone know the best way to debug pygame? 
>  
>  Thanks,
>  Luke
>