Bug 10444

Summary: trackballs segfaults in _save_upgrade_vertex after pressing Start Game
Product: Mesa Reporter: Brice Goglin <brice.goglin>
Component: Mesa coreAssignee: mesa-dev
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium    
Version: 6.5   
Hardware: Other   
OS: All   
URL: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=407601
Whiteboard:
i915 platform: i915 features:

Description Brice Goglin 2007-03-28 13:28:17 UTC
This bug has been reported on the Debian BTS 2 months ago by Michael Musenbrock. It is easy to reproduce with 6.5.2 (and Xserver 1.3-rc3). Just start the game (trackballs) and press "new game" and then "start game".

I got the following backtrace with mesa 6.5.2:

$ gdb trackballs
GNU gdb 6.4.90-debian
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 "i486-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".

(gdb) r
Starting program: /usr/games/trackballs 
(no debugging symbols found)
[...]
Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread -1218623808 (LWP 5830)]
0xb71e5b64 in _save_upgrade_vertex (ctx=0x8155098, attr=2, newsz=3) at tnl/t_save_api.c:406
406	tnl/t_save_api.c: No such file or directory.
	in tnl/t_save_api.c
(gdb) bt full
#0  0xb71e5b64 in _save_upgrade_vertex (ctx=0x8155098, attr=2, newsz=3) at tnl/t_save_api.c:406
	tnl = (TNLcontext *) 0x8396d70
	oldsz = 0
	i = <value optimized out>
	tmp = <value optimized out>
	__PRETTY_FUNCTION__ = "_save_upgrade_vertex"
#1  0xb71e66aa in do_choose (attr=2, sz=3, attr_func=0xb71e41b0 <save_attrib_2_3>, choose1=0xb71e77f0 <save_choose_2_1>, choose2=0xb71e77a0 <save_choose_2_2>, choose3=0xb71e7750 <save_choose_2_3>, 
    choose4=0xb71e7700 <save_choose_2_4>, v=0xbfc9c91c) at tnl/t_save_api.c:561
	ctx = (GLcontext *) 0x839a000
	tnl = (TNLcontext *) 0x8396d70
	i = <value optimized out>
	id = {0, 0, 0, 1}
#2  0xb71e7793 in save_choose_2_3 (v=0xbfc9c91c) at tnl/t_save_api.c:665
No locals.
#3  0xb71e30f3 in _save_Normal3f (x=0, y=0, z=1) at tnl/t_save_api.c:840
	v = {0, 0, 1}
#4  0xb727ee9c in loopback_Normal3dv (v=0xbfc9ca70) at main/api_loopback.c:387
No locals.
#5  0x08056bd2 in ?? ()
No symbol table info available.
#6  0x08057af4 in ?? ()
No symbol table info available.
#7  0x0804e7e7 in ?? ()
No symbol table info available.
#8  0x0804cc49 in ?? ()
No symbol table info available.
#9  0xb7e9a5d2 in scm_boot_guile () from /usr/lib/libguile.so.12
No symbol table info available.
#10 0x0804beca in ?? ()
No symbol table info available.
#11 0xb79a8ea8 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
No symbol table info available.
#12 0x0804bc61 in ?? ()
No symbol table info available.
Comment 1 Brian Paul 2007-03-30 06:13:56 UTC
This code has changed a lot since 6.5.2.  Could you possibly try the latest code from git?
Comment 2 Brice Goglin 2007-03-30 16:07:43 UTC
It took me some time to manage to build Mesa git (probably because the build system has changed since 6.5.2, making the Debian packaging fail to build). But, now it seems that trackballs works fine, or at least does not crash anymore when starting a new game.

Just to be sure of what I tested, on a x86 machine with a i945 chipset:
* I built Mesa with linux-dri-x86
* I installed the new libGL.so.1.2 and i915_dri.so 
* I started the game and saw the new libGL.so.1.2 and i915_dri.so appear in /proc/<pid>/maps

If it looks fine, I guess the bug is fixed in current git.

Brice
Comment 3 Brian Paul 2007-03-31 06:51:10 UTC
OK.  Closing.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.