iluxa Report post Posted December 26, 2006 There is a bug, and it's even mentioned on forums, where EL client crashes on ATI Radeon cards, when it rains. This is actually ATI bug, but it'd be nice to work around it, since I don't see a fix coming out of them. I confirmed that commenting out call to function that renders rain works around it. Now I was trying to get to C2, and when I got to the place that is supposed to render the ship (or so I was told), I have 100% reproduceable crash (I die just as soon as I log in, since client tries to render that model). I tracked it down specifically to 3d_objects.c line 309: glDrawArrays(GL_TRIANGLES,array_order.start,array_order.count); when object_id->file_name is ./3dobjects/structures/ship2.e3d (this is in latest CVS) My username in the game is iluxa. You can check my coordinates/camera view direction to try to reproduce this. Oh, and I have Radeon R250 [Mobility FireGL 9000] (rev 02) graphics card, using X.Org version 7.1.1 and here is ATI driver info: ilya@iluxalaptop ~/games/elc $ fglrxinfo display: :0.0 screen: 0 OpenGL vendor string: ATI Technologies Inc. OpenGL renderer string: MOBILITY/RADEON 9000 DDR Generic OpenGL version string: 1.3.1091 (X4.3.0-8.27.6) Share this post Link to post Share on other sites
iluxa Report post Posted December 27, 2006 Some things that might be related: http://www.gamedev.net/community/forums/to...hichpage=1& (describes a bug in driver causing a crash when array is larger then 4000 elements) An interesting info on similar problem that Xgl sees when running on top of fglrx can also be found here: https://launchpad.net/distros/ubuntu/+sourc...-xgl/+bug/63830 I put together following patch based on info above, and it seems to work so far Index: 3d_objects.c =================================================================== RCS file: /cvsroot/elc/elc/3d_objects.c,v retrieving revision 1.105 diff -u -r1.105 3d_objects.c --- 3d_objects.c 14 Sep 2006 16:43:35 -0000 1.105 +++ 3d_objects.c 27 Dec 2006 02:25:36 -0000 @@ -296,6 +296,7 @@ materials_no=object_id->e3d_data->materials_no; for(i=0;i<materials_no;i++) { + int idx, max; get_and_set_texture_id(array_order.texture_id); #ifdef DEBUG // a quick check for errors @@ -306,7 +307,13 @@ array_order.start, array_order.count); } #endif // DEBUG - glDrawArrays(GL_TRIANGLES,array_order.start,array_order.count); + idx = array_order.start; + max = array_order.start+array_order.count; + while(idx < max) { + int num = max-idx < 1000 ? max-idx : 1000; + glDrawArrays(GL_TRIANGLES,idx,num); + idx += num; + } } glPopMatrix();//restore the scene Share this post Link to post Share on other sites
Learner Report post Posted January 17, 2007 Some things that might be related: http://www.gamedev.net/community/forums/to...hichpage=1& (describes a bug in driver causing a crash when array is larger then 4000 elements) An interesting info on similar problem that Xgl sees when running on top of fglrx can also be found here: https://launchpad.net/distros/ubuntu/+sourc...-xgl/+bug/63830 I put together following patch based on info above, and it seems to work so far Index: 3d_objects.c =================================================================== RCS file: /cvsroot/elc/elc/3d_objects.c,v retrieving revision 1.105 diff -u -r1.105 3d_objects.c --- 3d_objects.c 14 Sep 2006 16:43:35 -0000 1.105 +++ 3d_objects.c 27 Dec 2006 02:25:36 -0000 @@ -296,6 +296,7 @@ materials_no=object_id->e3d_data->materials_no; for(i=0;i<materials_no;i++) { + int idx, max; get_and_set_texture_id(array_order.texture_id); #ifdef DEBUG // a quick check for errors @@ -306,7 +307,13 @@ array_order.start, array_order.count); } #endif // DEBUG - glDrawArrays(GL_TRIANGLES,array_order.start,array_order.count); + idx = array_order.start; + max = array_order.start+array_order.count; + while(idx < max) { + int num = max-idx < 1000 ? max-idx : 1000; + glDrawArrays(GL_TRIANGLES,idx,num); + idx += num; + } } glPopMatrix();//restore the scene Several patches based on this have gone into e3d_objects.c, shadows.c, reflection.c and weather.c The weather specific patch might even stop the crashing when it rains for some ATI users! Share this post Link to post Share on other sites
iluxa Report post Posted January 18, 2007 I'll give it a try this weekend Share this post Link to post Share on other sites
iluxa Report post Posted January 21, 2007 OK. I can confirm that rain rendering works for me just fine now. Share this post Link to post Share on other sites