tech-x11 archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

glut segmentation fault



I hope that this program is too short to contain a bug:

#include <GL/glut.h>

int
main(int argc, char *argv[])
{
        int window;

        glutInit(&argc, argv);

        glutInitDisplayMode(GLUT_RGB);
        glutInitWindowSize(400,500);
        window = glutCreateWindow("Bug");

        return 0;
}

Compiled with this little Makefile:

PROG=bug
CPPFLAGS+=-I/usr/X11R7/include
DBG=-g -O0 -Wall
LDFLAGS+=-Wl,-R/usr/X11R7/lib -L/usr/X11R7/lib
LDADD+=-lglut -lGLU -lGL -lXi -lXmu -lX11 -lXext -lm
MKMAN=no
.include <bsd.prog.mk>

I see on a -current/amd64 sandy bridge with native X:

Program terminated with signal SIGSEGV, Segmentation fault.
#0  0x00007f7ff646471f in XQueryExtension () from /usr/X11R7/lib/libX11.so.7
(gdb) bt
#0  0x00007f7ff646471f in XQueryExtension () from /usr/X11R7/lib/libX11.so.7
#1  0x00007f7ff6463d42 in XInitExtension () from /usr/X11R7/lib/libX11.so.7
#2  0x00007f7ff7050c8d in __glXInitialize () from /usr/X11R7/lib/libGL.so.2
#3  0x00007f7ff70533f5 in GetGLXDRIDrawable () from /usr/X11R7/lib/libGL.so.2
#4  0x00007f7ff7057e73 in ?? () from /usr/X11R7/lib/libGL.so.2
#5  0x00007f7ff0ef1665 in ?? () from /usr/X11R7/lib/modules/dri/i965_dri.so
#6  0x00007f7ff0ef18fa in intel_update_renderbuffers ()
   from /usr/X11R7/lib/modules/dri/i965_dri.so
#7  0x00007f7ff0ef1d1d in intel_prepare_render ()
   from /usr/X11R7/lib/modules/dri/i965_dri.so
#8  0x00007f7ff78271ca in __glutCreateWindow ()
   from /usr/X11R7/lib/libglut.so.4
#9  0x00007f7ff7827370 in glutCreateWindow () from /usr/X11R7/lib/libglut.so.4
#10 0x0000000000400ae5 in main (argc=1, argv=0x7f7fffffdbf8) at bug.c:12

Go digging, or does something need updating?

Cheers,

Patrick


Home | Main Index | Thread Index | Old Index