Bug#645843: glchess: segmentation fault after loading texture when asking glchess to use 3D mode

2011-10-18 Thread Daniel Kahn Gillmor
reassign 645843 libgl1-mesa-dri
affects 645843 glchess
thanks

On 10/18/2011 09:20 PM, Daniel Kahn Gillmor wrote:
> Now, every time i try to launch [glchess], it crashes with a segmentation
> fault.

Attached is a backtrace i obtained after rebuilding glchess with
debugging symbols and installing libgl1-mesa-dri-dbg.

It appears that the crash is several stack frames deep into
/usr/lib/powerpc-linux-gnu/dri/swrast_dri.so, so I'm re-assigning this
bug to libgl1-mesa-dri, which provides that shared object.

Feel free to reassign if you think it belongs elsewhere.

Regards,

--dkg
consoleuser@bigpuff:~/src/glchess$ gdb glchess
GNU gdb (GDB) 7.3-debian
Copyright (C) 2011 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "powerpc-linux-gnu".
For bug reporting instructions, please see:
...
Reading symbols from /usr/games/glchess...done.
(gdb) run
Starting program: /usr/games/glchess 
[Thread debugging using libthread_db enabled]
Gtk-Message: Failed to load module "pk-gtk-module"
[New Thread 0x489f4300 (LWP 11492)]
[New Thread 0x4920d300 (LWP 11493)]
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile GNU Chess
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile GNUchess
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Sjeng
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Amy
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Crafty
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Faile
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Phalanx
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Glaurung
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Stockfish
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile HoiChess
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Diablo
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile BBChess
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Fruit
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Gambit Fruit
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Toga II
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Amundsen
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Boo's Chess 
Engine
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Fairy-Max
** (glchess:11489): DEBUG: ai-profile.vala:35: Loading AI profile Shredder
** Message: glchess.vala:390: Detected AI profile GNUchess in 
/usr/games/gnuchess
** (glchess:11489): DEBUG: chess-engine.vala:146: Writing line to engine: 
'xboard'
** (glchess:11489): DEBUG: chess-engine.vala:146: Writing line to engine: 'easy'
** (glchess:11489): DEBUG: chess-engine.vala:146: Writing line to engine: 
'depth 1'
** (glchess:11489): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'GNU 
Chess 5.07'
** (glchess:11489): DEBUG: chess-engine-cecp.vala:41: Read from engine: 
'Adjusting HashSize to 1024 slots'
** (glchess:11489): DEBUG: chess-engine-cecp.vala:41: Read from engine: 
'Transposition table:  Entries=1K Size=48K'
** (glchess:11489): DEBUG: chess-engine-cecp.vala:41: Read from engine: 'Pawn 
hash table: Entries=0K Size=32K'

Program received signal SIGSEGV, Segmentation fault.
0x0df96b9c in fast_persp_span (info=, span=0xbfffd9fc, 
ctx=) at swrast/s_triangle.c:730
730 swrast/s_triangle.c: No such file or directory.
in swrast/s_triangle.c
(gdb) bt
#0  0x0df96b9c in fast_persp_span (info=, span=0xbfffd9fc, 
ctx=)
at swrast/s_triangle.c:730
#1  persp_textured_triangle (ctx=0x1020d820, v0=, v1=, v2=)
at swrast/s_tritemp.h:819
#2  0x0df68c18 in _swrast_Triangle (ctx=, v0=, 
v1=, v2=)
at swrast/s_context.c:701
#3  0x0df9df30 in triangle_rgba (ctx=, e0=, 
e1=, e2=)
at swrast_setup/ss_tritmp.h:176
#4  0x0df3aac8 in _tnl_render_poly_elts (ctx=0x1020d820, start=, 
count=3, flags=48)
at tnl/t_vb_rendertmp.h:352
#5  0x0df3b2ac in _tnl_RenderClippedPolygon (ctx=, 
elts=, n=)
at tnl/t_vb_render.c:245
#6  0x0df33d5c in clip_tri_4 (ctx=0x1020d820, v0=, v1=, v2=330, mask=)
at tnl/t_vb_cliptmp.h:259
#7  0x0df38a68 in clip_elt_triangles (ctx=0x1020d820, start=1629, count=2652, 
flags=)
at tnl/t_vb_render.c:174
#8  0x0df3b1c4 in run_render (ctx=0x1020d820, stage=) at 
tnl/t_vb_render.c:321
#9  0x0df2fee0 in _tnl_run_pipeline (ctx=0x1020d820) at tnl/t_pipeline.c:153
#10 0x0df304f8 in _tnl_draw_prims (ctx=, arrays=0x1024c654, 
prim=0xbfffe988, nr_prims=1, 
ib=, min_index=, max_index=660) at 
tnl/t_draw.c:524
#11 0x0df31120 in _tnl_vbo_draw_prims (ctx=0x1020d820, arrays=0x1024c654, 
prim=0xbfffe988, nr_prims=1, ib=0xbfff

