Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Obsolete > v4

 
 
Thread Tools Display Modes
Old March 20, 2012, 21:35   #1
grinder
Rookie
 
Join Date: Mar 2012
Posts: 13
grinder is on a distinguished road
bug - crash with tons of traps detected

Using revision d1db92e30511af698cc55b284693a5f928fca67a (with a savefile that was generated along different versions), I get a crash on loading the savefile (available on request). The game first crashed on using a rod of detection near a large vault.

Backtrace:
Code:
#0  0x002ef4ee in fread () from /lib/tls/i686/cmov/libc.so.6
#1  0x0818653d in file_read (f=0x825687c, buf=0xbffff3e0 "traps", n=28) at z-file.c:513
#2  0x080d7bf5 in try_load (f=0x825687c) at savefile.c:472
#3  0x080d7ec1 in savefile_load (path=0x8200760 "~/.angband/Angband-v4/save/1000.Username") at savefile.c:555
#4  0x08064bc6 in play_game () at dungeon.c:1621
#5  0x0818d73e in main (argc=1, argv=0xbffff574) at main.c:457
Let me take the opportunity to thank you for making Angband such great fun, having v4 in parallel is a terrific idea.
grinder is offline  
Old March 20, 2012, 22:24   #2
CunningGabe
Swordsman
 
Join Date: Feb 2008
Location: Boston, MA
Posts: 250
CunningGabe is on a distinguished road
Quote:
Originally Posted by grinder View Post
Using revision d1db92e30511af698cc55b284693a5f928fca67a (with a savefile that was generated along different versions), I get a crash on loading the savefile (available on request). The game first crashed on using a rod of detection near a large vault.
Thank you for the report! Are you saying that the game crashed when you used the rod of detection, and now that savefile just crashes when you try to load it? Also, was the vault on the dungeon level that you started on right after updating to that revision?
CunningGabe is offline  
Old March 20, 2012, 22:43   #3
grinder
Rookie
 
Join Date: Mar 2012
Posts: 13
grinder is on a distinguished road
Yes, it segfaulted while showing the "you detect traps" message. And yes, it segfaults on start, after pressing any key on the title screen (when save loading runs). Once, on a fluke, I was 'stepi'-ing in gdb around the crash point and the game was able to load, but crashed when I used an upstair.

As for whether the vault was created in latest revision, I believe I was playing with rev 81b526d8e4 (might be a bit earlier, sorry for imprecision), went down a stair, detected and got a crash. Then I updated to see if that would fix the crash, which didn't happen.
grinder is offline  
Old March 20, 2012, 23:25   #4
CunningGabe
Swordsman
 
Join Date: Feb 2008
Location: Boston, MA
Posts: 250
CunningGabe is on a distinguished road
Hmm. Well, why don't you post the savefile here and I'll take a look.
CunningGabe is offline  
Old March 21, 2012, 00:31   #5
grinder
Rookie
 
Join Date: Mar 2012
Posts: 13
grinder is on a distinguished road
Thanks, here it is.
Attached Files
File Type: zip crashv4.zip (24.3 KB, 318 views)
grinder is offline  
Old March 21, 2012, 12:56   #6
CunningGabe
Swordsman
 
Join Date: Feb 2008
Location: Boston, MA
Posts: 250
CunningGabe is on a distinguished road
Are you building from source? If so, can you make the following changes and recompile:

1. Add trap.txt to the Makefile in lib/edit.
2. Change line 36 of slay.c, replacing 257 with 513.

With those changes, I am able to load your savefile. It seems that the slay cache was running out of room, leading (I think) to an array index out of bounds.
CunningGabe is offline  
Old March 21, 2012, 18:51   #7
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,110
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by CunningGabe View Post
Are you building from source? If so, can you make the following changes and recompile:

1. Add trap.txt to the Makefile in lib/edit.
2. Change line 36 of slay.c, replacing 257 with 513.

With those changes, I am able to load your savefile. It seems that the slay cache was running out of room, leading (I think) to an array index out of bounds.
Oooh, that's extremely interesting - thanks for picking this up.
__________________
"Been away so long I hardly knew the place, gee it's good to be back home" - The Beatles
Magnate is offline  
Old March 21, 2012, 19:07   #8
grinder
Rookie
 
Join Date: Mar 2012
Posts: 13
grinder is on a distinguished road
Thanks, Gabe.

I'm building from source, but with your changes it still crashes the same way (same backtrace on gdb).

I'm using a 32bit linux (ubuntu 10.04) and, since the crash happens in libc ("fread () from /lib/tls/i686/cmov/libc", see gdb output above), it might be hard to reproduce on other platforms.
grinder is offline  
Old March 21, 2012, 20:08   #9
CunningGabe
Swordsman
 
Join Date: Feb 2008
Location: Boston, MA
Posts: 250
CunningGabe is on a distinguished road
Quote:
Originally Posted by grinder View Post
Thanks, Gabe.

I'm building from source, but with your changes it still crashes the same way (same backtrace on gdb).

I'm using a 32bit linux (ubuntu 10.04) and, since the crash happens in libc ("fread () from /lib/tls/i686/cmov/libc", see gdb output above), it might be hard to reproduce on other platforms.
Hmm. I'm puzzled. I can imagine that the new trap saving and loading code might be messed up in some subtle platform-dependent way, but I can't imagine how that would have caused the original crash when you used the rod of detection.

The only other guess I have is that it has something to do with displaying items on trap squares (though again, I haven't had problems with this on my end, using Windows 7). If you're up for a little detective work, you could try the following:

1. Do Ctrl-a, c, z, P to create a scroll of trap detection.
2. Read the scroll.
3. Drop a bunch of items (without moving).

If everything is working correctly, whenever an item drops onto a known trap square, it should show up as a red &.
CunningGabe is offline  
Old March 23, 2012, 04:32   #10
grinder
Rookie
 
Join Date: Mar 2012
Posts: 13
grinder is on a distinguished road
Items on traps display fine. OTOH, using the debug mode to create a lvl50 character and teleporting to large-vault-depth gets crashy quick, sometimes even before detecting traps.

You say my save file works OK for you? Because I'm starting to suspect the crash could have led to an inconsistent save file 'traps' entry.
grinder is offline  
 

Tags
crash, traps


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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


All times are GMT +1. The time now is 08:44.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.