![]() |
#1 |
Swordsman
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 485
![]() |
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). |
![]() |
![]() |
![]() |
#2 |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,862
Donated: $60
![]() |
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. |
![]() |
![]() |
![]() |
#3 |
Swordsman
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 485
![]() |
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.
|
![]() |
![]() |
![]() |
#4 |
Veteran
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,109
![]() |
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~ |
![]() |
![]() |
![]() |
#5 |
Swordsman
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 485
![]() |
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; |
![]() |
![]() |
![]() |
#6 | |
Veteran
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,109
![]() |
Quote:
|
|
![]() |
![]() |
![]() |
#7 |
Veteran
Join Date: May 2012
Location: Adelaide, Australia
Posts: 2,109
![]() |
|
![]() |
![]() |
![]() |
#8 | |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,862
Donated: $60
![]() |
Quote:
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. |
|
![]() |
![]() |
![]() |
#9 |
Swordsman
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 485
![]() |
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 - |
![]() |
![]() |
![]() |
#10 | |
Vanilla maintainer
Join Date: Apr 2007
Location: Canberra, Australia
Age: 54
Posts: 7,862
Donated: $60
![]() |
Quote:
![]() 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. |
|
![]() |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
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 |