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

Re: [pygame] surfaces and memory



Hey,

that "Width or height is too large" error is coming from
SDL_GetError().  So it is an SDL limit.

There is probably no technical reason for software surfaces.



On 8/20/05, Luke Miller <dodgyville@xxxxxxxxx> wrote:
> Thanks Rene, I think that will fix my problem. That limitation is from from
> SDL, yeah? Any technical reason it's there?
>  
>  Luke
> 
> 
>  
>  
> On 8/20/05, Rene Dudfield <renesd@xxxxxxxxx> wrote:
> > 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
> > >
> > 
> 
>