Jump to content
Eternal Lands Official Forums
bluap

Possible problem with use_shadow_mapping

Recommended Posts

I'm using the latest CVS client code on Linux, Debian Etch (in rather a state of flux due to approaching release) - OK this could be my problem but just in case I'll continue. 2.6.18-4-686 kernel, Nvidia driver 1.0.8776. The release 1.33 static client works fine.

 

A couple of days ago, I started having problems starting the CVS built client, it SEGVs just after the login screen, just before the game window displays. I've tried compiling with debug and following though gdb but the code appears to be stopping in a dead thread. I'll try more debugging....

 

I was initially confused because I could get into the test server without a problem, I only had the crash on the live server. I eventually thought I'd tied it down to the #isometric= 0, if set to 1, I was OK. Later, I could log in without a problem with this set either way. I went a couple of days playing without problems, then tonight the crashing started again.

 

I now think the issue is with #use_shadow_mapping=1, #isometric makes no difference. Its currently daylight on the main server, the client crashes on start up, if I start inside a room, its fine. Again at the moment the test server is OK buts its EL night there. I'm assuming if I wait for EL night time on the live server the client will be fine. I conclude that if shadows are drawn the client crashes. However, only on start up because I can enable #use_shadow_mapping=1 once the client has started and it works fine until a restart.

 

Presence/lack of shadows fits all the facts so I'm going to play with #use_shadow_mapping=0 for a while. If a recent client change has modify the behaviour for #use_shadow_mapping=1 then may be there's a bug.

 

Thanks for sticking with my long winded explanation. :)

Share this post


Link to post
Share on other sites

I'm using the latest CVS client code on Linux, Debian Etch (in rather a state of flux due to approaching release) - OK this could be my problem but just in case I'll continue. 2.6.18-4-686 kernel, Nvidia driver 1.0.8776. The release 1.33 static client works fine.

 

In addition: GeForce4 Ti 4200 AGP 8x Graphics card 128MB, Pentium 2.4Mhz, 1GB RAM.

 

Compile options, the default. I had already done a clean download from CVS and a rebuild:

FEATURES=PNG_SCREENSHOT USE_FRAMEBUFFER NEW_FRUSTUM BUG_FIX_3D_OBJECTS_MIN_MAX NEW_TEX OPTIONS_I18N ATI_9200_FIX NEW_ACTOR_ANIMATION AUTO_UPDATE COUNTERS FONTS_FIX COMMENT_BUFFER AFK_FIX CUSTOM_LOOK CUSTOM_UPDATE SIMPLE_LOD SFX USE_ACTOR_DEFAULTS NOTEPAD USE_INLINE

 

I've modified Makefile.linux to use gcc 3.3 as version 4 gives loads of warnings.

 

[paul@ron elc]$ gcc-3.3 -v

Reading specs from /usr/lib/gcc-lib/i486-linux-gnu/3.3.6/specs

Configured with: ../src/configure -v --enable-languages=c,c++ --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-gxx-include-dir=/usr/include/c++/3.3 --enable-shared --enable-__cxa_atexit --with-system-zlib --enable-nls --without-included-gettext --enable-clocale=gnu --enable-debug i486-linux-gnu

Thread model: posix

gcc version 3.3.6 (Debian 1:3.3.6-15)

 

Limited use but some version numbers:

 

[paul@ron elc]$ ldd el.x86.linux.bin

linux-gate.so.1 => (0xffffe000)

libSDL-1.2.so.0 => /usr/lib/libSDL-1.2.so.0 (0xb7ea4000)

libxml2.so.2 => /usr/lib/libxml2.so.2 (0xb7d8a000)

libSDL_net-1.2.so.0 => /usr/lib/libSDL_net-1.2.so.0 (0xb7d85000)

libopenal.so.0 => /usr/lib/libopenal.so.0 (0xb7d49000)

libGL.so.1 => /usr/lib/libGL.so.1 (0xb7cc4000)

libGLU.so.1 => /usr/lib/libGLU.so.1 (0xb7c45000)

