Server crashes in campaign

Happens at the end of a scenario in the campaign when I used a customized hero (via mod).

Console output:

hero id 187 is invalid
terminate called after throwing an instance of 'std::runtime_error'
  what():  internal error

VCMI version: 1.1.1 GitHub release
Host OS version: Windows 11 22623.1325

Not sure whether this is a bug or there’s errors in the hero config.

I couldn’t find newer VCMI version on the VCMI Project Builds page.

this is fixed in 1.2 daily builds. you can find them either on VCMI Project Builds or on Actions · vcmi/vcmi · GitHub

Same error. Version:

that’s an old build, you need one from 17th of February or newer

That works. But what the …?

No applicable message for visiting empty object!
No applicable message for visiting already visited object!

These are messages for new configurable objects added in 1.2. All these texts are optional, however, and error message should only be logged on actual object visit.

Same error.
Version: 1.2.0.ddd9dcc91846e3064e61024684e5e7c02b9006bb

hero id 186 is invalid

The error message referred to the server log. The server log is as follows (Though I don’t think there’s anything valuable in it):

VCMI 1.2.0.ddd9dcc91846e3064e61024684e5e7c02b9006bb (server)
	Initialization: 11 ms
	Data loading: 83 ms
	Mod handler: 0 ms
	Mod filesystems: 39 ms
Basic initialization: 133 ms
Initialized logging system based on settings successfully.
[log level] ai => not set
[log level] animation => not set
[log level] bonus => not set
[log level] global => trace
[log level] mod => not set
[log level] network => not set
		 General text handler: 7 ms
		 Bonus type handler: 1 ms
		 Road handler: 0 ms
		 River handler: 0 ms
		 Terrain handler: 0 ms
		 Hero handler: 0 ms
		 Artifact handler: 0 ms
		 Creature handler: 0 ms
		 Town handler: 0 ms
		 Object handler: 0 ms
		 Object types information handler: 0 ms
		 Spell handler: 0 ms
		 Skill handler: 0 ms
		 Terrain view pattern handler: 1 ms
		 Template handler: 0 ms
		 Battlefields handler: 0 ms
		 Obstacles handler: 0 ms
	Initializing handlers: 9 ms
	Initializing content handler: 0 ms
		[4a7432fb]Original game files
		[292559d2]Additional Maps
		[ea4e31a9]More Heroes
		[329f2a06]No Battle Music
		[0147ece8]VCMI essential files
		[5e997663]VCMI extras
		[dea06eb5]XeroDiff Balance
		[d93d7bbb]Arrow Tower Icons
		[37e0745c]Andruids Bonus Icons
		[ea20e657]Default templates
		[5cfa9b07]Extended RMG options
		[fec1b78d]Extra resolutions
		[da16f942]VCMI Quick Exchange
		[f497c1e8]Bonus Icons
		[304a5a79]Spell Immunity Bonus Icons
		[cc5e4628]Clash of Dragons
		[8054074f]Coldshadow's Fantasy
		[1c5c1d2f]Golden Ring
		[94d5a4df]HD Mod RMGs
		[f63cc53f]Jebus Cross
		[e22c6a9e]Midnight Mix
		[b8627141]Multiplayer templates
		[429c7164]OH3 RMGs
		[0294d012]XXL+ templates
	Parsing mod data: 202 ms
		[SKIP] Additional Maps
		[DONE] More Heroes
		[SKIP] No Battle Music
		[SKIP] VCMI essential files
		[SKIP] VCMI extras
		[DONE] XeroDiff Balance
		[DONE] Arrow Tower Icons
		[SKIP] Andruids Bonus Icons
		[DONE] Default templates
		[SKIP] Extended RMG options
		[DONE] Extra resolutions
		[DONE] VCMI Quick Exchange
		[DONE] Bonus Icons
		[SKIP] Spell Immunity Bonus Icons
		[DONE] Analogy
		[DONE] Anarchy
		[DONE] Clash of Dragons
		[DONE] Coldshadow's Fantasy
		[SKIP] Golden Ring
		[DONE] HD Mod RMGs
		[DONE] Jebus Cross
		[DONE] Midnight Mix
		[DONE] Multiplayer templates
		[DONE] Upgrade
		[SKIP] XXL+ templates
	Loading mod data: 196 ms
	Resolving identifiers: 14 ms
	Handlers post-load finalization: 12 ms 
	All game content loaded in 402 ms
Port 3030 will be used
Listening for connections at port 3030
We got a new connection! :)
Established connection with VCMI 1.2.0.ddd9dcc91846e3064e61024684e5e7c02b9006bb (client). UUID: a8db0f60-380b-43c5-8f86-bc0d3dbb9268
Connection with client 1 established. UUID: 6d7b170b-8326-450a-b822-92dcf7418d5a
Client 1 player: TheInfernalDevil
system says: TheInfernalDevil (pid  cid 1) joins the game
Preparing to start loaded game
Loading from SAVES/AUTOSAVE_6
Loading lib part of game...
	Reading header
	Reading options
	Reading handlers
	Reading gamestate
Loading server state
Game has been successfully loaded!
Thread handling connections ended
Connection 1 will handle 3 player: 0 2 255 
Saving to Saves/Newgame_Autosave_1
Ordering clients to serialize...
Saving lib part of game...
	Saving header
	Saving options
	Saving handlers
	Saving gamestate
Saving server state
Game has been successfully saved!
Game has been saved as Saves/Newgame_Autosave_1

You have some unknown to me mods: More Heroes and XeroDiff Balance and you loaded game from Autosave_6. I think fixed bug will work only with new games.

Those are my own mods. XeroDiff Balance is used for creature balancing. More Heroes is the mod where I add customized heroes. The save Autosave_6 was created after I had upgraded the VCMI to the latest.