Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old June 25, 2011, 00:30   #1
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
Bug: Crash happening upon monster death

This bug was being discussed in the 3.3.0 release thread and it has happened to me a few times. Basically, occasionally when you land the killing blow on a monster, the game will crash. It manages to write a save file, after which you can continue the game with the monster you just killed being at 0 HP, so you can kill it again immediately and proceed normally. The problem is, this means that you cannot capture the bug in a save file, unless you know the bug is about to happen and save immediately before.

If the game is run from the command line, you can see the error text, which is: "angband: object/identify.c:132: object_flavor_is_aware: Assertion `o_ptr->kind' failed." By putting in some debugging code, I managed to figure out that the routine that was calling object_flavor_is_aware before the crash was squelch_item_ok.

So if I understand correctly, this may be triggered when a monster's drops are tested for being squelched to determine if they should be shown. I don't know the flow of the code well enough to look deeper.
Max Stats is offline   Reply With Quote
Old June 25, 2011, 00:51   #2
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
So if I understand correctly, this may be triggered when a monster's drops are tested for being squelched to determine if they should be shown. I don't know the flow of the code well enough to look deeper.
You understand correctly

I have found one path that *may* cause this and have a fix I haven't tested. I haven't reproduced this yet (played for a few hours under GDB hoping to hit it) but my theory is that it's a special artifact being improperly generated, which is why it's (relatively) rare.

More info as I discover it.
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old June 25, 2011, 01:00   #3
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 d_m View Post
You understand correctly

I have found one path that *may* cause this and have a fix I haven't tested. I haven't reproduced this yet (played for a few hours under GDB hoping to hit it) but my theory is that it's a special artifact being improperly generated, which is why it's (relatively) rare.

More info as I discover it.
I'd be surprised if it was to do with special artifacts (though I am not disputing the problem you have uncovered in that code path). Max says that the crash is called from squelch_item_ok, and artifacts are never squelched. Besides, the monster is already carrying the drop before it is killed, so if the problem was with an item being carried having null kind, the crash would reproduce every time the monster is killed.

The key is that the crash is not reproducible after reloading and re-killing the monster. So it can't be anything to do with the actual item, since it drops perfectly on the reload. Makes me wonder if it's a memory leak.
__________________
"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 25, 2011, 01:36   #4
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
I had the bug hit again earlier tonight, but this time it was called from map_info. I wonder if I walked over an illegal item? But again, the crash was gone when I reloaded.

EDIT: Correction. This was because I added another layer of debug code, so map_info was what called squelch_item_ok, which in turn called object_flavor_is_aware.

Last edited by Max Stats; June 25, 2011 at 21:31.
Max Stats is offline   Reply With Quote
Old June 25, 2011, 02:29   #5
Jazerus
Apprentice
 
Join Date: Jun 2011
Posts: 74
Jazerus is on a distinguished road
Quote:
Originally Posted by d_m View Post
You understand correctly

I have found one path that *may* cause this and have a fix I haven't tested. I haven't reproduced this yet (played for a few hours under GDB hoping to hit it) but my theory is that it's a special artifact being improperly generated, which is why it's (relatively) rare.

More info as I discover it.
It could be the Phial. I haven't found it in 3.3.0 RC at all across multiple games, and it would fit with Smeagol causing the crash.
Jazerus is offline   Reply With Quote
Old June 26, 2011, 01:25   #6
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
Quote:
Originally Posted by Jazerus View Post
It could be the Phial. I haven't found it in 3.3.0 RC at all across multiple games, and it would fit with Smeagol causing the crash.
The Phial might be one cause, but it is definitely not the only one. I have encountered the bug after finding the Phial, in fact after finding both the Phial and the Star.
Max Stats is offline   Reply With Quote
Old June 26, 2011, 20:13   #7
Nomad
Knight
 
Nomad's Avatar
 
Join Date: Sep 2010
Location: England
Posts: 958
Nomad is on a distinguished road
Just got this myself in the June 22 nightly:



No panic save, alas, but this was on dlevel 44, randarts game, and I hadn't found any special artefacts yet.
Nomad is offline   Reply With Quote
Old June 26, 2011, 20:37   #8
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
I think the next RC that Magnate pushes may fix this. We'll have to see...
__________________
linux->xterm->screen->pmacs
d_m is offline   Reply With Quote
Old June 27, 2011, 01:47   #9
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
Oops! Still there, as of latest release (v3.2.0-1087-g9367950-dirtybash-4.1). I'll try to put my debugging code back in and snare this bug again.
Max Stats is offline   Reply With Quote
Old June 28, 2011, 02:40   #10
Max Stats
Swordsman
 
Join Date: Jun 2010
Posts: 324
Max Stats is on a distinguished road
What would cause an object to be generated with tval and sval of zero? An object with these values triggers the bug.
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 18:07.


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