libvorbis.so.0 => /usr/lib/libvorbis.so.0 (0xb7c1d000)

libvorbisfile.so.3 => /usr/lib/libvorbisfile.so.3 (0xb7c16000)

libcal3d.so.11 => /usr/lib/libcal3d.so.11 (0xb7b9b000)

libm.so.6 => /lib/tls/libm.so.6 (0xb7b76000)

libpng12.so.0 => /usr/lib/libpng12.so.0 (0xb7b53000)

libalut.so.0 => /usr/lib/libalut.so.0 (0xb7b4c000)

libc.so.6 => /lib/tls/libc.so.6 (0xb7a1a000)

libX11.so.6 => /usr/lib/libX11.so.6 (0xb792e000)

libstdc++.so.6 => /usr/lib/libstdc++.so.6 (0xb7848000)

libdl.so.2 => /lib/tls/libdl.so.2 (0xb7844000)

libdirectfb-0.9.so.25 => /usr/lib/libdirectfb-0.9.so.25 (0xb77ed000)

libfusion-0.9.so.25 => /usr/lib/libfusion-0.9.so.25 (0xb77e7000)

libdirect-0.9.so.25 => /usr/lib/libdirect-0.9.so.25 (0xb77d8000)

libvga.so.1 => /usr/lib/libvga.so.1 (0xb7778000)

libpthread.so.0 => /lib/tls/libpthread.so.0 (0xb7765000)

libz.so.1 => /usr/lib/libz.so.1 (0xb7751000)

libGLcore.so.1 => /usr/lib/libGLcore.so.1 (0xb6f8e000)

libnvidia-tls.so.1 => /usr/lib/tls/libnvidia-tls.so.1 (0xb6f8c000)

libXext.so.6 => /usr/lib/libXext.so.6 (0xb6f7e000)

libgcc_s.so.1 => /lib/libgcc_s.so.1 (0xb6f72000)

libogg.so.0 => /usr/lib/libogg.so.0 (0xb6f6d000)

/lib/ld-linux.so.2 (0xb7f76000)

libXau.so.6 => /usr/lib/libXau.so.6 (0xb6f6a000)

libXdmcp.so.6 => /usr/lib/libXdmcp.so.6 (0xb6f65000)

 

Anything else, let me know.

 

Edit2: Its now night time on the live server and day time on the test server. With #use_shadow_mapping=1 the live server is OK but the client crashes on the test server. Both are OK with it =0.

Edited by bluap

Share this post


Link to post
Share on other sites

Is it possible to run it under gdb and see where it crashes?

As I said, I tried that but the result was inconclusive even with debug enabled, apparently in a dead thread. Here's what I get:

 

[paul@ron elc]$ gdb el.x86.linux.bin

GNU gdb 6.4.90-debian

Copyright © 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 "i486-linux-gnu"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

 

(gdb) run

Starting program: /home/paul/el/elc/el.x86.linux.bin

Failed to read a valid object file image from memory.

[Thread debugging using libthread_db enabled]

[New Thread -1225725632 (LWP 1415)]

[New Thread -1252795472 (LWP 1424)]

[New Thread -1261184080 (LWP 1425)]

[Thread -1261184080 (zombie) exited]

[New Thread -1269572688 (LWP 1426)]

 

Program received signal SIGSEGV, Segmentation fault.

[switching to Thread -1225725632 (LWP 1415)]

0xb7f1cf50 in ?? ()

(gdb) where

#0 0xb7f1cf50 in ?? ()

#1 0x00000000 in ?? ()

(gdb) thread

[Current thread is 1 (Thread -1225725632 (LWP 1415))]

(gdb) t 2

[switching to thread 2 (Thread -1252795472 (LWP 1424))]#0 0xb7a5305c in nanosleep () from /lib/tls/libc.so.6

(gdb) where

#0 0xb7a5305c in nanosleep () from /lib/tls/libc.so.6

#1 0xb7eae7b1 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#2 0xb7eae801 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#3 0xb7e5e82b in SDL_GetThreadID () from /usr/lib/libSDL-1.2.so.0

