From: Brian P. <br...@tu...> - 2002-03-13 04:53:54
|
"Johnson, Sheila" wrote: > > Hi, > > The application I am running is a C/C++ application that uses Motif and > OpenGL on the Sun and the SGI platforms and runs fine. > I am now porting this program to the PC running on Red Hat Linux version > 7.1. I am using OpenMotif version 2.1.30-8 and Mesa > version 4.0.1. I have several functions that use glNewList, glCallList and > glEndList and on occassion the glCallList and the glEndList > functions result in Segmentation Fault (core dumped). The program typically > core dumps after it has been running for a while. > Below is an example of one of the functions that results in a core dump. > Any insight in to what might be the problem will surely > be appreciated. > > GLuint GRID_OBJ; > int CE_hitag[36]; > int BLACK, WHITE; > > make_grid_obj() > { > int x_pos, y_pos, grid, i, j, var; > > x_pos = 0; > grid = 0; > > glNewList(GRID_OBJ, GL_COMPILE); > glPushName(-1); > for (i = 1; i <= 2; ++i) > { > y_pos = 25250; > for (j = 1; j <= 6; ++j, ++grid) > { > glLoadName((grid+1)*1000); > for ( var = 0; var < 3; ++var) > { > glPushName((var)*100); > CE_hitag[grid*3+var] = BLACK; > glIndexi(BLACK); > glRecti(x_pos+100, y_pos, x_pos+21900, y_pos+850); > glPopName(); > y_pos -= 1000; > } > y_pos -= 1500; > } > x_pos = 22000; > } > glPopName(); > glIndexi(WHITE); > glEndList(); > } > > Thank you for your time, Could you try commenting-out the glLoad/Push/PopName() functions and see what happens? If it still crashes, try commenting out glRect(). I looked at Mesa's display list code and didn't see anything wrong but it's possible there's a bug there. If you can write a simple GLUT test program that would help me. -Brian |