ihhub / fheroes2

fheroes2 is a recreation of Heroes of Might and Magic II game engine.
https://ihhub.github.io/fheroes2/
GNU General Public License v2.0
2.72k stars 376 forks source link

Adventure map, game crashes on checking info of "hidden" mine. #5537

Open Branikolog opened 2 years ago

Branikolog commented 2 years ago

Preliminary checks

Platform

Windows

Describe the bug

Sometimes original maps contain mines, that are not rendered on a world map. This editor flaw is quite known. While checking the info of such captured map application crashes. image image

Save file

Artifact_Isle_bug.zip

Additional info

No response

LeHerosInconnu commented 2 years ago

Hello @Branikolog,

Yes, this is the well known mercury mine bug.

Note that in Heroes 2, this mine produces mercury "M" for mercury, while in the example presented from fheroes2 the mine produces wood, "W" for wood.

In original game:

Invisible mercury mine 001

In fheroes2:

Invisible mercury mine 002

Note also that the scenario presented here is the version "The Succession Wars" and that there is also a modified version "The Price of Loyalty".

I also made various corrections to these scenarios which are now in version 1.01 (v1.01) for "The Price of Loyalty", and in version 1.02 (v1.02) (after the invisible mercury mine bug correction) for "The Succession Wars". They will be available in a very very very long time in the next version of the "MYP". I can also make available here the version 1.02 "The Succession Wars" corrected from the invisible mercury mine bug if necessary.

oleg-derevenetz commented 2 years ago

Can't reproduce the crash so far on the latest snapshot - neither on macOS nor on Windows:

Ah, yeah, I need to "capture" it first and it's a crash due to the assertion failure. Probably this crash is legitimate BTW and we should just remove such "mines" from the map somehow during the "map fixup" process.

oleg-derevenetz commented 2 years ago

Hi @Branikolog could you please attach the map file itself, because it seems that my map pack doesn't include this map? Or maybe some classic map also has this bug?

Branikolog commented 2 years ago

@oleg-derevenetz Sure.

Districh-ru commented 1 year ago

A couple of months ago I found a bug in "Voyage Home" expansion company, map 2. It has an unknown mine. But OG also has the same bug and it does not lead to a game crush, so I forgot about it :)

изображение

Save file: vh2_bad_mine.zip

If I check the information about this mine, the game does not crush: изображение