Quoted nico <sl1200mk2@gmail.com>:
hi, first of all, many thanks for your great job !!
i had this error : X Error of failed request : BadIDChoice (invalid resource ID chosen for this connection) Major opcode of failed request: 148 (RENDER) Minor opcode of failed request: 4 (RenderCreatePicture) Resource id in failed request: 0xa876d1 Serial number of failed request: 2704569 Current serial number in output stream: 2704572
this error happens sometimes, with no particular reason, and that's a very bad point!!! it lead my app to close immediately. i'm using XQuartz with TK. this error happened with 2.3.2.1 and 2.3.3 rc3
can you please have a look to this and guide me to find the bug because i don't know wich one of my C code, or TK or XQuartz is faulty....
best regards nico __________________________
Hi Nico, I believe I may have seen this error before in the context of Tk. I'm a Tk maintainer/developer on SourceForge. Are you trying to draw text with something like Tk_DrawChars? Be aware that Tk for X11 will fail if you try to draw to a 1-bit deep Pixmap. This is a regression in Tk that occurred in 8.5, when the libXft-based text rendering was added. libXft IIRC uses Render. I wrote a patch for this issue that solved the problem for some users that used BLT and other extensions, but the other Tk developers thought the fix was too costly, and believed it would harm network Tk performance. Unfortunately there isn't a better way of solving the problem, and it certainly hasn't been solved by the other developers, so if this is the problem, you should use a deeper Pixmap, or --disable-xft. An easy way to confirm if the problem is caused by what I suspect it is, is to configure Tk with --disable-xft. This is from the tk/unix/README: --disable-xft Disable support for antialiased fonts via the Freetype/xft library. By default, this is switched on whenever the configure script can detect the required libraries. If the problem goes away, then look for pixmaps with limited depth, and try to use 8 or more as a depth. The patch I seem to have deleted, but it basically worked by using a different libXft function for 1-bit deep pixmaps, based on the XGetGeometry depth result for a drawable. The unfortunate problem was that there wasn't a way of exposing or caching the depth, because XIDs (used for Pixmap identifiers) are reused after destruction, and there wasn't enough information passed to the text drawing code. The XC-MISC extension provides the reuse of XIDs to clients automatically. It used to be that X11 didn't reuse XIDs (before XC-MISC was added as an extension), and apps that ran a long time would eventually exhaust all space, but for the last 10-15 years that hasn't been so. George -- http://people.freedesktop.org/~gstaplin/