|
Thread: PSA: If HoMM II is freezing, restart your machine! | |
|
Darmani
Hired Hero
|
posted July 23, 2018 01:11 AM |
|
|
PSA: If HoMM II is freezing, restart your machine!
(Cross-posted from Celestial Heavens.)
We at the Ironfist team just discovered a very nasty bug in the original game, and wanted to warn other players about it.
If your machine was booted more than 25 days ago, HoMM II will freeze for up to 600 hours whenever you pick up an object or defeat a monster.
Explanation: Most of the timing in the game is done through a DelayTillMillis function, which tells the game "Do nothing until time X," where time X is given in milliseconds since your system was booted (the Windows "GetTickCount" function). If HoMM II was properly coded, this would wrap around to 0 after your system has been booted for 49.7 days. However, there's a bug in HoMM II where instead, after 25 days, that number wraps around to -25 days.
For most of the code, this is benign, as most of it is written to e.g.: "wait till 40 milliseconds from now." However, there is one place in the code where it instead waits till "40 milliseconds after your system has booted." Usually, your system booted more than 40 milliseconds ago, and this does nothing. However, when your system booted more than 25 days ago, HoMM II thinks that your system actually booted -25 days ago. And so, it will wait for 25 days...
We're going to be patching this bug in Ironfist, but if you're playing the original game and encounter this: restart your machine!
|
|
NimoStar
Responsible
Legendary Hero
Modding the Unmoddable
|
posted July 23, 2018 06:15 PM |
|
|
|
King_V
Hired Hero
|
posted August 03, 2018 06:00 PM |
|
|
Whoa!
That's an oddball one to find. Then again, I'm afraid of ever leaving a Windows-based machine on that long.
Still, an impressive find.
|
|
|
|