Bug 125703 - X server seg faults and restarts when drawing to X11 pixmap using GLX and OpenGL
Summary: X server seg faults and restarts when drawing to X11 pixmap using GLX and OpenGL
Alias: None
Product: Fedora
Classification: Fedora
Component: xorg-x11   
(Show other bugs)
Version: 2
Hardware: athlon
OS: Linux
Target Milestone: ---
Assignee: Mike A. Harris
QA Contact:
: 125276 (view as bug list)
Depends On:
TreeView+ depends on / blocked
Reported: 2004-06-10 13:19 UTC by Andrew Roberts
Modified: 2007-11-30 22:10 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2004-12-23 19:11:30 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
C source code to reproduce problem on FC2 when drawing to pixmap (2.88 KB, text/plain)
2004-06-10 20:43 UTC, Andrew Roberts
no flags Details

Description Andrew Roberts 2004-06-10 13:19:28 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET 
CLR 1.1.4322)

Description of problem:
When rendering OpenGL graphics to an X11 Pixmap the X server crashes 
and restarts. Drawing to an X11 Window is fine. The same code runs 
perfectly under Fedora Core 1. The problem occurs on both an athlon 
running the i386 version of Fedora Core 2 and an Athlon 64 running 
the x86_64 version. The i386 machine has a Matrox G400 video card and 
the x86_64 machine has a Nvidia 5900 graphics card. Both machines are 
using Mesa rather than any 3rd party hardware accelerated GL drivers.

This issue may relate to either the change from the XFree86 to the 
X11.Org X server or be related to moving from the 2.4 to the 2.6 
kernel. It certainly isn't related to the machine architecture or the 
graphics card.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.Create X11 Window using GLX supported Visual and colourmap
2.Create X11 Pixmap based on X11 Window
3.Create GLX Pixmap based on the X11 Pixmap
4.Create GLX rendering context based on GLX pixmap
5.Render OpenGL graphics to the context

Actual Results:  The X server crashes with a seqfault and restarts.

Expected Results:  You get your OpenGL picture in the X11 pixmap

Additional info:

Comment 1 Andrew Roberts 2004-06-10 20:43:53 UTC
Created attachment 101045 [details]
C source code to reproduce problem on FC2 when drawing to pixmap

The attached program can be build using:

gcc -O0 -o glxpixmap -Wall glxpixmap.c -I/usr/X11R6/include -lGLU -lGL
-L/usr/X11R6/lib -lX11

It draws to a Window by default which works. If you want the X server to crash
alter bToPixmap to be 1 (near the top of the file). This draws to a GLXPixmap
and causes the X server to segfault when calling:
glXMakeCurrent(pDisplay, None, NULL)

Comment 2 Mike A. Harris 2004-07-07 07:48:18 UTC
*** Bug 125276 has been marked as a duplicate of this bug. ***

Comment 3 Sean Bruno 2004-07-09 18:35:09 UTC
Interesting, I was seeing a similar issue after updating xorg to the
latest updates.

I was running America's Army with the closed source nvidia drivers. 
The game was exiting with a strange error that I had never seen before:

GL_EXT_bgra not supported - bailing out

At the suggestion of some of the folks on the America's Army mailing
list, I removed the "mesa" GL libraries.  The problem went away at
that point!?!?

Does this sound like the same issue, or is this a different issue?

Comment 4 Jaakko Hyvätti 2004-09-21 08:57:50 UTC
See this resolved bug entry at Freedesktop.org for solution for the
glXMakeCurrent(pDisplay, None, NULL) crash:


There is a patch:


..and it has been checked into X.org tree by Kevin E. Martin  2004-08-09.

Comment 5 Mike A. Harris 2004-09-21 09:13:53 UTC
Thanks for the update Jaakko.

Marking bug to investigate patch as a candidate for future FC2
xorg-x11 update.

Comment 6 Mike A. Harris 2004-09-21 09:14:43 UTC
Reassigning to myself.

Comment 7 Jon Knight 2004-09-30 19:50:55 UTC
I've seen similar things on a couple of machines. I use Coin3D (open
source OpenInventor clone library) and on my FC2 upgraded boxes any of
my code that uses SoOffScreenRenderer (which is quite a bit) blows up
the X server as soon as it tries to render into the in-memory buffer.
 Luckily my main development box is using an Nvidia 3rd party driver
which nukes the Fedora GLX libraries and so works fine.  Phew...

FWIW, the machines that it does not work on are an 800MHz Athlon box
with 512MB of RAM and a variety of different old crappy graphics cards
(Matrox G100 Productiva, ATI Rage3D, etc), and a 1GHz Pentium III
machine with 256MB RAM and a Rage 128 Pro Ultra TF graphics card.

Comment 9 Mike A. Harris 2004-12-23 19:11:30 UTC
Fixed in FC-3 and newer OS releases now, so setting status to
"CURRENTRELEASE".  I have also checked this patch into internal CVS
for build xorg-x11-6.7.0-12, which will be included in the next
erratum for FC2.

Comment 10 Mike A. Harris 2005-01-25 13:31:38 UTC
The upstream patch was broken.  I've fixed it and put it in
xorg-x11-6.7.0-13, again pending future erratum.

(Detected during build testing)

Note You need to log in before you can comment on or make changes to this bug.