The following is my attempts to locate the bug. Sorry, it is a bit long, but I hope to be informative. I launched wine on Poser.exe. I also have difficulties with blender, but not the same kind. I am using Mesa-6.5.2 with the latest Ubuntu Feisty, I have not found any packet with 6.5.3 and my attempts to compile the original mesa failed -- there are too many patches for debian (why??). However, I feel that the bug does not rely on my specific distribution. Firstly, the original event : pierre@ios:~/wine/Poser$ wine Poser.exe main/renderbuffer.c:2041: _mesa_add_renderbuffer: l'assertion « bufferName == BUFFER_DEPTH || bufferName == BUFFER_STENCIL || fb->Attachment[bufferName].Renderbuffer == ((void *)0) » a echoue. wine: Assertion failed at address 0xffffe410 (thread 0009), starting debugger... Unhandled exception: assertion failed in 32-bit code (0xffffe410). Register dump: CS:0073 SS:007b DS:007b ES:007b FS:0033 GS:003b EIP:ffffe410 ESP:0033f550 EBP:0033f568 EFLAGS:00000206( - 00 - -IP1) EAX:00000000 EBX:00005790 ECX:00005790 EDX:00000006 ESI:0033f608 EDI:b7dd8ff4 Stack dump: 0x0033f550: 0033f568 00000006 00005790 b7cc5df0 0x0033f560: b7dd8ff4 b7c97a00 0033f694 b7cc7641 0x0033f570: 00000006 0033f608 00000000 00000130 0x0033f580: 7c40db08 00000000 00000000 b7d00dfd 0x0033f590: 0033f5cc 7d492ea8 7d492f0c 0033f6a4 0x0033f5a0: b7dd8ff4 000000c6 000000c7 0033f678 Backtrace: =>1 0xffffe410 (0x0033f568) 2 0xb7cc7641 abort+0x101() in libc.so.6 (0x0033f694) 3 0xb7cbf43b __assert_fail+0xfb() in libc.so.6 (0x0033f6d8) 4 0x7de37bac _mesa_add_renderbuffer+0x15c() in unichrome_dri.so (0x0033f6f8) 5 0x7ddd04c3 in unichrome_dri.so (+0x584c3) (0x0033f728) 6 0x7ddd0dea viaMakeCurrent+0x1ba() in unichrome_dri.so (0x0033f758) 7 0x7ddccfa9 in unichrome_dri.so (+0x54fa9) (0x0033f798) 8 0x7ed1e0ce glXMakeContextCurrent+0xbe() in libgl.so.1 (0x0033f808) 9 0x7ed1e3b3 glXMakeCurrent+0x23() in libgl.so.1 (0x0033f828) 10 0x7dffc327 X11DRV_wglMakeCurrent+0xd7() in winex11 (0x0033f888) 11 0x7e9527b3 wglMakeCurrent+0x63() in gdi32 (0x0033f8b8) 12 0x008e6819 in poser (+0x4e6819) (0x03ccc2b0) 13 0x00000000 (0x01501584) 14 0x00785c40 in poser (+0x385c40) (0x00785bb0) Not very clear, so I put some fprintf(stderr,... in src/mesa/drivers/dri/unichrome/via_context.c, especially in viaMakeCurrent, before and after the 2 calls to calculate_buffer_parameters, and : >>> fprintf(stderr,"viaMakeCurrent 1: calculate_buffer_parameters ?\n"); 858: if (!calculate_buffer_parameters(vmesa, drawBuffer, driDrawPriv)) { 859: return GL_FALSE; 860: } >>> fprintf(stderr,"viaMakeCurrent 1: calculate_buffer_parameters ok -> true\n"); There are two calls to calculate_buffer_parameters, but only the first one fails. and 220: if (!vmesa->front.Base.InternalFormat) { 221: /* do one-time init for the renderbuffers */ 222: viaInitRenderbuffer(&vmesa->front, GL_RGBA, dPriv); 223: viaSetSpanFunctions(&vmesa->front, &fb->Visual); >>> fprintf(stderr,"calculate_buffer_parameters 1 => add_renderbuffer BUFFER_FRONT_LEFT ?\n"); 224: _mesa_add_renderbuffer(fb, BUFFER_FRONT_LEFT, &vmesa->front.Base); >>> fprintf(stderr,"calculate_buffer_parameters 1 => add_renderbuffer BUFFER_FRONT_LEFT ok\n"); 225: 226: if (fb->Visual.doubleBufferMode) { and so on for the 3 other buffers. This is the dump (having removed the repetitions) : pierre@ios:~/wine/Poser 5$ wine Poser.exe viaMakeCurrent 1: calculate_buffer_parameters ? calculate_buffer_parameters 1 => add_renderbuffer BUFFER_FRONT_LEFT ? calculate_buffer_parameters 1 ok calculate_buffer_parameters 2 => add_renderbuffer BUFFER_BACK_LEFT ? calculate_buffer_parameters 2 ok calculate_buffer_parameters 3 => add_renderbuffer BUFFER_DEPTH ? calculate_buffer_parameters 3 ok calculate_buffer_parameters 4 => add_renderbuffer BUFFER_STENCIL ? calculate_buffer_parameters 4 ok viaMakeCurrent 1: calculate_buffer_parameters ok -> true ... viaMakeCurrent 1: calculate_buffer_parameters ? calculate_buffer_parameters 1 => add_renderbuffer BUFFER_FRONT_LEFT ? main/renderbuffer.c:2045: _mesa_add_renderbuffer: l'assertion « bufferName == BUFFER_DEPTH || bufferName == BUFFER_STENCIL || fb->Attachment[bufferName].Renderbuffer == ((void *)0) » a echoue. wine: Assertion failed at address 0xffffe410 (thread 0009), starting debugger... Clearly, the failure appears when vmesa->front.Base.InternalFormat == 0 and when bufferName == BUFFER_FRONT_LEFT. This means that there was an attachment with a renderbuffer in the current framebuffer and we are trying to add another. Just to remember the data structures : struct gl_renderbuffer_attachment { GLenum Type; /* GL_NONE or GL_TEXTURE or GL_RENDERBUFFER_EXT */ ... /* IF Type == GL_RENDERBUFFER_EXT: */ struct gl_renderbuffer *Renderbuffer; ... }; struct gl_framebuffer { ... struct gl_renderbuffer_attachment Attachment[BUFFER_COUNT]; ... }; Next, I added many prints of every parameters of type viaContext, gl_renderbuffer and gl_framebuffer in viaCreateContext(), viaMakeCurrent(), calculate_buffer_parameters() and _mesa_add_renderbuffer(). This is the result, very long. The actual hex addresses have been replaced by symbols (CONTEXT3...) ... (skipping the beginning) ... viaCreateContext() => vmesa=CONTEXT3 via_context vmesa=CONTEXT3 ->depthBits=24 &->front.Base=RENDERBUF3 gl_renderbuffer *rb=RENDERBUF3 ->InternalFormat=0 ->Name=0 ->Width=0,Height=0 ->viaScreen->width=1024, height=768 viaMakeCurrent(vmesa=CONTEXT3,drawBuffer=FRAMEBUF3) calculate_buffer_parameters(vmesa=CONTEXT3,fb=FRAMEBUF3): &vmesa->front.Base=RENDERBUF3 vmesa->front.Base.InternalFormat=0 via_context vmesa=CONTEXT3 ->depthBits=24 &->front.Base=RENDERBUF3 gl_renderbuffer *rb=RENDERBUF3 ->InternalFormat=0 ->Name=0 ->Width=0,Height=0 ->viaScreen->width=1024, height=768 gl_framebuffer *fb=FRAMEBUF3 ->Name=0 ->Width=640,Height=480 ->Attachment[FRONT]=0 IF==0 => calls to _mesa_add_renderbuffer() _mesa_add_renderbuffer(struct gl_framebuffer *fb=FRAMEBUF3,bufferName=0) =>_mesa_new_renderbuffer : RENDERBUF3 attached to fb...[0] _mesa_add_renderbuffer(struct gl_framebuffer *fb=FRAMEBUF3,bufferName=1) =>_mesa_new_renderbuffer : 7db0bcb8 attached to fb...[1] _mesa_add_renderbuffer(struct gl_framebuffer *fb=FRAMEBUF3,bufferName=8) =>_mesa_new_renderbuffer : 7db0bd64 attached to fb...[8] _mesa_add_renderbuffer(struct gl_framebuffer *fb=FRAMEBUF3,bufferName=9) =>_mesa_new_renderbuffer : 7db0be10 attached to fb...[9] viaCreateContext() => vmesa=CONTEXT4 via_context vmesa=CONTEXT4 ->depthBits=24 &->front.Base=RENDERBUF4 gl_renderbuffer *rb=RENDERBUF4 ->InternalFormat=0 ->Name=0 ->Width=0,Height=0 ->viaScreen->width=1024, height=768 viaMakeCurrent(vmesa=CONTEXT4,drawBuffer=FRAMEBUF3) calculate_buffer_parameters(vmesa=CONTEXT4,fb=FRAMEBUF3): vmesa->front.Base=RENDERBUF4 vmesa->front.Base.InternalFormat=0 via_context vmesa=CONTEXT4 ->depthBits=24 &->front.Base=RENDERBUF4 gl_renderbuffer *rb=RENDERBUF4 ->InternalFormat=0 ->Name=0 ->Width=0,Height=0 ->viaScreen->width=1024, height=768 ->driDrawable->w=640, h=480 gl_framebuffer *fb=FRAMEBUF3 ->Name=0 ->Width=640,Height=480 ->Attachment[FRONT]=RENDERBUF3 gl_renderbuffer *rb=RENDERBUF3 ->InternalFormat=6408 ->Name=0 ->Width=0,Height=0 IF==0 => calls to _mesa_add_renderbuffer() _mesa_add_renderbuffer(struct gl_framebuffer *fb=FRAMEBUF3,bufferName=0): THE ASSERT WOULD FAIL HERE (with my workaround, it does not fail, returns and continues) _mesa_add_renderbuffer(struct gl_framebuffer *fb=FRAMEBUF3,bufferName=1): no new renderbuffer _mesa_add_renderbuffer(struct gl_framebuffer *fb=FRAMEBUF3,bufferName=8) =>_mesa_new_renderbuffer : 7d56a484 attached to fb _mesa_add_renderbuffer(struct gl_framebuffer *fb=FRAMEBUF3,bufferName=9) =>_mesa_new_renderbuffer : 7d56a530 attached to fb calculate_buffer_parameters(vmesa=CONTEXT4,fb=FRAMEBUF3)=> gl_framebuffer *fb=FRAMEBUF3 ->Name=0 ->Width=640,Height=480 ->Attachment[FRONT]=RENDERBUF3 = gl_renderbuffer *rb=RENDERBUF3 ->InternalFormat=6408 ->Name=0 ->Width=0,Height=0 gl_renderbuffer *rb=RENDERBUF4 ->InternalFormat=6408 ->Name=0 ->Width=0,Height=0 Finally, I quote these lines in via_context.c /* Normally, the renderbuffer would be added to the framebuffer just once * when the framebuffer was created. The VIA driver is a bit funny * though in that the front/back/depth renderbuffers are in the per-context * state! * That should be fixed someday. Not so funny to my opinion... ; -) But with the help of everyone, we will fix this.