simutrans r2081 pak64
When I load an old game and enlarge the map, simutrans crash.
How to reproduce:
1. Load attached savegame
2. Open and enlarge window
3. Set size to 320
4. Click enlarge map button
Result:
Crash.
Quote
Message: stadt_t::stadt_t(): founding new city named 'Renden'
Message: check_bau_rathaus(): bev=0, new=1 name=Renden
Message: new townhall: use layout=0
Message: stadt_t::check_bau_rathaus(): add townhall (bev=21, ptr=05BC0E10)
Message: stadt_t::change_size(): 0 + 1157
Message: stadt_t::change_size(): 1157+1157
Message: karte_t::init(): Erzeuge stadt 3 with 1254 inhabitants
Message: wegbauer_t::route_fuer(): setting way type to 1, besch=cobblestone_road, bruecke_besch=NULL
simutrans-.exe caused an Access Violation at location 005f495c in module simutrans-.exe Reading from location ffffffff.
Registers:
eax=ffffffff ebx=0513a938 ecx=0000009c edx=00000434 esi=0023efa0 edi=00730070
eip=005f495c esp=0023ee38 ebp=0023fa18 iopl=0 nv up ei ng nz na pe nc
cs=001b ss=0023 ds=0023 es=0023 fs=003b gs=0000 efl=00000282
Call stack:
005F495C simutrans-.exe:005F495C planquadrat_t::gib_kartenboden() const simplan.h:103
...
* @author Hansjrg Malthaner
*/
> inline grund_t *gib_kartenboden() const { return (ground_size<=1) ? data.one : data.some[0]; }
/**
...
0059E343 simutrans-.exe:0059E343 WinMain simsys_w16.cc:756
...
GetWindowRect(GetDesktopWindow(), &MaxSize);
> simu_main(argc, argv);
#ifdef MULTI_THREAD
...
00401247 simutrans-.exe:00401247
00401298 simutrans-.exe:00401298
7C817067 kernel32.dll:7C817067 RegisterWaitForInputIdle
And, this is from another game which also cause crash with enlarge map.
Quote
Message: karte_t::init(): Erzeuge stadt 0 with 2665 inhabitants
Message: wegbauer_t::route_fuer(): setting way type to 1, besch=cobblestone_road, bruecke_besch=NULL
Message: wegbauer_t::intern_calc_route(): cannot start on (243,7,1)
Message: wegbauer_t::intern_calc_route(): cannot start on (264,7,-1)
Wrong stop catchment area enlarged. Should be fixed in next nightly.
Solved the problem in r2089. Thank you.