From: John F. F. <joh...@cy...> - 2012-03-27 11:32:43
|
Clemens, Thank you very much for your interest in "freeglut" and for your error reports. It appears at the moment that the error is in the "i965_dri.so" library rather than in "freeglut". What is this library and what does it do? - John F. On 3/27/2012 4:10 AM, Clemens Schäfermeier wrote: > Hi, > I did some further testing about the previously mentioned issue. Here's a > minimal file which also raises the error: > -------------------------------------- > #include<stdio.h> > #include<stdlib.h> > #include<GL/freeglut.h> > > void keyboard(unsigned char key, const int x, const int y); > void display(void); > > int main(int argc, char** argv) > { > glutInit(&argc,argv); > glutInitDisplayMode(GLUT_DOUBLE|GLUT_RGBA|GLUT_DEPTH|GLUT_MULTISAMPLE); > glutCreateWindow("GLUT Test"); > > glEnable(GL_DEPTH_TEST); > glDepthFunc(GL_LEQUAL); > > glEnable(GL_BLEND); > glBlendFunc(GL_SRC_ALPHA,GL_ONE_MINUS_SRC_ALPHA); > > glClearColor(0.,0.,0.,0.); > glClearDepth(1.); > > glutSetOption(GLUT_ACTION_ON_WINDOW_CLOSE,GLUT_ACTION_GLUTMAINLOOP_RETURNS); > glutKeyboardFunc(&keyboard); > glutDisplayFunc(&display); > glutMainLoop(); > > return EXIT_SUCCESS; > } > > void keyboard(unsigned char key, const int x, const int y) > { > switch (key) > { > case 27: > glutLeaveMainLoop(); > break; > } > } > > void display() > { > glClear(GL_COLOR_BUFFER_BIT|GL_DEPTH_BUFFER_BIT); > > glMatrixMode(GL_PROJECTION); > glLoadIdentity(); > glOrtho(-5,5,-5,5,-2,2); > > glColor3f(1.,0.,0.); > > glBegin(GL_POLYGON); > glVertex2d(-.5,.5); > glVertex2d(-.5,-.5); > glVertex2d(.5,-.5); > glVertex2d(.5,.5); > glEnd(); > > glRasterPos3d(1.05,0.,0.); > glutBitmapCharacter(GLUT_BITMAP_8_BY_13,'x'); > glRasterPos3d(0.,0.,1.05); > glutBitmapCharacter(GLUT_BITMAP_8_BY_13,'y'); > glRasterPos3d(0.,1.05,0.); > glutBitmapCharacter(GLUT_BITMAP_8_BY_13,'z'); > > glFlush(); > glutSwapBuffers(); > } > -------------------------------------- > > If the > glEnable(GL_DEPTH_TEST); > call is commented out, there's no error from valgrind. I certainly missed > something about the GL_DEPTH_TEST which is not freeglut specific?! In that > case, sorry for my mails... > > Clemens > > PS: I've attached an updated summary of the valgrind report. > > > ==2684== Invalid write of size 1 > ==2684== at 0x4027418: memcpy (mc_replace_strmem.c:497) > ==2684== by 0x4A178B5: ??? (in /usr/lib/dri/i965_dri.so) > ==2684== by 0x4071C5A: glutBitmapCharacter (freeglut_font.c:122) > ==2684== by 0x4079A61: fghcbDisplayWindow (freeglut_main.c:207) > ==2684== Address 0xb7726007 is not stack'd, malloc'd or (recently) free'd > > ==2684== Invalid write of size 1 > ==2684== at 0x4027420: memcpy (mc_replace_strmem.c:497) > ==2684== by 0x4A178B5: ??? (in /usr/lib/dri/i965_dri.so) > ==2684== by 0x4071C5A: glutBitmapCharacter (freeglut_font.c:122) > ==2684== by 0x4079A61: fghcbDisplayWindow (freeglut_main.c:207) > ==2684== Address 0xb7726006 is not stack'd, malloc'd or (recently) free'd > > ==2684== Invalid write of size 1 > ==2684== at 0x4027429: memcpy (mc_replace_strmem.c:497) > ==2684== by 0x4A178B5: ??? (in /usr/lib/dri/i965_dri.so) > ==2684== by 0x4071C5A: glutBitmapCharacter (freeglut_font.c:122) > ==2684== by 0x4079A61: fghcbDisplayWindow (freeglut_main.c:207) > ==2684== Address 0xb7726005 is not stack'd, malloc'd or (recently) free'd > > ==2684== Invalid write of size 1 > ==2684== at 0x4027432: memcpy (mc_replace_strmem.c:497) > ==2684== by 0x4A178B5: ??? (in /usr/lib/dri/i965_dri.so) > ==2684== by 0x4071C5A: glutBitmapCharacter (freeglut_font.c:122) > ==2684== by 0x4079A61: fghcbDisplayWindow (freeglut_main.c:207) > ==2684== Address 0xb7726004 is not stack'd, malloc'd or (recently) free'd > > ==2684== Invalid write of size 4 > ==2684== by 0x4A178B5: ??? (in /usr/lib/dri/i965_dri.so) > ==2684== by 0x4071C5A: glutBitmapCharacter (freeglut_font.c:122) > ==2684== by 0x4079A61: fghcbDisplayWindow (freeglut_main.c:207) > ==2684== by 0x407D46E: fgEnumWindows (freeglut_structure.c:396) > ==2684== Address 0xb7726040 is not stack'd, malloc'd or (recently) free'd > > > > ------------------------------------------------------------------------------ > This SF email is sponsosred by: > Try Windows Azure free for 90 days Click Here > http://p.sf.net/sfu/sfd2d-msazure > _______________________________________________ > Freeglut-developer mailing list > Fre...@li... > https://lists.sourceforge.net/lists/listinfo/freeglut-developer > > |