[Mesa-dev] [PATCH] Fix for throwing BadDrawable (invalid Pixmap or Window parameter) by Xserver

Alexander Monakov amonakov at gmail.com
Thu Sep 5 07:40:45 PDT 2013


On Thu, Sep 5, 2013 at 6:25 PM, Maniak, Lukasz <lukasz.maniak at intel.com> wrote:
> Original explanatory text:
>
>     Fix for throwing BadDrawable (invalid Pixmap or Window parameter)
>     by Xserver when calling XCreatePixmap or fill_bitmap from
>     DRI_glXUseXFont.
>
>     currentDrawable which came from __glXGetCurrentContext was not correct in
>     this case, we use DefaultRootWindow(dpy) instead.
>
> To reproduce this error you just have to call this:
>
> dpy = (machine.display)->handle();
> fontStruct = XLoadQueryFont(dpy, "fixed");
> int firstGlyph = fontStruct->min_char_or_byte2;
> int dispListBase = 1;
> glXUseXFont(fontStruct->fid, firstGlyph, 1, dispListBase);

But it doesn't make sense to call glXUseXFont without a current context.

> And you will get this:
>
> X Error of failed request: BadDrawable (invalid Pixmap or Window parameter)
> Major opcode of failed request: 53 (X_CreatePixmap)
>
> Feedback from CC reporters would be really helpful.

Ian added me as the reporter of bug 54080, but that issue does not
reference glXUseXFont at all.

Alexander


More information about the mesa-dev mailing list