MantisBT - VCMI
View Issue Details
0000506VCMIGUI - PreGamepublic2010-06-19 18:282014-05-30 17:39
Guitarzan 
Warmonger 
normalcrashalways
closedfixed 
x86Win 77600 64Bit
0.81 
0.82 
0000506: Crash when trying to launch XXL map
I created a random map with the XXL Patch for SOD.
When I try to launch it, VCMI crashes.
I read in the Polish forum that custom map sizes are supported, so I tried it out.

Rar contains map, both crash infos and a screenshot.
Load random_map_13.h3m
No tags attached.
rar xxl map crash.rar (987,795) 2010-06-19 18:28
https://bugs.vcmi.eu/file_download.php?file_id=424&type=bug
Issue History
2010-06-19 18:28GuitarzanNew Issue
2010-06-19 18:28GuitarzanStatusnew => assigned
2010-06-19 18:28GuitarzanAssigned To => Tow
2010-06-19 18:28GuitarzanFile Added: xxl map crash.rar
2010-06-19 18:40WarmongerNote Added: 0000954
2010-06-19 18:41WarmongerNote Edited: 0000954bug_revision_view_page.php?rev_id=886
2010-06-19 18:41WarmongerNote Deleted: 0000954
2010-06-19 18:52GuitarzanNote Added: 0000955
2010-06-19 19:03WarmongerNote Added: 0000956
2010-06-19 19:03WarmongerNote Edited: 0000956bug_revision_view_page.php?bugnote_id=956#r888
2010-06-19 19:11WarmongerNote Edited: 0000956bug_revision_view_page.php?bugnote_id=956#r889
2010-06-19 19:11WarmongerRelationship addedrelated to 0000487
2010-06-19 23:18GuitarzanNote Added: 0000957
2010-06-19 23:27TowNote Added: 0000958
2010-06-19 23:29TowAssigned ToTow => Warmonger
2010-06-20 03:34WarmongerRelationship deletedrelated to 0000487
2010-06-20 03:49WarmongerNote Added: 0000959
2010-06-20 05:05WarmongerNote Edited: 0000959bug_revision_view_page.php?bugnote_id=959#r891
2010-06-20 14:07TowNote Added: 0000960
2010-06-20 15:15WarmongerNote Added: 0000961
2010-06-20 15:15WarmongerNote Edited: 0000961bug_revision_view_page.php?bugnote_id=961#r893
2010-06-20 15:20WarmongerNote Edited: 0000961bug_revision_view_page.php?bugnote_id=961#r894
2010-06-20 15:20WarmongerNote Edited: 0000961bug_revision_view_page.php?bugnote_id=961#r895
2010-06-21 04:43WarmongerNote Added: 0000962
2010-06-21 04:43WarmongerStatusassigned => resolved
2010-06-21 04:43WarmongerFixed in Version => 0.89
2010-06-21 04:43WarmongerResolutionopen => fixed
2010-07-07 22:06ZamolxisProduct Version => 0.81
2014-05-30 17:39beegeeStatusresolved => closed

Notes
(0000955)
Guitarzan   
2010-06-19 18:52   
Yes, Warmonger.
I've tried producing other XXL maps for testing, and they all crash VCMI.
(0000956)
Warmonger   
2010-06-19 19:03   
(edited on: 2010-06-19 19:11)
I've got also a map that works, however the nature of this bug is weird.

Debugging shows that initFromBytes was called twice (!), and the first one passed succesfully. So strange that it may be related to 0000487

(0000957)
Guitarzan   
2010-06-19 23:18   
Hmm...
If you create a random map without selecting a size in SOD+XXL, (which is a standard Large map) the map loads find in VCMI.
But, every other random map created with the XXL patch causes VCMI to crash the same, regardless of the size chosen, number of total number of players, number of teams or water content.
(0000958)
Tow   
2010-06-19 23:27   
> Debugging shows that initFromBytes was called twice (!)
Indeed... once on server and second time at client side. It's normal behaviour.

Line: CArtifact *art = out[ran() % out.size()];
fails, because out vector is empty. Code for picking random RELIC class artifact fails, because apparently all relics are disabled on this map.



Stack trace (r1609):
> VCMI_lib.dll!IGameCallback::getRandomArt(int flags=16) Line 214 + 0x1a bytes C++
     VCMI_lib.dll!CBank::initialize() Line 4955 + 0x16 bytes C++
     VCMI_lib.dll!CBank::newTurn() Line 5035 + 0x8 bytes C++
     VCMI_server.exe!CGameHandler::newTurn() Line 1051 + 0x38 bytes C++
     VCMI_server.exe!CGameHandler::run(bool resume=false, const StartInfo * si=0x0034f0f0) Line 1123 C++
     VCMI_server.exe!CVCMIServer::newGame(CConnection * c=0x031508a0) Line 123 C++
     VCMI_server.exe!CVCMIServer::start() Line 174 C++
     VCMI_server.exe!wmain(int argc=2, wchar_t * * argv=0x00a6b190) Line 270 C++
     VCMI_server.exe!__tmainCRTStartup() Line 552 + 0x19 bytes C
     VCMI_server.exe!wmainCRTStartup() Line 371 C
(0000959)
Warmonger   
2010-06-20 03:49   
(edited on: 2010-06-20 05:05)
Ah, that makes much more sense.

What to do in such case? Replace all artifacts with spelbooks fo example? Or just report error?

(0000960)
Tow   
2010-06-20 14:07   
What is H3 behaviour?
(0000961)
Warmonger   
2010-06-20 15:15   
(edited on: 2010-06-20 15:20)
All the arts (even treasures) were replaced with Bow of Sharpshooter, which is rather undesired. When I pick them, they turn into Wizards' Well - 3DO didn't handle it either.

However I used this patch and it didn't cause such problems before, let's take it as very rare and unwanted case.

There's also another issue I just discovered - at the moment spellbook (id=0) can't be placed on adveture map in VCMI (as it is possible in WoG), game hangs after map is loaded.

(0000962)
Warmonger   
2010-06-21 04:43   
Fixed in r1610