#4 0xb7eabc8d in SDL_ThreadID () from /usr/lib/libSDL-1.2.so.0

#5 0xb77150bd in start_thread () from /lib/tls/libpthread.so.0

#6 0xb7a909ee in clone () from /lib/tls/libc.so.6

(gdb) t 3

Thread ID 3 not known.

(gdb) t 4

[switching to thread 4 (Thread -1269572688 (LWP 1426))]#0 0xb7a896a7 in select

() from /lib/tls/libc.so.6

(gdb) where

#0 0xb7a896a7 in select () from /lib/tls/libc.so.6

#1 0xb7d32034 in SDLNet_CheckSockets () from /usr/lib/libSDL_net-1.2.so.0

#2 0x080a6811 in get_message_from_server (thread_args=0x8275b90)

at multiplayer.c:1298

#3 0xb7e5e82b in SDL_GetThreadID () from /usr/lib/libSDL-1.2.so.0

#4 0xb7eabc8d in SDL_ThreadID () from /usr/lib/libSDL-1.2.so.0

#5 0xb77150bd in start_thread () from /lib/tls/libpthread.so.0

#6 0xb7a909ee in clone () from /lib/tls/libc.so.6

(gdb) quit

The program is running. Exit anyway? (y or n) y

 

 

I also just did an strace on the client process, started just before pressing enter at the login screen. The last few lines from this are here:

 

gettimeofday({1173346807, 928882}, NULL) = 0

gettimeofday({1173346807, 928919}, NULL) = 0

open("./3dobjects/ground_objs/desertplants.bmp", O_RDONLY) = 16

