Patch that sort out OpenGL-related issue in IcedTea6 HEAD (was: Possible regression between IcedTea6-1.8 and IcedTea6-1.9)

Pavel Tisnovsky ptisnovs at
Mon Aug 30 09:12:08 PDT 2010

Hi all,

can anybody please review simple patch which in the end ensures that
method glGetString(GL_VENDOR) etc. is called only when rendering context
is properly configured. When glGetString() is called for uninitialized
rendering context, it is possible that application got SIGSEGV because
OpenGL standard does not specify correct behaviour in this case.

The patch is based on actual OpenJDK7 sources and it's behaviour can be
tested by this simple test:

import javax.swing.JFrame;

public class Test extends JFrame {
    public Test() {
        System.out.println("Nothing happens");

    public static void main(String[] args)
        Test t = new Test();
        System.out.println("Test Passed.");

(must be run with -Dsun.java2d.opengl=True option)


PS: if anybody is interested whether his OpenGL implementation
segfaulted (RHEL5 and its Mesa 6.5.1 case, for example), this C test can
be useful:

#include <GL/gl.h>
#include <stdlib.h>
#include <stdio.h>

int main(void)
    printf("%x\n", glXGetCurrentContext());
    return 0;

(must be compiled with -lGL and -lX11 options)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: opengl-xxx.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
Url : 

More information about the distro-pkg-dev mailing list