<html>
<head>
<base href="https://bugs.freedesktop.org/" />
</head>
<body>
<p>
<div>
<b><a class="bz_bug_link
bz_status_NEW "
title="NEW - glXQueryDrawable fails with GLXBadDrawable for a Window in direct context"
href="https://bugs.freedesktop.org/show_bug.cgi?id=54080#c6">Comment # 6</a>
on <a class="bz_bug_link
bz_status_NEW "
title="NEW - glXQueryDrawable fails with GLXBadDrawable for a Window in direct context"
href="https://bugs.freedesktop.org/show_bug.cgi?id=54080">bug 54080</a>
from <span class="vcard"><a class="email" href="mailto:adrian.m.negreanu@intel.com" title="Adrian Negreanu <adrian.m.negreanu@intel.com>"> <span class="fn">Adrian Negreanu</span></a>
</span></b>
<pre>Created <span class=""><a href="attachment.cgi?id=107229" name="attach_107229" title="call SendMakeCurrent.">attachment 107229</a> <a href="attachment.cgi?id=107229&action=edit" title="call SendMakeCurrent.">[details]</a></span> <a href='page.cgi?id=splinter.html&bug=54080&attachment=107229'>[review]</a>
call SendMakeCurrent.
With the 0001-SendMakeCurrent, the error goes away, but causes an Xorg segfault
when glxgears exits.
(gdb) bt
#0 in ?? ()
#1 in glxClientCallback (list=<optimized out>, closure=<optimized out>,
data=<optimized out>) at xserver/glx/glxext.c:291
#2 in _CallCallbacks (pcbl=pcbl@entry=0x5555559a5d60 <ClientStateCallback>,
call_data=call_data@entry=0x7fffffffd9f0) at xserver/dix/dixutils.c:718
#3 in CallCallbacks (call_data=0x7fffffffd9f0, pcbl=0x5555559a5d60
<ClientStateCallback>) at xserver/include/callback.h:83
#4 CloseDownClient (client=client@entry=0x5555560d5f10) at
xserver/dix/dispatch.c:3381
#5 in Dispatch () at xserver/dix/dispatch.c:444
#6 in dix_main (argc=4, argv=0x7fffffffdbe8, envp=<optimized out>) at
xserver/dix/main.c:296
#7 in __libc_start_main (main=0x5555555994e0 <main>, argc=4,
argv=0x7fffffffdbe8, init=<optimized out>, fini=<optimized out>,
rtld_fini=<optimized out>, stack_end=0x7fffffffdbd8) at libc-start.c:287
#8 in _start ()
xserver/glx/glxext.c:291 looks like this
286 case ClientStateGone:
287 /* detach from all current contexts */
288 for (c = glxAllContexts; c; c = next) {
289 next = c->next;
290 if (c->currentClient == pClient) {
<span class="quote">>291 c->loseCurrent(c);</span >
292 lastGLContext = NULL;
293 c->currentClient = NULL;
294 __glXFreeContext(c);
295 }
296 }
but c->loseCurrent is NULL, as most of the other fields of `c', except a few,
like destroy and isDirect.
For dri2, loseCurrent should be __glXDRIcontextLoseCurrent, set by
__glXDRIscreenCreateContext (by looking at xserver/glx/glxdri2.c)
But GLXscreen::createContext is called only when !isDirect
by DoCreateContext in xserver/glx/glxcmds.c
by __glXDisp_CreateContextAttribsARB in ./glx/createcontext.c</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>