$ gcc test2.c -o test2 -L /usr/local/lib/ -lGL -lGLU -lglut && gdb ./test2 GNU gdb (GDB) 7.5-ubuntu Copyright (C) 2012 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu". For bug reporting instructions, please see: ... Reading symbols from /home/lars/comcard/fxruby/opengl/opengl/test2...(no debugging symbols found)...done. (gdb) run Starting program: /home/lars/comcard/fxruby/opengl/opengl/test2 [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". [New Thread 0x7ffff3199700 (LWP 9545)] Program received signal SIGSEGV, Segmentation fault. _mesa_expand_bitmap (width=width@entry=8, height=height@entry=8, unpack=unpack@entry=0x655b68, bitmap=bitmap@entry=0x0, destBuffer=, destStride=destStride@entry=512, onValue=onValue@entry=0 '\000') at ../../src/mesa/main/image.c:428 428 if (*src & mask) { (gdb) bt #0 _mesa_expand_bitmap (width=width@entry=8, height=height@entry=8, unpack=unpack@entry=0x655b68, bitmap=bitmap@entry=0x0, destBuffer=, destStride=destStride@entry=512, onValue=onValue@entry=0 '\000') at ../../src/mesa/main/image.c:428 #1 0x00007ffff4020176 in unpack_bitmap (destStride=512, destBuffer=, bitmap=0x0, unpack=0x655b68, height=8, width=8, py=, px=, st=) at ../../src/mesa/state_tracker/st_cb_bitmap.c:273 #2 accum_bitmap (bitmap=0x0, unpack=0x655b68, height=8, width=8, y=0, x=0, st=) at ../../src/mesa/state_tracker/st_cb_bitmap.c:732 #3 st_Bitmap (ctx=, x=0, y=0, width=8, height=8, unpack=0x655b68, bitmap=0x0) at ../../src/mesa/state_tracker/st_cb_bitmap.c:767 #4 0x00007ffff3f554d5 in _mesa_Bitmap (width=8, height=8, xorig=, yorig=, xmove=, ymove=, bitmap=0x0) at ../../src/mesa/main/drawpix.c:347 #5 0x0000000000400bbd in init () #6 0x0000000000400c6f in main () (gdb) quit