Hi,

I have been trying to work out why some of my OpenGL
screensavers core-dump when they try to run on the
root window of my XFree86 4.3 installation. I have
been hacking away at the DRI tree and discovered that
libGL explodes in:

xc/lib/GL/mesa/src/swrast_setup/ss_context.c

in the _swsetup_CreateContext() function. What happens
is that tnl is NULL in this line:

   swsetup->verts = (SWvertex *) ALIGN_CALLOC(
sizeof(SWvertex) * tnl->vb.Size,
                 32);

and so the tnl->vb.Size dereference fails.

Tracing this back further into the
_tnl_CreateContext() function, I discovered that:

ctx->swtnl_context = tnl = (TNLcontext *) CALLOC(
sizeof(TNLcontext) );

is returning NULL too. In other words, there is not
enough dynamic memory left in a machine with 1 GB of
RAM and an extra 0.5 GB of swap to allocate
approximately 4K of data. None of the Mesa code
expects this allocation to fail because none of them
checks any of the GLBoolean return codes.

As I mentioned before, this only happens when the hack
is launched from xscreensaver. One obvious thing that
could be consuming a lot of memory in this scenario is
storing the original contents of the screen for when
the screensaver ends, but I still wouldn't have
thought that a 1280x1024 screen with 16 bit colour
would have floored the allocator.

Can anyone suggest anything else to try, please? Does
XFree86 impose a limit on per-process virtual memory,
or something??

Cheers,
Chris


__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to