Bug#645843: glchess: segmentation fault after loading texture when asking glchess to use 3D mode

2011-10-18 Thread Daniel Kahn Gillmor
Package: glchess
Version: 1:3.0.2-2
Severity: normal

I launched glchess and got a nice 2D view.  I went into the
preferences dialog box and asked it to show me a 3D view.  It crashed
and disappeared.

Now, every time i try to launch it, it crashes with a segmentation
fault.

I ran strace to see what it's doing before the crash, and it appears
to crash immediately after loading piece.png from the glchess
textures.  I'm attaching what i think is the relevant snippet from the
strace output.

   --dkg

-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: powerpc (ppc)

Kernel: Linux 3.0.0-2-powerpc
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages glchess depends on:
ii  dconf-gsettings-backend [gsettings-backend]  0.7.5-3   
ii  gnome-games-data 1:3.0.2-2 
ii  gnuchess 5.07-7
ii  libc62.13-21   
ii  libcairo21.10.2-6.1
ii  libgdk-pixbuf2.0-0   2.24.0-1  
ii  libgl1-mesa-glx [libgl1] 7.11-6
ii  libglib2.0-0 2.28.8-1  
ii  libglu1-mesa [libglu1]   7.11-6
ii  libgtk-3-0   3.0.12-2  
ii  librsvg2-2   2.34.1-2  
ii  libsqlite3-0 3.7.8-1   
ii  libx11-6 2:1.4.4-2 

glchess recommends no packages.

glchess suggests no packages.

-- no debconf information
6012  close(15) = 0
6012  brk(0x107b2000)   = 0x107b2000
6012  poll([{fd=3, events=POLLIN|POLLOUT}], 1, -1) = 1 ([{fd=3, 
revents=POLLOUT}])
6012  writev(3, 
[{"5\30\0\4\2\200\0\17\2\200\0\3\1\364\2&\224\4\0\5\2\200\0\20\2\200\0\17\0\0\0*"...,
 15688}, 
{"\2\6\0\0\2\6\2\0\0N\200\0\2\6\0\0\0Nh\0\2\6\2\0\0o\200\0\2\6\0\0"..., 2120}, 
{"", 0}], 3) = 17808
6012  open("/usr/share/glchess/textures/board.png", O_RDONLY|O_LARGEFILE) = 15
6012  fstat64(15, {st_mode=S_IFREG|0644, st_size=8804, ...}) = 0
6012  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0x4eaf1000
6012  read(15, 
"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\200\0\0\0\200\10\6\0\0\0\303>a"..., 4096) = 
4096
6012  
stat64("/usr/lib/powerpc-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so",
 {st_mode=S_IFREG|0644, st_size=18560, ...}) = 0
6012  
open("/usr/lib/powerpc-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-png.so",
 O_RDONLY) = 16
6012  read(16, 
"\177ELF\1\2\1\0\0\0\0\0\0\0\0\0\0\3\0\24\0\0\0\1\0\0\26\200\0\0\0004"..., 512) 
= 512
6012  fstat64(16, {st_mode=S_IFREG|0644, st_size=18560, ...}) = 0
6012  mmap(0xde1e000, 82836, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 
16, 0) = 0xde1e000
6012  mprotect(0xde22000, 65536, PROT_NONE) = 0
6012  mmap(0xde32000, 4096, PROT_READ|PROT_WRITE, 
MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 16, 0x4000) = 0xde32000
6012  close(16) = 0
6012  _llseek(15, 0, [0], SEEK_SET) = 0
6012  read(15, 
"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\200\0\0\0\200\10\6\0\0\0\303>a"..., 4096) = 
4096
6012  brk(0x107d6000)   = 0x107d6000
6012  read(15, 
"\250\315\0326\232\331\214'\233(\322\372\376YO\335y/\7!C\26\262c\206\316\37\312\233\26u\366"...,
 4096) = 4096
6012  read(15, 
"\320\337+=\315\16\240\346\177W\271\376\237\21\342\3565\250\330r\305\223\253\317su\33W@\313\360\231"...,
 4096) = 612
6012  close(15) = 0
6012  munmap(0x4eaf1000, 4096)  = 0
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  time(NULL)= 1318986729
6012  brk(0x10801000)   = 0x10801000
6012  open("/usr/share/glchess/textures/piece.png", O_RDONLY|O_LARGEFILE) = 15
6012  fstat64(15, {st_mode=S_IFREG|0644, st_size=9836, ...}) = 0
6012  mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) 
= 0x4eaf1000
6012  read(15, 
"\211PNG\r\n\32\n\0\0\0\rIHDR\0\0\0\200\0\0\0\200\10\2\0\0\0L\\\366"..., 4096) 
= 4096
6012  _llseek(15, 0, [0], SEEK_SET) = 0
60