December 10th, 2010, 17:22
Posts: 973
Threads: 20
Joined: Oct 2010
kyrub Wrote:Sounds nice. Memory dump that could lead to a "re-entering" of a battle would be great, for isntance.
Yes, I guess you would be most interested not in the current memory dump (after the fact), but the one just before a battle, assuming the actual access-violation occurred during battle.
Since the random-generator would be restored as well, you should be able to reproduce the problem exactly.
--I like ILSe
December 11th, 2010, 16:03
(This post was last modified: December 16th, 2010, 09:14 by Zytac_the_Mage.)
Posts: 26
Threads: 0
Joined: Dec 2010
System:
- Windows XP SP3
- D-Fend Reloaded 1.0.3 / DOSBox 0.74
- MoM + Patch v1.40i
Dear Kyrub (and all others interested),
I experience a repeatable crash-to-desktop if click on "Next Turn".
I (wildly) guess, the crash could be due to an AI wizard casting an overland
spell - but as said, this is pure speculation.
Before that turn, I defeated a "Demon Lord", maybe this also could be a souce of the poblem as the code for the Demon Lord was changed?
A link to a ZIP-file with savegames of both turns can be found here:
http://rapidshare.com/files/436373707/Mo..._Zytac.zip
Savegame 1 is before the attack on the Demon Lord, savegame 2 after winning this battle and when a "Next turn" crashes the game.
UPDATE (2010-12-16_16:21)
- Reproducible with savegame 1 and 1.40i
- NOT reproducible with savegame 1 and 1.40j
Best regards,
Zytac the Mage
December 12th, 2010, 04:55
(This post was last modified: December 16th, 2010, 09:02 by Zytac_the_Mage.)
Posts: 26
Threads: 0
Joined: Dec 2010
System:
- Windows XP SP3
- D-Fend Reloaded 1.0.3 / DOSBox 0.74
- MoM + Patch v1.40i
Maybe another bug found:
While playing in tactical combat, the game freezes AFTER the AI started it's turn. (See screenshot for situation).
The Slingers attacked, you could hear the sling sound, then the game freezes.
I also casted "Counter Magic +40", so maybe the AI wanted to cast another battlefield (maybe "death" like before) and the spell fails.
Savegames short before the battle + the image are available as ZIP file from:
http://rapidshare.com/files/436450575/MoM_v1_40i_combat_freezes_Zytac.zip
UPDATE:
Reproducible with savegame 2 ("m19b") and 1.40i even after restart of DOSBox and reload.
UPDATE (2010-12-16_16:02)
NOT reproducible with savegame 2 ("m19b") and 1.40j
Best regards,
Zytac
December 12th, 2010, 05:03
Posts: 26
Threads: 0
Joined: Dec 2010
Dear all (especially all the coders like kyrub, b0rsuk & I Like Serena),
maybe it would be possible for You to create a MAGIC.EXE which writes a debug log, e.g. after/before each turn of after/before each tactical combat round? That may be helpful for further bug hunting.
Another way could be the DOSBox debug option as descibed in
http://vogons.zetafleet.com/viewtopic.php?t=3944
Would that output be helpful for You coders/patchers if I try to run MoM in debug mode?
Best regads,
Zytac
December 12th, 2010, 05:10
Posts: 26
Threads: 0
Joined: Dec 2010
Dear all coders,
would it be helpful for further bug hunting to have a thread with "test cases"?
You could describe which situation you like to have tested, and other volunteers will try to test and report results back to this thread?The thread might then become some kind of "poor man's bugtracking tool".
This might even get better feedback if a debug logging solution might be in place (as described in my reply before).
BTW: As I am curently on my X-Mas vacation, I am willing to help out as such a testing volunteer ;-)
Best regards,
Zytac
December 12th, 2010, 07:02
Posts: 973
Threads: 20
Joined: Oct 2010
Zytac_the_Mage Wrote:Another way could be the DOSBox debug option as descibed in
http://vogons.zetafleet.com/viewtopic.php?t=3944
Would that output be helpful for You coders/patchers if I try to run MoM in debug mode?
Best regads,
Zytac
Yes, I believe so.
If you would be able to create a LOGCPU.txt file up to the point where the game crashes, that should help a lot to pinpoint the bug.
Since these files tend to be very big, I guess we should have only the last part just before the crash, with just enough data to pinpoint the location in code.
--I like ILSe
December 12th, 2010, 07:48
Posts: 973
Threads: 20
Joined: Oct 2010
Zytac_the_Mage Wrote:I experience a repeatable crash-to-desktop if click on "Next Turn".
I (wildly) guess, the crash could be due to an AI wizard casting an overland
spell - but as said, this is pure speculation.
Before that turn, I defeated a "Demon Lord", maybe this also could be a souce of the poblem as the code for the Demon Lord was changed?
A link to a ZIP-file with savegames of both turns can be found here:
http://rapidshare.com/files/436373707/Mo..._Zytac.zip
Savegame "m13" is before the attack on the Demon Lord, savegame "m13b" after winning this battle and when a "Next turn" crashes the game.
Best regards,
Zytac the Mage
I can confirm this bug.
My observations:
In Vanilla this bug does not occur.
In Insecticide 1.40i it does crash, but only after the fight with the Demon Lord.
That is:
1. Load SAVE1.GAM,
2. Fight Demon Lord, where you will gain a hero.
3. Click Done on your new hero.
4. Click Next turn and the game crashes to the command prompt.
If you load from SAVE2.GAM you enter at bullet 3. If you click Done and Next turn, the game does not crash.
P.S.: the name "m13" is nowhere to be found (not part of the save game), so I guess it's better to refer to the filename of the save.
--I like ILSe
December 12th, 2010, 07:58
Posts: 973
Threads: 20
Joined: Oct 2010
Zytac_the_Mage Wrote:While playing in tactical combat, the game freezes AFTER the AI started it's turn. (See screenshot for situation).
The Slingers attacked, you could hear the sling sound, then the game freezes.
Savegames short before the battle + the image are available as ZIP file from:
http://rapidshare.com/files/436450575/MoM_v1_40i_combat_freezes_Zytac.zip
UPDATE:
Reproducible with savegame 2 ("m19b") even after restart of DOSBox and reload.
Best regards,
Zytac
I can also confirm this bug.
My observations.
The bug does not occur in Vanilla.
It does occur in Insecticide 1.40i, configured without sound driver.
1. Load SAVE2.GAM
2. Click Next turn. You'll be attacked.
3. Click Done on your units, making it the turn of AI.
4. AI attacks and after the slingers shoot, the game freezes.
Note that you can still move the mouse pointer, but beyond that nothing works.
--I like ILSe
December 12th, 2010, 09:29
(This post was last modified: December 12th, 2010, 10:14 by I like Serena.)
Posts: 973
Threads: 20
Joined: Oct 2010
RE: Crash to desktop (1.40i)
I've backtraced the crash to desktop (EDIT: Next-turn after defeat Demonlord) with dosbox-heavydebug.
It turns out that we have a division-by-zero:
The instruction
is executed with bx = 0.
Apparently this is at the start of a new combat round, where the current damage to a unit is divided by the hitpoints-per-figure. This last field turns out to be zero.
From here, it starts to be difficult to trace: where and why did this field become zero?
Kyrub, any thoughts?
EDIT: I still had the last snapshot of the game with the Tweaker, and I could still inspect everything.
The unit causing the crash is a Galley which is presumably in an AI-fight. The unit-type-data of the Galley is in order except for the hitpoints-per-figure field which indeed has the value zero.
This suggests we have an instruction somewhere that specifically changes the unit-type-data, which should never be modified.
EDIT2: I've uploaded the relevant part of the dosbox-trace to: LOGCPU-crash-to-desktop-ovr116-3E0E-10CF-idiv-bx.zip
--I like ILSe
December 12th, 2010, 12:54
Posts: 357
Threads: 22
Joined: Oct 2010
Could it have something to do that Demon Lord has life draining attacks and can have more than 100% HP that way ?
|