[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] surfaces and memory
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] surfaces and memory
- From: Rene Dudfield <renesd@xxxxxxxxx>
- Date: Sat, 20 Aug 2005 13:45:11 +1000
- Delivered-to: archiver@seul.org
- Delivered-to: pygame-users-outgoing@seul.org
- Delivered-to: pygame-users@seul.org
- Delivery-date: Fri, 19 Aug 2005 23:45:34 -0400
- Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=VYgrh9yEIBo3IXHNbOp1eXnEJpCIAMJC1iEEImIB712vGDctFO9B2DKtKJfI0REWhjW+vGlOoRsYuDPSfBgfaCIosnfyJtIluOpGpzQ5jKflYMCJzStKnlMQssbOs1loBTJEhfCREyYrlHilO5na2QXswYWrlrfhjQ6n/xapuXw=
- In-reply-to: <e8230778050819191935700e85@mail.gmail.com>
- References: <e8230778050819191935700e85@mail.gmail.com>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
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
>