Jump to content
Eternal Lands Official Forums
Sign in to follow this  
pesca

Oh no - not again - segfault in shadows (latest from CVS)

Recommended Posts

Hello..

 

I get this error on startup (after loading map) with shadows ON (it crashes in shadows), but not always. Seems to depend on current position and tiles around. With shadows OFF the crash doesn't happen. Also, turning on shadows later in game at the same position doesn't crash the client.

 

Eye-candy is commented out in make.conf.

It's an amd64 on gentoo with nvidia 1.0-8776.

 

GNU gdb 6.6
Copyright (C) 2006 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu"...
Using host libthread_db library "/lib/libthread_db.so.1".
(gdb) run
Starting program: /usr/games/el133/el-test 
[Thread debugging using libthread_db enabled]
[New Thread 47176057775072 (LWP 5537)]
[New Thread 1082636608 (LWP 5540)]
[New Thread 1091029312 (LWP 5541)]
[New Thread 1099422016 (LWP 5542)]
[Thread 1091029312 (LWP 5541) exited]
[New Thread 1107814720 (LWP 5543)]
[Thread 1107814720 (LWP 5543) exited]


Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 47176057775072 (LWP 5537)]
0x00000000400019ad in ?? ()
(gdb) 
(gdb) where
#0  0x00000000400019ad in ?? ()
#1  0x0000000040002000 in ?? ()
#2  0x00002aaaab8d1b14 in ?? ()
#3  0x0000000000000006 in ?? ()
#4  0x0000000040002000 in ?? ()
#5  0x00002ae80786742c in ?? ()
  from //usr/lib64/opengl/nvidia/lib/libGLcore.so.1
#6  0x00002ae8075a6018 in ?? ()
  from //usr/lib64/opengl/nvidia/lib/libGLcore.so.1
#7  0x000000000040a97d in draw_3d_object_detail (object_id=0x7d5fcd0)
at 3d_objects.c:398
#8  0x000000000040ad05 in draw_3d_objects (object_type=11) at 3d_objects.c:603
#9  0x00000000004875eb in display_3d_ground_objects () at shadows.c:767
#10 0x00000000004882af in draw_sun_shadowed_scene (any_reflection=0)
at shadows.c:1203
#11 0x00000000004477ae in display_game_handler (win=0x36c45b0) at gamewin.c:630
#12 0x000000000043b355 in draw_window (win=0x36c45b0) at elwindows.c:1059
#13 0x000000000043b982 in display_window (win_id=0) at elwindows.c:1207
#14 0x0000000000438c9e in display_windows (level=1) at elwindows.c:57
#15 0x00000000004328fb in draw_scene () at draw_scene.c:98
#16 0x000000000045fccd in start_rendering () at main.c:123
#17 0x000000000045ffab in main (argc=1, argv=0x7fffa51904d8) at main.c:235
(gdb) up
#1  0x0000000040002000 in ?? ()
(gdb) up
#2  0x00002aaaab8d1b14 in ?? ()
(gdb) up
#3  0x0000000000000006 in ?? ()
(gdb) up
#4  0x0000000040002000 in ?? ()
(gdb) up
#5  0x00002ae80786742c in ?? ()
  from //usr/lib64/opengl/nvidia/lib/libGLcore.so.1
(gdb) up
#6  0x00002ae8075a6018 in ?? ()
  from //usr/lib64/opengl/nvidia/lib/libGLcore.so.1
(gdb) up
#7  0x000000000040a97d in draw_3d_object_detail (object_id=0x7d5fcd0)
at 3d_objects.c:398
398				glDrawArrays(GL_TRIANGLES, idx, num);
(gdb) print idx
$1 = 0
(gdb) print num
$2 = 6
(gdb) up
#8  0x000000000040ad05 in draw_3d_objects (object_type=11) at 3d_objects.c:603
603			draw_3d_object_detail(objects_list[l]);
(gdb) print objects_list[l]
$3 = (object3d *) 0x7d5fcd0
(gdb) x/ 0x7d5fcd0 
0x7d5fcd0:	0x64332f2e
(gdb) x/128 0x7d5fcd0 
0x7d5fcd0:	0x64332f2e	0x656a626f	0x2f737463	0x756f7267
0x7d5fce0:	0x6f5f646e	0x2f736a62	0x64616f72	0x6f74735f
0x7d5fcf0:	0x2e31656e	0x00643365	0x00000000	0x00000000
0x7d5fd00:	0x00000000	0x00000000	0x00000000	0x00000000
0x7d5fd10:	0x00000000	0x00000000	0x00000000	0x00000000
0x7d5fd20:	0x00000450	0x43204a7f	0x42f5c541	0x3c23d70a
0x7d5fd30:	0x00000000	0x00000000	0x42700000	0x3effffff
0x7d5fd40:	0x3f5db3d8	0x00000000	0x00000000	0xbf5db3d8
0x7d5fd50:	0x3effffff	0x00000000	0x00000000	0x00000000
0x7d5fd60:	0x00000000	0x3f800000	0x00000000	0x43204a7f
0x7d5fd70:	0x42f5c541	0x3c23d70a	0x3f800000	0x00010000
0x7d5fd80:	0x00000000	0x00000000	0x00000000	0x00000000
0x7d5fd90:	0x086da9f0	0x00000000	0x000004f3	0x00000000
0x7d5fda0:	0x076712a0	0x00000000	0x000069c3	0x00000000
0x7d5fdb0:	0x00000000	0x00000000	0x000000f1	0x00000000
0x7d5fdc0:	0x64332f2e	0x656a626f	0x2f737463	0x756f7267
0x7d5fdd0:	0x6f5f646e	0x2f736a62	0x64616f72	0x6f74735f
0x7d5fde0:	0x2e31656e	0x00643365	0x00000000	0x00000000
0x7d5fdf0:	0x00000000	0x00000000	0x00000000	0x00000000
0x7d5fe00:	0x00000000	0x00000000	0x00000000	0x00000000
0x7d5fe10:	0x00000451	0x43152486	0x430c02b8	0x3ca3d70a
0x7d5fe20:	0x00000000	0x00000000	0xc1200000	0x3f7c1c5c
0x7d5fe30:	0xbe31d0d4	0x00000000	0x00000000	0x3e31d0d4
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) quit
The program is running.  Exit anyway? (y or n) y

shadows.c is up-to-date:

(74609)$ ls -l /usr/src/el/elc/shadows.*
-rw-r--r-- 1 pesca users 37763 Apr  9 00:47 /usr/src/el/elc/shadows.c
-rw-r--r-- 1 pesca users  1867 Mar 17 13:20 /usr/src/el/elc/shadows.h
-rw-r--r-- 1 pesca users 31520 Apr  9 00:57 /usr/src/el/elc/shadows.o

Share this post


Link to post
Share on other sites

Darn. And I think I know what this is. It's another crash in glDrawArrays, like the shadowmap one. Earlier, when I fixed the reason for the shadowmap crash, I fixed the potential for it everywhere except in 3d_objects.c because the drawing code in there was pretty tangled. Instead, I put some big "WARNING"s in there and left it largely as it was.

 

Well, looks like that won't suffice. I'll have at this one this evening. Have you found a way to reproduce it so that we can know for sure when it's fixed?

 

Ed: Wow, these just keep coming, don't they? I was down to three, workaroundable or rare-situation bugs last night, and today we get a flood of new ones :huh:

Edited by KarenRei

Share this post


Link to post
Share on other sites

Likely fix in.

 

Ed: Fix removed; it was causing flickering. If I feel like it, I may try this one again, but I'd rather someone else do it.

Edited by KarenRei

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×