nel-all
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nel] patch to compile on GNU/Linux


From: Vincent Caron
Subject: Re: [Nel] patch to compile on GNU/Linux
Date: 07 Feb 2002 18:14:45 +0100

> (gdb) bt
> #0  0x41c5d52e in xmesa_register_swrast_functions (ctx=0x86c6dd8) at 
> xm_dd.c:1037
> #1  0x41c59a0b in XMesaCreateContext (v=0x86c4b90, share_list=0x0) at 
> xm_api.c:1661
> #2  0x41c5407d in Fake_glXCreateContext (dpy=0x86c1ee8, visinfo=0x86c49f8, 
>     share_list=0x0, direct=1) at fakeglx.c:1154
> #3  0x41c500d8 in glXCreateContext (dpy=0x86c1ee8, visinfo=0x86c49f8, 
> shareList=0x0, 
>     direct=1) at glxapi.c:188
> #4  0x41a05bc8 in NL3D::CDriverGL::setDisplay (this=0x86c0578, wnd=0x0, 
>     address@hidden) at driver_opengl.cpp:603
> #5  0x40b25157 in NL3D::CDriverUser::setDisplay (this=0x8599160, 
> address@hidden)
>     at driver_user.cpp:186
> #6  0x08063a9a in main (argc=1, argv=0xbffffd74) at client.cpp:171
> #7  0x4177c6cf in __libc_start_main () from /lib/libc.so.6
> (gdb) print swrast
> $1 = (SWcontext *) 0x0
> 
>       There, I know why it core dumps. Not being familiar enough with Mesa,
> I can hardly imagine why that pointer is null. I'd expect Mesa to bark earlier
> with a nice error message but I guess it's too much asking :-)
> 
>       Any kind of help or advice will be welcome.

OK, so we're in a Mesa bug here, NeL is innocent. I had a peek at your
pb since an OpenGL developer has always a tree of Mesa on his HD :)

Looking at src/X/xm_api.c:XMesaCreateContext(), there's a bunch of
initilization that could failed and ar not checked against :

  /* Initialize the software rasterizer and helper modules.
    */
   _swrast_CreateContext( ctx );
   _ac_CreateContext( ctx );
   _tnl_CreateContext( ctx );
   _swsetup_CreateContext( ctx );

   xmesa_register_swrast_functions( ctx );

In our case, _swrast_CreateContext's task is to setup a SWcontext and
let SWRAST_CONTEXT(ctx) point at it. Since
xmesa_register_swrast_functions() fails on a null SWcontext, we guess
something went wrong in _swrast_CreateContext(). If we have a look at
this function in src/swrast/s_context.c, we see a SWcontext creation can
only fail from OOM (out of memory) : callees are CALLOC and
_mesa_alloc_pb which CALLOCs too.

Conclusion : seems you're running out of memory, but I'm pretty
surprised since only small structs are involved during this init. I
guess you should try to step from the call to _swrast_CreateContext() in
xm_api.C to see what's really happening to our SWRAST_CONTEXT(ctx) (or
namely ctx->swrast_context). Then we could decide if we should get in
touch with the Mesa guys.

Hopes this help.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]