Issue244

Title crash when moving items in inventory around
Priority critical Status resolved
Assigned To Keywords
Linked issues Watchers

Submitted on 2011-07-24 19h07 by tracker_migration, last changed by ahuillet.

Messages
Author: tracker_migration Date: 2011-07-11   20h08
Submitted by helios42
When I move an item in the inventory, more specifically when I drop it after having dragged it, Freedroid RPG sometimes crashes. As hinted by ahuillet, this might be positional audio related.

How to reproduce:

Use attached savegame and try moving items around in the inventory. Unfortunately it doesn\u00b4t happen all of the time. I had it once when I went to the unknown or secret place in the desert, but on another time it didn\u00b4t crash.

I attached a backtrace with GDB.

This happens on a ThinkPad T520 with Intel Sandybridge i5 and:

martin@merkaba:~/Spielen/FreeDroidRPG/freedroid-svn/src#127> cat /proc/version
Linux version 3.0.0-rc6-amd64 (Debian 3.0.0~rc6-1~experimental.1) (maks@debian.org) (gcc version 4.4.6 (Debian 4.4.6-6) ) #1 SMP Tue Jul 5 09:30:35 UTC 2011
martin@merkaba:~/Spielen/FreeDroidRPG/freedroid-svn/src> lspci -nn | grep VGA
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09)
martin@merkaba:~/Spielen/FreeDroidRPG/freedroid-svn/src> lspci -nn | grep -i audio
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
martin@merkaba:~/Spielen/FreeDroidRPG/freedroid-svn/src> apt-show-versions | egrep "(libsdl|alsa)"
alsa-base/sid uptodate 1.0.23+dfsg-4
alsa-utils/sid uptodate 1.0.23-5+b1
bluez-alsa/sid uptodate 4.94-2
libsdl-gfx1.2-4/sid uptodate 2.0.22-1
libsdl-gfx1.2-dev/sid uptodate 2.0.22-1
libsdl-image1.2/sid uptodate 1.2.10-2.1
libsdl-image1.2-dev/sid uptodate 1.2.10-2.1
libsdl-mixer1.2/sid uptodate 1.2.8-6.3
libsdl-mixer1.2-dev/sid uptodate 1.2.8-6.3
libsdl-net1.2/sid uptodate 1.2.7-2
libsdl-net1.2-dev/sid uptodate 1.2.7-2
libsdl-pango1/sid uptodate 0.1.2-4
libsdl-perl/sid uptodate 2.2.5-1+b2
libsdl-ttf2.0-0/sid uptodate 2.0.9-1
libsdl-ttf2.0-dev/sid uptodate 2.0.9-1
libsdl1.2-dev/sid uptodate 1.2.14-6.4
libsdl1.2debian/sid uptodate 1.2.14-6.4

with todays svn version (r4826). The backtrace I will attach is from another occurence of the bug with an slightly earlier svn version.

gcc is:

martin@merkaba:~> gcc --version
gcc (Debian 4.6.1-3) 4.6.1
[...]
Author: tracker_migration Date: 2011-07-11   20h15
Posted by helios42
Savegame is too large to attach. Find it at:

http://martin-steigerwald.de/tmp/FreedroidRPG/savegame-2011-07-07-svn.tar.bz2
Author: tracker_migration Date: 2011-07-11   20h43
Posted by matthiaskrgr
1) open inventory
2) click somewhere (make tux walk)
3) while walking, drag an item from the inventory
4) drop it

when you repeat dragging and dropping, the dropping sound should be made more quiet according to positional audio (?), it seems to be played from the position the item was dragged/clicked on in/from inventory.
Author: tracker_migration Date: 2011-07-11   20h59
Posted by helios42
I think I now have savegame that makes it quite easy to reproduce the crash:

http://martin-steigerwald.de/tmp/FreedroidRPG/savegame-2011-07-11-svn-precrash.tar.bz2

I reproduced it three times in a row by letting my 476 team shot at the other lower level bots and dragging the EMS shockwave granted from position 4 to position 5 just right next to it. You might have to drag it again several times, but then at least here it crashes quite reproducably. With this:


martin@merkaba:~/Spielen/FreeDroidRPG/freedroid-svn/src> ./freedroidRPG 

Hello, this is FreedroidRPG, version 0.14.1+svn.
This seems to be a development version, so we'll exit on floating point exceptions.
Video system type: x11.
Using screen resolution 1920 x 1080.

Testing if color depth 32 bits is available... YES.

video mode set (bpp=24 RGBA=8880 depth=24)
-OpenGL-------------------------------------------------------
Vendor     : Tungsten Graphics, Inc
Renderer   : Mesa DRI Intel(R) Sandybridge Mobile 
Version    : 2.1 Mesa 7.11-devel
[...]

there is no soundcard

