Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 28, 2011, 06:37   #11
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Max Stats View Post
What would cause an object to be generated with tval and sval of zero? An object with these values triggers the bug.
The short answer is we're not sure... or else we'd be trying to stop that thing happening

There are some possible explanations, although I'm kind of just throwing things out:

1. Object creation fails in a way that doesn't signal that the item is bogus, and it gets put into the dungeon/monster inventory.

2. Some kind of stack merge fails and leaves a cleared empty object lying around

3. Objects on floor or in monster inventories are stored in a linked list... could be buggy list handling code somewhere

4. Some kind of incomplete item destruction

As I say, these are vague descriptions, and it may be something else entirely.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old June 28, 2011, 19:53   #12
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
This bug is getting to be more and more inscrutable all the time. I thought I would add a line to mon_take_hit to write out a savefile (to a different location than my regular savefile) every time I damaged a monster. I was hoping that this way when the bug hit I would actually have a save from right before the monster in question was killed. However, when the bug eventually hit and I loaded this save file, the bug did not repeat itself. This is despite the fact that the monster still had health in the health bar, so the moment of saving should have been before the game considered the monster dead and dropped its objects. So now I wonder if this is some sort of in-game corruption that happens over a period of playing, but is eliminated after reloading?

Since the bug is persisting, I opened a ticket for it.

On a side note, to make the interim savefile code work, I had to tweak savefile_save because it uses the path you provide in order to create the ".new" and ".old" temp files, but then uses the default savefile name when moving the temp file back to the real savefile. This doesn't seem like intended behavior but hadn't been an issue because the game always saves to the default location. All it required was replacing 'savefile' with 'path' in the calls to file_move.
Max Stats is offline   Reply With Quote
Old June 28, 2011, 22:10   #13
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Hey Max,

Are you able to reproduce this bug easily?

If so I may send you some custom EXEs to try out. I have still never been able to see it yet.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old June 28, 2011, 23:29   #14
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
No, I can only reproduce it when it pops up at random, and it is not at all reliable. You mentioned EXEs and not being able to reproduce it, so I assume you are on Windows? I am on Linux, so maybe it is a platform-specific thing. However, I dual boot to Windows, so if you want me to test something in Windows, I can still do it.

Since I managed to figure out that the bug comes from map_info, and there is only one place where map_info calls squelch_item_ok (which in turn calls object_flavor_is_aware), I have inserted a test: if (!o_ptr->kind) continue; before the call (will probably add a message in there so I can see that it has happened as well), so I'll see if this fixes it without causing any new problems.
Max Stats is offline   Reply With Quote
Old June 28, 2011, 23:39   #15
Napsterbater
Adept
 
Join Date: Jun 2009
Posts: 177
Napsterbater is on a distinguished road
The borg might be a helpful tool, I'm sure you could reproduce the bug semi-regularly with it.
__________________
This thread, it needs more rage. -- Napstopher Walken
Napsterbater is offline   Reply With Quote
Old June 29, 2011, 00:33   #16
Magnate
Angband Devteam member
 
Join Date: May 2007
Location: London, UK
Posts: 5,057
Magnate is on a distinguished road
Send a message via MSN to Magnate Send a message via Yahoo to Magnate
Quote:
Originally Posted by Napsterbater View Post
The borg might be a helpful tool, I'm sure you could reproduce the bug semi-regularly with it.
Unfortunately the borg isn't in the official repo - it's recently been updated to 3.2.0, but things have changed again since then.
__________________
"3.4 is much better than 3.1, 3.2 or 3.3. It still is easier than 3.0.9, but it is more convenient to play without being ridiculously easy, so it is my new favorite of the versions." - Timo Pietila
Magnate is offline   Reply With Quote
Old June 29, 2011, 01:05   #17
d_m
Angband Devteam member
 
d_m's Avatar
 
Join Date: Aug 2008
Location: Philadelphia, PA, USA
Age: 39
Posts: 1,516
d_m is on a distinguished road
Quote:
Originally Posted by Max Stats View Post
No, I can only reproduce it when it pops up at random, and it is not at all reliable. You mentioned EXEs and not being able to reproduce it, so I assume you are on Windows? I am on Linux, so maybe it is a platform-specific thing. However, I dual boot to Windows, so if you want me to test something in Windows, I can still do it.
Actually the opposite. I run Linux and had assumed you were on Windows.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old June 29, 2011, 01:24   #18
jens
Swordsman
 
Join Date: Apr 2011
Location: Göteborg, Sweden
Posts: 348
jens is on a distinguished road
Well I'm on Windows, and I had it first ;-)
jens is offline   Reply With Quote
Old June 29, 2011, 01:30   #19
ChodTheWacko
Adept
 
Join Date: Jul 2007
Posts: 155
ChodTheWacko is on a distinguished road
Do you have a stack?

It sounds like you can compile Angband yourself, so why not just compile the whole thing in debug mode, and then always play with gdb attached? That way next time it crashes you have all the information you need.

Or is it not reproducing when compiled debug? (uninitialized variables, yay)

- Frank
ChodTheWacko is offline   Reply With Quote
Old July 1, 2011, 20:43   #20
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
BTW, does anyone know if simply replacing "assert(o_ptr->kind);" with "if (!o_ptr->kind) return FALSE;" would be a viable fix? I know that this means that there is an invalid object or two (or more) floating around (it actually looks like an object that gets allocated but its structure never gets filled because all the flags are zero). I made this change but haven't really tested it yet, and there is no telling how long it takes for the bug to recur for testing. I just wondered if anyone already knew what the effect of this would be, if these objects are allowed to continue to exist instead of bailing with the failed assertion. There is explicit testing in the loading routines that doesn't place objects with no kind, so I am assuming that is why the bug doesn't persist when you reload the panic save that results.
Max Stats is offline   Reply With Quote
Reply


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 Napsterbater Vanilla 6 February 26, 2011 10:56
r1953 crash bug Zikke Vanilla 14 March 11, 2010 04:32
Crash Bug? Rizwan Vanilla 4 February 25, 2010 13:58
Death mold description bug? Rizwan Vanilla 3 June 22, 2009 08:30
[FA] Crash Bug Zikke Variants 8 February 19, 2009 05:20


All times are GMT +1. The time now is 05:42.


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