[Freeciv-Dev] (PR#14188) Crash in hash or tileset code
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=14188 >
> [jdorje - Mar. Oct. 04 23:08:29 2005]:
>
> sprite_hash must be allocated by the time tiles are loaded.
>
> Ignoring tilespec_reread, sprite_hash is:
>
> - NULL on program start.
> - Allocated in tilespec_read_toplevel, iff the function returns TRUE.
> * Called from main.
> - Used in tilespec_load_tiles.
> * Called from ui_main.
> * Called from main, after tilespec_read_toplevel is called.
> - Deallocated in tilespec_free_tiles.
> * Called from ui_main, only on program exit.
>
> The most likely error you'd think would be a problem in
> tilespec_read_toplevel allowing it to return TRUE without allocating the
> sprite hash. But this doesn't seem to happen. I can find no flaw in
> the logic of the code. Of course it's possible there's a buffer overrun
> or something.
>
> To the original reporter: can you get a backtrace? On linux run:
>
> > ulimit -c unlimited
> > civclient
> > gdb civclient core
> gdb> bt full
>
> and send the output. (Lines 2 or 3 may differ slightly if your client
> is in a different place or if the crash leaves a file called core.3455
> or something).
>
> -jason
>
Hi, I re-compile the client with the -g option.
aymeric@veckman ~ $ ulimit
unlimited
aymeric@veckman ~ $ civclient
civclient: tilespec.c:1227: tilespec_lookup_sprite_tags: l'assertion «
sprite_hash != ((void *)0) » a échoué.
Abandon (core dumped)
aymeric@veckman ~ $ gdb civclient core.21918
GNU gdb 5.3
Copyright 2002 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 "powerpc-unknown-linux-gnu"...
(no debugging symbols found)...
Core was generated by `civclient'.
Program terminated with signal 6, Aborted.
Reading symbols from /usr/lib/libgtk-x11-2.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgtk-x11-2.0.so.0
Reading symbols from /usr/lib/libgdk-x11-2.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgdk-x11-2.0.so.0
Reading symbols from /usr/lib/libatk-1.0.so.0...(no debugging symbols
found)...
done.
Loaded symbols for /usr/lib/libatk-1.0.so.0
Reading symbols from /usr/lib/libgdk_pixbuf-2.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgdk_pixbuf-2.0.so.0
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libm.so.6
Reading symbols from /usr/lib/libpangoxft-1.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpangoxft-1.0.so.0
Reading symbols from /usr/lib/libpangox-1.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpangox-1.0.so.0
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/lib/libpango-1.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libpango-1.0.so.0
Reading symbols from /usr/lib/libgobject-2.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgobject-2.0.so.0
Reading symbols from /usr/lib/libgmodule-2.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libgmodule-2.0.so.0
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/libdl.so.2
Reading symbols from /usr/lib/libglib-2.0.so.0...
(no debugging symbols found)...done.
Loaded symbols for /usr/lib/libglib-2.0.so.0
Reading symbols from /usr/lib/libSDL-1.2.so.0...(no debugging symbols
found)...
done.
Loaded symbols for /usr/lib/libSDL-1.2.so.0
Reading symbols from /lib/libpthread.so.0...done.
Loaded symbols for /lib/libpthread.so.0
Reading symbols from /usr/lib/libSDL_mixer-1.2.so.0...done.
Loaded symbols for /usr/lib/libSDL_mixer-1.2.so.0
Reading symbols from /usr/lib/libaudiofile.so.0...done.
Loaded symbols for /usr/lib/libaudiofile.so.0
Reading symbols from /usr/lib/libasound.so.2...done.
Loaded symbols for /usr/lib/libasound.so.2
Reading symbols from /lib/libz.so.1...done.
Loaded symbols for /lib/libz.so.1
Reading symbols from /lib/libc.so.6...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /usr/lib/libX11.so.6...done.
Loaded symbols for /usr/lib/libX11.so.6
Reading symbols from /usr/lib/libXrandr.so.2...done.
Loaded symbols for /usr/lib/libXrandr.so.2
Reading symbols from /usr/lib/libXi.so.6...done.
Loaded symbols for /usr/lib/libXi.so.6
Reading symbols from /usr/lib/libXinerama.so.1...done.
Loaded symbols for /usr/lib/libXinerama.so.1
Reading symbols from /usr/lib/libXft.so.2...done.
Loaded symbols for /usr/lib/libXft.so.2
Reading symbols from /usr/lib/libfreetype.so.6...done.
Loaded symbols for /usr/lib/libfreetype.so.6
---Type <return> to continue, or q <return> to quit---
Reading symbols from /usr/lib/libfontconfig.so.1...done.
Loaded symbols for /usr/lib/libfontconfig.so.1
Reading symbols from /usr/lib/libXfixes.so.3...done.
Loaded symbols for /usr/lib/libXfixes.so.3
Reading symbols from /usr/lib/libXcursor.so.1...done.
Loaded symbols for /usr/lib/libXcursor.so.1
Reading symbols from /usr/lib/libXrender.so.1...done.
Loaded symbols for /usr/lib/libXrender.so.1
Reading symbols from /usr/lib/libXext.so.6...done.
Loaded symbols for /usr/lib/libXext.so.6
Reading symbols from /lib/ld.so.1...done.
Loaded symbols for /lib/ld.so.1
Reading symbols from /usr/lib/libpangoft2-1.0.so.0...done.
Loaded symbols for /usr/lib/libpangoft2-1.0.so.0
Reading symbols from /usr/lib/libdirectfb-0.9.so.20...done.
Loaded symbols for /usr/lib/libdirectfb-0.9.so.20
Reading symbols from
/usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/libstdc++.so.6...done.
Loaded symbols for
/usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/libstdc++.so.6
Reading symbols from
/usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/libgcc_s.so.1...done.
Loaded symbols for
/usr/lib/gcc/powerpc-unknown-linux-gnu/3.4.4/libgcc_s.so.1
Reading symbols from /usr/lib/libaa.so.1...done.
Loaded symbols for /usr/lib/libaa.so.1
Reading symbols from /usr/lib/libvorbisfile.so.3...done.
Loaded symbols for /usr/lib/libvorbisfile.so.3
Reading symbols from /usr/lib/libvorbis.so.0...done.
Loaded symbols for /usr/lib/libvorbis.so.0
Reading symbols from /usr/lib/libogg.so.0...done.
Loaded symbols for /usr/lib/libogg.so.0
Reading symbols from /usr/lib/libsmpeg-0.4.so.0...done.
Loaded symbols for /usr/lib/libsmpeg-0.4.so.0
Reading symbols from /usr/lib/libexpat.so.0...done.
Loaded symbols for /usr/lib/libexpat.so.0
Reading symbols from /usr/lib/libstdc++-v3/libstdc++.so.5...done.
Loaded symbols for /usr/lib/libstdc++-v3/libstdc++.so.5
Reading symbols from /usr/lib/libslang.so.1...done.
Loaded symbols for /usr/lib/libslang.so.1
Reading symbols from /usr/lib/gconv/ISO8859-15.so...done.
Loaded symbols for /usr/lib/gconv/ISO8859-15.so
Reading symbols from /usr/lib/gconv/ISO8859-1.so...done.
Loaded symbols for /usr/lib/gconv/ISO8859-1.so
Reading symbols from /usr/lib/X11/locale/lib/common/xlcUTF8Load.so.2...done.
Loaded symbols for /usr/lib/X11/locale/lib/common/xlcUTF8Load.so.2
---Type <return> to continue, or q <return> to quit---
Reading symbols from /lib/libnss_compat.so.2...done.
Loaded symbols for /lib/libnss_compat.so.2
Reading symbols from /lib/libnsl.so.1...done.
Loaded symbols for /lib/libnsl.so.1
Reading symbols from /lib/libnss_nis.so.2...done.
Loaded symbols for /lib/libnss_nis.so.2
Reading symbols from /lib/libnss_files.so.2...done.
Loaded symbols for /lib/libnss_files.so.2
Reading symbols from /usr/lib/gtk-2.0/2.4.0/engines/libpixmap.so...done.
Loaded symbols for /usr/lib/gtk-2.0/2.4.0/engines/libpixmap.so
Reading symbols from
/usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.so...
done.
Loaded symbols for /usr/lib/gtk-2.0/2.4.0/loaders/libpixbufloader-png.so
Reading symbols from /usr/lib/libpng12.so.0...done.
Loaded symbols for /usr/lib/libpng12.so.0
#0 0x0f506048 in raise () from /lib/libc.so.6
(gdb) bt full
#0 0x0f506048 in raise () from /lib/libc.so.6
No symbol table info available.
#1 0x0f507a78 in abort () from /lib/libc.so.6
No symbol table info available.
#2 0x0f4fecc0 in __assert_fail () from /lib/libc.so.6
No symbol table info available.
#3 0x1003a67c in _init ()
No symbol table info available.
#4 0x100c076c in _init ()
No symbol table info available.
#5 0x1000fa54 in _init ()
No symbol table info available.
#6 0x0f4f08a4 in __libc_init_first () from /lib/libc.so.6
No symbol table info available.
#7 0x0f4f09ec in __libc_start_main () from /lib/libc.so.6
No symbol table info available.
(gdb)
|
|