fstat64(16, {st_mode=S_IFREG|0644, st_size=66616, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb3487000

read(16, "BM8\4\1\0\0\0\0\0006\4\0\0(\0\0\0\0\1\0\0\0\1\0\0\1\0\10"..., 4096) = 4096

mmap2(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb3446000

read(16, "\273\370\351\305\305\354\343\343\273\305\305\321\5\5\5"..., 4096) = 4096

read(16, "\5\321\305\305\353\371\273\5\370\376\354\305\346\321\5"..., 4096) = 4096

read(16, "\5\5\5\5\5\273\273\273\5\373\354\305\370\5\5\5\5\5\5\5"..., 4096) = 4096

read(16, "\305\353\375\371\321\5\321\305\351\273\266\373\321\5\5"..., 4096) = 4096

read(16, "\5\354\354\351\321\5\5\5\5\5\5\5\5\5\321\273\273\341\5"..., 4096) = 4096

read(16, "\321\321\376\273\343\370\351\351\354\351\321\321\321\370"..., 4096) = 4096

read(16, "\305\305\305\370\321\5\5\5\5\5\321\305\351\371\351\321"..., 4096) = 4096

read(16, "\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5\5"..., 4096) = 4096

read(16, "\333\272\310\345\322\337\334\345\335\335\325\333\356\362"..., 4096) = 4096

read(16, "\355\4\4\4\356\333\322\322\322\260\350\345\333\356\4\4"..., 4096) = 4096

read(16, "\333\350\362\4\4\4\330\350\336\325\345\334\325\334\356"..., 4096) = 4096

read(16, "\345\330\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4\4"..., 4096) = 4096

read(16, "\217\234\261\225\226\226\217\235\216\234\220\244\220\236"..., 4096) = 4096

read(16, "\221\312\265\233\241\241\272\236\245\276\237\260\233\216"..., 4096) = 4096

read(16, "\221\232\233\226\231\232\217\232\314\244\233\265\231\216"..., 4096) = 4096

read(16, "\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\3\263"..., 4096) = 1080

close(16) = 0

munmap(0xb3487000, 4096) = 0

stat64("./3dobjects/ground_objs/desertplants_alpha.bmp", {st_mode=S_IFREG|0644, st_size=66116, ...}) = 0

open("./3dobjects/ground_objs/desertplants_alpha.bmp", O_RDONLY) = 16

fstat64(16, {st_mode=S_IFREG|0644, st_size=66116, ...}) = 0

mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb3487000

read(16, "BMD\2\1\0\0\0\0\0B\2\0\0(\0\0\0\0\1\0\0\0\1\0\0\1\0\10"..., 4096) = 4096

mmap2(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb56d8000

read(16, "~\2\2\2\201q0\f\10\5\t\10;[)\22\37\5\1\1\4\4\1\fOy\201"..., 4096) = 4096

read(16, " \3\5\4\6D}\202~b@?>{\2h#\3\5\0169\6\3\1\7e~\2|F\n\1"..., 4096) = 4096read(16, "\2\2wA\33\1\fn\200\2\2\2\2\2\2p\35\t\1\4\4\4\27h\\n\2\2"..., 4096) = 4096

read(16, "\1\1\1\3\t \31\5\4\6\16\7\5\23&;0DI9\v\1\4\30q\177\177"..., 4096) = 4096

read(16, "\2\2\2\2\2\2\2\2\2\2\201U\n\23\16\4\34v\201\2\2\2\2\2}"..., 4096) = 4096

read(16, "\2\2\2\2\2\2\2\2\201\201\202_\22\vCn\2x&\1\1\10[~\2\2\2"..., 4096) = 4096

read(16, "g4\27\6\1\1\1\1\1\3\1\3#>`ix\201\2\2\2\2\201uA\30\6I|\202"..., 4096) = 4096

read(16, "\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2"..., 4096) = 4096

read(16, "\26\n\10:\31\22\5\6\35K&,\4\3\1\0065`a\26\10$*?y\177\200"..., 4096) = 4096

read(16, "}{W\r\7\10\0266\16\4\5%p\177\2\2\202u;\f\10 \4\0055y\201"..., 4096) = 4096

read(16, "\2\2~c\"Dy\200\2{H\6\17b\177\2\2\2{M&CpL\17L|\200\2\2\200"..., 4096) = 4096

read(16, "\2\2\2\2\2\2\2\2\2\2|nt\177\2\2\2\2\2\2\2\2\2\2\2\2\2\2"..., 4096) = 4096

read(16, "\6\nV?\n\f\30Km:\6\1\4\7\31\v\37\5\3\v\f\r(\16;\35\f\r"..., 4096) = 4096

read(16, "ayn/\21,]8\t\f\7\33+\6\3\7*)\6\21\5\3\t\v(\27-0\5\31(a"..., 4096) = 4096

read(16, "s{a\24\26\30Z}\201r:M;\rC$\6\35nifO\22\24,?\25Kj2 \34"..., 4096) = 4096

read(16, "\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2\2"..., 4096) = 580

close(16) = 0

munmap(0xb3487000, 4096) = 0

munmap(0xb56d8000, 266240) = 0

brk(0xe994000) = 0xe994000

mmap2(NULL, 266240, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb56d8000

munmap(0xb56d8000, 266240) = 0

munmap(0xb3446000, 266240) = 0

ioctl(10, 0xc070464a, 0xbfd2a620) = 0

ioctl(9, 0xc0384657, 0xbfd2a58c) = 0

--- SIGSEGV (Segmentation fault) @ 0 (0) ---

Process 2045 detached

 

 

My current location: You are in Tarsengaard [199,196]

Share this post


Link to post
Share on other sites

Can you do a bt when it crashes? To see what functions it called and stuff.

I think this shows the same as "where" did above but here it is anyway:

 

(gdb) t 1

[switching to thread 1 (Thread -1225533120 (LWP 21574))]#0 0xb7f4bf50 in ?? ()

(gdb) bt

#0 0xb7f4bf50 in ?? ()

#1 0x00000000 in ?? ()

(gdb) t 2

[switching to thread 2 (Thread -1252602960 (LWP 21583))]#0 0xb7a8205c in nanosleep () from /lib/tls/libc.so.6

(gdb) bt

#0 0xb7a8205c in nanosleep () from /lib/tls/libc.so.6

#1 0xb7edd7b1 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#2 0xb7edd801 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#3 0xb7e8d82b in SDL_GetThreadID () from /usr/lib/libSDL-1.2.so.0

#4 0xb7edac8d in SDL_ThreadID () from /usr/lib/libSDL-1.2.so.0

#5 0xb77440bd in start_thread () from /lib/tls/libpthread.so.0

#6 0xb7abf9ee in clone () from /lib/tls/libc.so.6

(gdb) t 3

Thread ID 3 not known.

(gdb) bt

#0 0xb7a8205c in nanosleep () from /lib/tls/libc.so.6

#1 0xb7edd7b1 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#2 0xb7edd801 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#3 0xb7e8d82b in SDL_GetThreadID () from /usr/lib/libSDL-1.2.so.0

#4 0xb7edac8d in SDL_ThreadID () from /usr/lib/libSDL-1.2.so.0

#5 0xb77440bd in start_thread () from /lib/tls/libpthread.so.0

#6 0xb7abf9ee in clone () from /lib/tls/libc.so.6

(gdb) t 4

[switching to thread 4 (Thread -1269380176 (LWP 21585))]#0 0xb7ab86a7 in select () from /lib/tls/libc.so.6

(gdb) bt

#0 0xb7ab86a7 in select () from /lib/tls/libc.so.6

#1 0xb7d61034 in SDLNet_CheckSockets () from /usr/lib/libSDL_net-1.2.so.0

#2 0x080a6811 in get_message_from_server (thread_args=0x8275b90)

at multiplayer.c:1298

#3 0xb7e8d82b in SDL_GetThreadID () from /usr/lib/libSDL-1.2.so.0

#4 0xb7edac8d in SDL_ThreadID () from /usr/lib/libSDL-1.2.so.0

#5 0xb77440bd in start_thread () from /lib/tls/libpthread.so.0

#6 0xb7abf9ee in clone () from /lib/tls/libc.so.6

(gdb) t 5

Thread ID 5 has terminated.

(gdb)

Share this post


Link to post
Share on other sites

i can reproduce this also on a debian system. the problem seem to start in cvs after march 2nd. thats the last version from which i can build a non segfaulting client.

Share this post


Link to post
Share on other sites

The strange thing is, the stack trace clearly shows that the crash is not in our code..

 

Maybe some bad libraries? I wonder if people with other distros debian based can test it..

Share this post


Link to post
Share on other sites

try a 'make clean'... I see something quite similar regularly with my bot if I change the data structures in a header (.h) and don't recompile everything... if only some of it is recompiled, the old object files (which the executable is made from) have the wrong data structures (and hence addresses... reading the wrong thing often causes segfaults)

I'm on debian, so when I can get the client to compile (CVS isn't picking up the eyecandy stuff, hence no compile) I'll see if I get a crash as well

ed: I do. no relevant info from backtrace (for reference, I have debian etch amd64, and nVidia's drivers for a geforce 6600 gt)

Edited by ttlanhil

Share this post


Link to post
Share on other sites

Slackware 11.0, kernel 2.6.18.6, video card Intel i915

 

Client compiled from yesterday CVS (before the eye candy addition)

 

The client gets a segfault on startup when shadows are enabled, no matter if shadowmapping is on or off, but the backtraces are different in the 2 cases.

 

First backtrace, char at WS [90,686] shadows enabled, shadowmapping disabled:

 

$ gdb el-133.x86.linux.cvstest.bin

GNU gdb 6.5

Copyright © 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 "i486-slackware-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

 

(gdb) r

Starting program: /opt/games/elc/el-133.x86.linux.cvstest.bin

Failed to read a valid object file image from memory.

[Thread debugging using libthread_db enabled]

[New Thread -1216108864 (LWP 4934)]

[New Thread -1294144592 (LWP 4937)]

[New Thread -1302664272 (LWP 4938)]

 

Program received signal SIGSEGV, Segmentation fault.

[switching to Thread -1216108864 (LWP 4934)]

0xb76fa5b7 in attrib_2_3 () from /usr/X11R6/lib/modules/dri/i915_dri.so

(gdb) t 1

[switching to thread 1 (Thread -1216108864 (LWP 4934))]#0 0xb76fa5b7 in attrib_2_3 ()

from /usr/X11R6/lib/modules/dri/i915_dri.so

(gdb) bt

#0 0xb76fa5b7 in attrib_2_3 () from /usr/X11R6/lib/modules/dri/i915_dri.so

#1 0xb75dc17c in _ae_loopback_array_elt () from /usr/X11R6/lib/modules/dri/i915_dri.so

#2 0xb76cfdc2 in fallback_drawarrays () from /usr/X11R6/lib/modules/dri/i915_dri.so

#3 0xb76d01b5 in _tnl_DrawArrays () from /usr/X11R6/lib/modules/dri/i915_dri.so

#4 0x0804fe8c in draw_3d_object_detail (object_id=0xe7e64a8) at 3d_objects.c:317

#5 0x080501d5 in draw_3d_objects (object_type=11) at 3d_objects.c:518

#6 0x080bec73 in display_3d_ground_objects () at shadows.c:703

#7 0x080bfa7c in draw_sun_shadowed_scene (any_reflection=2) at shadows.c:1153

#8 0x08086544 in display_game_handler (win=0xb47a378) at gamewin.c:622

#9 0x0807bc6b in draw_window (win=0xb47a378) at elwindows.c:1056

#10 0x0807c1aa in display_window (win_id=0) at elwindows.c:1204

#11 0x0807968a in display_windows (level=1) at elwindows.c:54

#12 0x08073809 in draw_scene () at draw_scene.c:98

#13 0x0809d94c in start_rendering () at main.c:123

#14 0x0809dbbf in main (argc=1, argv=0xbfacc644) at main.c:237

(gdb) t 2

[switching to thread 2 (Thread -1294144592 (LWP 4937))]#0 0xb7f0a99c in __nanosleep_nocancel ()

from /lib/tls/libpthread.so.0

(gdb) bt

#0 0xb7f0a99c in __nanosleep_nocancel () from /lib/tls/libpthread.so.0

#1 0xb7f9005a in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#2 0xb7f900c2 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#3 0xb7f442cb in SDL_RunThread () from /usr/lib/libSDL-1.2.so.0

#4 0xb7f8d33d in SVGA_keyboardcallback () from /usr/lib/libSDL-1.2.so.0

#5 0xb7f0520e in start_thread () from /lib/tls/libpthread.so.0

#6 0xb7b270de in clone () from /lib/tls/libc.so.6

(gdb) t 3

[switching to thread 3 (Thread -1302664272 (LWP 4938))]#0 0xb7b1fd57 in ___newselect_nocancel ()

from /lib/tls/libc.so.6

(gdb) bt

#0 0xb7b1fd57 in ___newselect_nocancel () from /lib/tls/libc.so.6

#1 0xb7dac301 in SDLNet_CheckSockets () from /usr/lib/libSDL_net-1.2.so.0

#2 0x080a653c in get_message_from_server (thread_args=0x8274dd0) at multiplayer.c:1298

#3 0xb7f442cb in SDL_RunThread () from /usr/lib/libSDL-1.2.so.0

#4 0xb7f8d33d in SVGA_keyboardcallback () from /usr/lib/libSDL-1.2.so.0

#5 0xb7f0520e in start_thread () from /lib/tls/libpthread.so.0

#6 0xb7b270de in clone () from /lib/tls/libc.so.6

(gdb) t 4

Thread ID 4 not known.

 

 

 

Second backtrace, char at WS [90,686] shadows enabled, shadowmapping enabled:

 

$ gdb el-133.x86.linux.cvstest.bin

GNU gdb 6.5

Copyright © 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 "i486-slackware-linux"...Using host libthread_db library "/lib/tls/libthread_db.so.1".

 

(gdb) r

Starting program: /opt/games/elc/el-133.x86.linux.cvstest.bin

Failed to read a valid object file image from memory.

[Thread debugging using libthread_db enabled]

[New Thread -1216432448 (LWP 4926)]

[New Thread -1294468176 (LWP 4929)]

[New Thread -1302987856 (LWP 4930)]

 

Program received signal SIGSEGV, Segmentation fault.

[switching to Thread -1216432448 (LWP 4926)]

0xb76ab5b7 in attrib_2_3 () from /usr/X11R6/lib/modules/dri/i915_dri.so

(gdb) t 1

[switching to thread 1 (Thread -1216432448 (LWP 4926))]#0 0xb76ab5b7 in attrib_2_3 ()

from /usr/X11R6/lib/modules/dri/i915_dri.so

(gdb) bt

#0 0xb76ab5b7 in attrib_2_3 () from /usr/X11R6/lib/modules/dri/i915_dri.so

#1 0xb758d17c in _ae_loopback_array_elt () from /usr/X11R6/lib/modules/dri/i915_dri.so

#2 0xb7680dc2 in fallback_drawarrays () from /usr/X11R6/lib/modules/dri/i915_dri.so

#3 0xb76811b5 in _tnl_DrawArrays () from /usr/X11R6/lib/modules/dri/i915_dri.so

#4 0x080be1f4 in draw_3d_object_shadow_detail (object_id=0xe27bdf8) at shadows.c:375

#5 0x080be4f1 in draw_3d_object_shadows (object_type=17) at shadows.c:459

#6 0x080beb28 in display_shadows () at shadows.c:650

#7 0x080bf1ba in render_light_view () at shadows.c:887

#8 0x0808649f in display_game_handler (win=0xb47a408) at gamewin.c:599

#9 0x0807bc6b in draw_window (win=0xb47a408) at elwindows.c:1056

#10 0x0807c1aa in display_window (win_id=0) at elwindows.c:1204

#11 0x0807968a in display_windows (level=1) at elwindows.c:54

#12 0x08073809 in draw_scene () at draw_scene.c:98

#13 0x0809d94c in start_rendering () at main.c:123

#14 0x0809dbbf in main (argc=1, argv=0xbf9504c4) at main.c:237

(gdb) t 2

[switching to thread 2 (Thread -1294468176 (LWP 4929))]#0 0xb7ebb99c in __nanosleep_nocancel ()

from /lib/tls/libpthread.so.0

(gdb) bt

#0 0xb7ebb99c in __nanosleep_nocancel () from /lib/tls/libpthread.so.0

#1 0xb7f4105a in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#2 0xb7f410c2 in SDL_Delay () from /usr/lib/libSDL-1.2.so.0

#3 0xb7ef52cb in SDL_RunThread () from /usr/lib/libSDL-1.2.so.0

#4 0xb7f3e33d in SVGA_keyboardcallback () from /usr/lib/libSDL-1.2.so.0

#5 0xb7eb620e in start_thread () from /lib/tls/libpthread.so.0

#6 0xb7ad80de in clone () from /lib/tls/libc.so.6

(gdb) t 3

[switching to thread 3 (Thread -1302987856 (LWP 4930))]#0 0xb7ad0d57 in ___newselect_nocancel ()

from /lib/tls/libc.so.6

(gdb) bt

#0 0xb7ad0d57 in ___newselect_nocancel () from /lib/tls/libc.so.6

#1 0xb7d5d301 in SDLNet_CheckSockets () from /usr/lib/libSDL_net-1.2.so.0

#2 0x080a653c in get_message_from_server (thread_args=0x8274dd0) at multiplayer.c:1298

#3 0xb7ef52cb in SDL_RunThread () from /usr/lib/libSDL-1.2.so.0

#4 0xb7f3e33d in SVGA_keyboardcallback () from /usr/lib/libSDL-1.2.so.0

#5 0xb7eb620e in start_thread () from /lib/tls/libpthread.so.0

#6 0xb7ad80de in clone () from /lib/tls/libc.so.6

(gdb) t 4

Thread ID 4 not known.

 

In both cases though, the lines "3d_objects.c:317" and "shadows.c:375" are the same:

glDrawArrays(GL_TRIANGLES, idx, num);

 

(Hope this can help, sry but I don't know openGL functions)

Share this post


Link to post
Share on other sites

try a 'make clean'...

Yes, I always try a clean build before posting a bug. Normally, and in this case, a fresh CVS checkout too.

 

(CVS isn't picking up the eyecandy stuff, hence no compile)

The fresh cvs checkout fixed that for me.

Share this post


Link to post
Share on other sites

the CVS thing was a problem with my setup here, that's since fixed. I'm getting the segfaults as well with new builds :dry:

Share this post


Link to post
Share on other sites

This problem persists for me and several others trying to build from CVS, with or without the new EYE_CANDY. Therefore, I thought I have a go at tracking it down. gdb traces were not helpful so I've used the tried and tested inserting printf() statements.

 

I've narrowed the problem down to a single line in shadow.c in the function void draw_3d_object_shadow_detail(object3d * object_id) at line 431, the call to glDrawArrays(GL_TRIANGLES, idx, num). If I comment out this line, the client does not crash. The print inserted just before the call showed that idx=0 and num=96.

 

As stated previously in this thread, I'm using the client on Linux, with default build options.

 

from make.conf:

FEATURES=PNG_SCREENSHOT NEW_FRUSTUM BUG_FIX_3D_OBJECTS_MIN_MAX NEW_TEX OPTIONS_I18N ATI_9200_FIX NEW_ACTOR_ANIMATION AUTO_UPDATE COUNTERS FONTS_FIX COMMENT_BUFFER AFK_FIX CUSTOM_LOOK CUSTOM_UPDATE SIMPLE_LOD SFX USE_ACTOR_DEFAULTS NOTEPAD USE_INLINE

Share this post


Link to post
Share on other sites

Hmm. While this isn't my code, so I'm not familiar with it, I did have a brief look at it. I found that there's a very similar piece of code in 3dobjects.c. However, that piece of code also contains the following error-checking function:

 

#ifdef  DEBUG
// a quick check for errors
if(array_order[i].start < 0 || array_order[i].count <= 0) {
  LOG_ERROR("%s[%d] %s (%d, %d)",
 object_id->file_name, i,
 values_str,
 array_order[i].start, array_order[i].count);
}
#endif  // DEBUG

 

You might want to put this in there. Not very robust, for sure, but better than nothing.

 

Ed: More complex testing could be done by printing (idx + num) * 3 * sizeof(GL_FLOAT) and comparing that to the output of a print statement listing the allocated size of object_id->e3d_data->vbo[2] (allocated in ???) or object_id->e3d_data->array_vertex (allocated in load_e3d_detail: "calloc(faces_no*3, sizeof(e3d_array_vertex))") that you add to the functions where they're allocated. Whether you want vbo[2] or array_vertex depends on whether have_vertex_buffers is set or not and whether vbo[2] is null or not.

Edited by KarenRei

Share this post


Link to post
Share on other sites

Hmm. While this isn't my code, so I'm not familiar with it, I did have a brief look at it. I found that there's a very similar piece of code in 3dobjects.c. However, that piece of code also contains the following error-checking function:

Thanks for that. Unfortunately, adding the error checking didn't help. I'm having a go at adding the extra debug but I need to understand much more of the code before I can do it; I've not played with the graphics side of the client much.

 

I did do another experiment though. I was curious why, if I started the client with shadow mapping disabled, I could enable it and move locations, experiencing all the shadow stuff, without a problem. My experiment was to conditionally disable the problem line using one of the config options (the so far unused server message window). I then started the client with active shadow mapping but not the trouble line. I then toggled the config option which immediately reveled more shadows from trees and things - the client did not crash.

 

To me, this suggests that what ever is crashing the client, is going wrong when the client creates the first seen. May be something is not ready to be drawn. Then again, as I said, I know nothing about the graphics side of the client :dry: I'll see if I can add that extra debug....

 

Edit: Sorry Theryndan, just spotted that this is exactly the line of code you identified earlier.

Edited by bluap

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

  • Recently Browsing   0 members

    No registered users viewing this page.

×