Hi all,
As I reported in a mail to the generic Mesa mailing list this WE, I
had a problem with Mesa + Glide running with Wine. I first thought it
was a thread related problem as Wine use them heavily.
After a bit of debugging, I found out that the crash was around the
'gl_extensions_disable' call (when disabling multi-texturing on my
single-TMU Voodoo board).
By looking at the 'set_extension' function called by
'gl_extensions_disable', I found the following line :
if (i->notify) i->notify( ctx, state );
But by looking at the extension structure creation, I found no
initialisation of the 'notify' field :
if (ctx->Extensions.ext_string == 0)
{
struct extension *t = MALLOC_STRUCT(extension);
t->enabled = state;
strncpy(t->name, name, MAX_EXT_NAMELEN);
t->name[MAX_EXT_NAMELEN] = 0;
insert_at_tail( ctx->Extensions.ext_list, t );
return 0;
}
And as it is 'malloc' that is used (and not calloc), 'notify' is left
uninitialized.
By adding the line :
t->notify = (void (*)(GLcontext *, GLboolean)) notify;
Before the 'insert_at_tail' I experienced no more crashes.
I find it strange that nobody encoutered the same problem... Or
perhaps all Mesa CVS users are happy Voodoo 2 owners that do not
disable any extensions :-)
Let me know what you think....
--
Lionel Ulmer - [EMAIL PROTECTED] - http://www.multimania.com/bbrox/
_______________________________________________
Mesa-dev maillist - [EMAIL PROTECTED]
http://lists.mesa3d.org/mailman/listinfo/mesa-dev