![]() |
#11 | ||
Swordsman
Join Date: Feb 2008
Location: Boston, MA
Posts: 250
![]() |
Quote:
Quote:
|
||
![]() |
![]() |
#12 |
Rookie
Join Date: Mar 2012
Posts: 13
![]() |
Today I ran under gdb to catch the crash: it seems to happen on saving/quitting besides a large vault, when freeing the traps in cave_free (cave.c:3642).
Code:
*** glibc detected *** /.../v4/src/angband: double free or corruption (!prev): 0x082a1e50 *** [cut a bunch of stuff] 4 0x002fe161 in malloc_printerr (action=<value optimized out>, str=0x6 <Address 0x6 out of bounds>, ptr=0x82a1e50) at malloc.c:6266 #5 0x002ff9b8 in _int_free (av=<value optimized out>, p=<value optimized out>) at malloc.c:4794 #6 0x00302a9d in *__GI___libc_free (mem=0x82a1e50) at malloc.c:3738 #7 0x0818c7a8 in mem_free (p=0x82a1e54) at z-virt.c:65 #8 0x08052f85 in cave_free (c=0x82a414c) at cave.c:3642 #9 0x080850e2 in cleanup_angband () at init2.c:3691 #10 0x0818d6f3 in main (argc=1, argv=0xbffff574) at main.c:460 |
![]() |
![]() |
#13 |
Rookie
Join Date: Mar 2012
Posts: 13
![]() |
All I could gather was: saving and quitting from a dungeon level which has a high feeling (murderous or omens of death) results in a crash while freeing stuff, always in mem_free at z-virt.c.
mem_free was usually called from cave.c's cave_free (freeing traps, see backtrace above), sometimes in keymap_free at keymap.c and once in free_obj_alloc at object/obj-make.c. The savefile gets corrupted somehow, leading to the crashes I posted about. Edit: forgot to add that this was with latest (f7c33f8a9b) revision from git, which includes the slays cache fix. The character was created in this revision and I used debug mode to beef him up and teleport to around dl 97. |
![]() |
![]() |
#14 |
Swordsman
Join Date: Feb 2008
Location: Boston, MA
Posts: 250
![]() |
Okay, _now_ I think I see the problem. In cave.c line 3625, I should be using tr_max instead of trap_max. The former is the max number of traps on a level, and the latter is the max number of trap kinds. So I was allocating only 30 or so spaces instead of the 1024 specified in limits.txt.
I'll fix that tonight and give the variables better names so I stop confusing myself. |
![]() |
![]() |
#15 |
Rookie
Join Date: Mar 2012
Posts: 13
![]() |
|
![]() |
![]() |
#16 |
Swordsman
Join Date: Feb 2008
Location: Boston, MA
Posts: 250
![]() |
|
![]() |
Tags |
crash, traps |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Crash bug | Jungle_Boy | v4 | 12 | October 30, 2011 23:22 |
Crash bug in V3.3.1 | awldune | Development | 3 | October 10, 2011 14:22 |
Crash bug | Napsterbater | Vanilla | 6 | February 26, 2011 10:56 |
Crash Bug? | Rizwan | Vanilla | 4 | February 25, 2010 13:58 |
[FA] Crash Bug | Zikke | Variants | 8 | February 19, 2009 05:20 |