Closed mgtremaine closed 3 years ago
Hi @mgtremaine , could you please provide a save file for this?
In zip file.. homm2_crash_save.zip
A quick glance reveals that std::find()
returns heroes.end()
here (wasn't able to find such hero in a kingdom):
so heroes.erase()
crashes, because its argument isn't dereferenceable.
Purple kingdom at this moment have four heroes: Zam, Rialdo, Roxana and Sandro, but not Corlagon. It looks like Corlagon wasn't added to the purple kingdom in the beginning of this campaign episode for some reason.
hi @ihhub I have some suspicions regarding applyObtainedCampaignAwards()
in game/game_campaign.cpp
. In this function hero may be removed from kingdom if TYPE_DEFEAT_ENEMY_HERO
award was received, but this hero may still be present on map itself. Is this possible?
Hi @oleg-derevenetz , I have a fix for this. I'll create a pull request in the next 1-2 hours.
I have Seg Fault on OS X in the Price of Loyalty Map 10... In the start of the game if Kalindra attacks Corlagon and lightning bolts the Champions the same segfault after the victory screen.
Attached is part of the backtrace. I'll try to see if other combos work around or also crash but I tried it 3 times to make sure.
sig_fault_osx-05312021.txt
-Mike