Now respawning all bots on level : 17. 
Now respawning all bots on level : 16. 
Now respawning all bots on level : 58. 
Now respawning all bots on level : 6. print_trace:  Obtained 11 stack frames.
print_trace:  Obtaining symbols now done.
.(print_trace+0x12) [0x443102]
/lib/x86_64-linux-gnu/libc.so.6(+0x32480) [0x7f384b5b3480]
.(translate_map_point_to_screen_pixel_func+0x148) [0x434178]
.(play_sound_at_position+0x53) [0x446203]
.(play_item_sound+0x6e) [0x45e69e]
.(DropHeldItemToInventory+0x210) [0x41db50]
.(HandleInventoryScreen+0x3dd) [0x41eb9d]
.(Game+0x7a) [0x44d9aa]
.(main+0x15a) [0x415bda]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xfd) [0x7f384b59fead]
.() [0x415c9d]

print_trace():  received SIGFPE!

----------------------------------------------------------------------
Termination of freedroidRPG initiated...Thank you for playing freedroidRPG.

(sorry forgot to run gdb within a screen session and I am not able to access it when freedroid RPG is running fullscreen otherwise)
Author: tracker_migration Date: 2011-07-11   21h14
Posted by helios42
Important: in chat we had the idea to try it with different resolution. I am *not* able to reproduce this with 1400x1050 instead of 1920x1080 (16:9 full hd). So this seems to be resolution dependant. 
Author: tracker_migration Date: 2011-07-11   21h21
Posted by helios42
Complete hardware information:

martin@merkaba:~/Spielen/FreeDroidRPG/Bugs/3363420 crash when moving items in inventory around> lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 2nd Generation Core Processor Family DRAM Controller [8086:0104] (rev 09)
00:02.0 VGA compatible controller [0300]: Intel Corporation 2nd Generation Core Processor Family Integrated Graphics Controller [8086:0126] (rev 09)
00:16.0 Communication controller [0780]: Intel Corporation 6 Series/C200 Series Chipset Family HECI Controller #1 [8086:1c3a] (rev 04)
00:19.0 Ethernet controller [0200]: Intel Corporation 82579LM Gigabit Network Connection [8086:1502] (rev 04)
00:1a.0 USB Controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #2 [8086:1c2d] (rev 04)
00:1b.0 Audio device [0403]: Intel Corporation 6 Series/C200 Series Chipset Family High Definition Audio Controller [8086:1c20] (rev 04)
00:1c.0 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 1 [8086:1c10] (rev b4)
00:1c.1 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 2 [8086:1c12] (rev b4)
00:1c.3 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 4 [8086:1c16] (rev b4)
00:1c.4 PCI bridge [0604]: Intel Corporation 6 Series/C200 Series Chipset Family PCI Express Root Port 5 [8086:1c18] (rev b4)
00:1d.0 USB Controller [0c03]: Intel Corporation 6 Series/C200 Series Chipset Family USB Enhanced Host Controller #1 [8086:1c26] (rev 04)
00:1f.0 ISA bridge [0601]: Intel Corporation QM67 Express Chipset Family LPC Controller [8086:1c4f] (rev 04)
00:1f.2 SATA controller [0106]: Intel Corporation 6 Series/C200 Series Chipset Family 6 port SATA AHCI Controller [8086:1c03] (rev 04)
00:1f.3 SMBus [0c05]: Intel Corporation 6 Series/C200 Series Chipset Family SMBus Controller [8086:1c22] (rev 04)
03:00.0 Network controller [0280]: Intel Corporation Centrino Advanced-N 6205 [8086:0085] (rev 34)
05:00.0 Mass storage controller [0180]: Silicon Image, Inc. SiI 3531 [SATALink/SATARaid] Serial ATA Controller [1095:3531] (rev 01)
0d:00.0 System peripheral [0880]: Ricoh Co Ltd Device [1180:e823] (rev 05)
0d:00.3 FireWire (IEEE 1394) [0c00]: Ricoh Co Ltd FireWire Host Controller [1180:e832] (rev 04)

Current kernel:

martin@merkaba:~> cat /proc/version 
Linux version 3.0.0-rc6-amd64 (Debian 3.0.0~rc6-1~experimental.1) (maks@debian.org) (gcc version 4.4.6 (Debian 4.4.6-6) ) #1 SMP Tue Jul 5 09:30:35 UTC 2011
Author: tracker_migration Date: 2011-07-12   12h06
Posted by matthiaskrgr
I had a look at this bug with valgrind, the game didn't crash, but I got

==32648== Conditional jump or move depends on uninitialised value(s)
==32648==    at 0x5F622CF: __ieee754_atan2 (e_atan2.c:299)
==32648==    by 0x5F79BE4: atan2 (w_atan2.c:36)
==32648==    by 0x447029: play_sound_at_position (sound.c:475)
==32648==    by 0x45F8C9: play_item_sound (sound_effects.c:238)
==32648==    by 0x41D066: DropHeldItemToInventory (items.c:1457)
==32648==    by 0x41E12C: HandleInventoryScreen (items.c:1716)
==32648==    by 0x44E894: Game (main.c:99)
==32648==    by 0x44EA39: main (main.c:200)

a lot of times when I moved the grenade several times.
Author: ahuillet Date: 2011-08-06   08h16
Fixed in r4915
History
Date User Action Args
2011-08-06 08:16:16ahuilletsetstatus: open -> resolved
messages: + msg1526
2011-08-05 20:41:01ahuilletsetpriority: important -> critical
2011-07-25 09:21:28ahuilletsetpriority: bug -> important
2011-07-24 19:07:44tracker_migrationcreate