Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old May 21, 2019, 06:20   #1
bron
Swordsman
 
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 483
bron is on a distinguished road
crash in 4.1.3 nightly

I'm moving the discussion of this bug to here so I don't bore the people on the Vanilla thread. See: http://angband.oook.cz/forum/showthr...t=9051&page=44 for the original post.

So I looked at this a tiny bit. It's dying in obj-util.c in routine "distribute_charges" at line 802, because it's dividing by zero, i.e. source->number is zero. I don't offhand see how that's possible, particularly since the "Inventory" screen shows the correct number of wands. I note that if I pick up the (recharged) wand off the ground, I can then drop one wand, but even then if I try to drop a second wand, I still get the bug. I note however, that the process of dropping the second wand, hitting the bug, and restarting, causes one of the *charges* from the stack in my inventory to disappear (the number of actual *wands* remains correct).
bron is offline   Reply With Quote
Old May 21, 2019, 06:43   #2
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,832
Donated: $60
Nick is on a distinguished road
Thanks. I had got to a similar place as you. In fact, the correct number of wands is shown for the actual object, but each object has a known version as well (representing what the player knows about the object), and it is this known version that has number zero.

Your tip that picking up the other wand and then dropping twice still triggers the bug should be really helpful, because now I can watch and see how the numberon the known object changes.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old May 21, 2019, 09:56   #3
bron
Swordsman
 
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 483
bron is on a distinguished road
I should also note that I have done this sort of operation many times during the game already, with many different types of wands/staffs, so it definitely has worked before. Although .. I believe (?) that all the other times I've done the multiple recharging thing, the character was in the dungeon, rather than in the town.
bron is offline   Reply With Quote
Old May 21, 2019, 16:40   #4
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,077
wobbly is on a distinguished road
Not sure if it's related but Holy Rage got this crash in coffeeband:

Code:
Pile integrity failure at obj-pile.c:214 Guilty object ============= Name: & Slime Mold~
Same file as current master. I suspect this is a bug from V, rather then anything I've introduced, though of course I can't be sure. If I find it & it is in current master, I'll let you know.
wobbly is offline   Reply With Quote
Old May 22, 2019, 08:30   #5
bron
Swordsman
 
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 483
bron is on a distinguished road
I stuck in the following hack:
Code:
        if (tval_can_have_charges(source)) {
/*bcn hack*/
if((source->number)<=0)dest->pval=0;else
                dest->pval = source->pval * amt / source->number;
which allows me to continue playing, although this is clearly NOT anything even remotely like a "fix" for whatever the problem is.
bron is offline   Reply With Quote
Old May 22, 2019, 11:19   #6
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,077
wobbly is on a distinguished road
Quote:
Originally Posted by Nick View Post
Thanks. I had got to a similar place as you. In fact, the correct number of wands is shown for the actual object, but each object has a known version as well (representing what the player knows about the object), and it is this known version that has number zero.

Your tip that picking up the other wand and then dropping twice still triggers the bug should be really helpful, because now I can watch and see how the numberon the known object changes.
Idle curiousity, does detect object look at 1 list & los the other? Your saying a pair of object lists are out of sync?
wobbly is offline   Reply With Quote
Old May 22, 2019, 20:22   #7
wobbly
Veteran
 
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,077
wobbly is on a distinguished road
Quote:
Originally Posted by wobbly View Post
Same file as current master. I suspect this is a bug from V, rather then anything I've introduced, though of course I can't be sure. If I find it & it is in current master, I'll let you know.
I found this & it was me. Ignore
wobbly is offline   Reply With Quote
Old May 25, 2019, 01:55   #8
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,832
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by bron View Post
I should also note that I have done this sort of operation many times during the game already, with many different types of wands/staffs, so it definitely has worked before. Although .. I believe (?) that all the other times I've done the multiple recharging thing, the character was in the dungeon, rather than in the town.
What can you remember of the history of this stack of wands? Had they been recharged like this before, had you had any blow up from recharge fail, had you bought or sold any of them, were they dropped by monsters or found on the ground, did you ever leave them at home? I'm not expecting you to remember all this, just looking for hints as to where the problem might lie.

I plan to fix the problem by actually aligning number of item and its known version every time there is a drop or a pickup, but it would be nice to know what's currently going wrong.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick is offline   Reply With Quote
Old May 28, 2019, 19:36   #9
bron
Swordsman
 
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 483
bron is on a distinguished road
Quote:
Originally Posted by Nick View Post
What can you remember of the history of this stack of wands?
As you can imagine, I'm not real confident that I remember the complete history of these wands, so this is likely to be inaccurate. That said: One wand was bought from the Black Market, the rest were picked up in the dungeon. I have no idea if they were originally on the ground, or if they were dropped by a defeated monster. I did stash the first couple in my Home for awhile, until I had built up a stack of three. I have recharged them before, always in the same way: I have a stack in my inventory with zero charges, I drop one wand, Recharge it on the ground, step to the side (without picking it up), drop another one, Recharge it, etc., until I only have one wand remaining in my inventory. I Recharge the last wand (in my inventory), then pick-up all the charged wands off the ground. I have had at least one wand blow up on a recharge attempt. For this particular set of wands, they have always been discharged in the same way: via the "Tap charges for mana" spell. I don't think I have ever actually fired one at an enemy.

I find it hard to believe that any of that is going to be useful, but I hope to be proven wrong -
bron is offline   Reply With Quote
Old May 28, 2019, 23:23   #10
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,832
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by bron View Post
As you can imagine, I'm not real confident that I remember the complete history of these wands, so this is likely to be inaccurate. That said: One wand was bought from the Black Market, the rest were picked up in the dungeon. I have no idea if they were originally on the ground, or if they were dropped by a defeated monster. I did stash the first couple in my Home for awhile, until I had built up a stack of three. I have recharged them before, always in the same way: I have a stack in my inventory with zero charges, I drop one wand, Recharge it on the ground, step to the side (without picking it up), drop another one, Recharge it, etc., until I only have one wand remaining in my inventory. I Recharge the last wand (in my inventory), then pick-up all the charged wands off the ground. I have had at least one wand blow up on a recharge attempt. For this particular set of wands, they have always been discharged in the same way: via the "Tap charges for mana" spell. I don't think I have ever actually fired one at an enemy.

I find it hard to believe that any of that is going to be useful, but I hope to be proven wrong -
Thanks - probably not, but maybe

I've done a fix which makes that savefile not crash, but it's fixing when the numbering has gone wrong rather that stopping it going wrong, so I do want to have another look at it.
__________________
One for the Dark Lord on his dark throne
In the Land of Mordor where the Shadows lie.
Nick 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
Misfeature in 4.0 nightly bron Development 1 June 5, 2015 07:41
New nightly soon? jens Development 2 May 18, 2011 22:37
New nightly Magnate Vanilla 199 May 6, 2011 03:51
YAWP nightly mbell999 AAR 1 December 12, 2010 22:09
Nightly version Philip Vanilla 2 December 1, 2010 18:28


All times are GMT +1. The time now is 04:18.


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