News:

The Forum Rules and Guidelines
Our forum has Rules and Guidelines. Please, be kind and read them ;).

r2275+pakHajo105 - Crash during launching

Started by z9999, January 31, 2009, 08:48:02 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

z9999

r2275 GDI + pakHajo 105

When I start simutrans and select pak.Hajo, it causes crash.
At least r2237 can launch with this pakset, so I think this is the program error.

[edit]
I added "intercity_road_type" in simuconf.tab and didn't crash.
Problem is here.

const weg_besch_t* besch = wegbauer_t::get_besch(umgebung_t::intercity_road_type);


Quote
Message: karte_t::distribute_groundobjs_cities():   distributing groundobjs
Message: karte_t::distribute_groundobjs_cities():   prepare cities
Message: karte_t::init():   get random places in climates 7e
Message: karte_t::finde_plaetze():   for size (2,3) in map (64,64)
Message: karte_t::init():   found 221 places
Message: stadt_t::stadt_t():   Welt 05718CD0
Message: stadt_t::stadt_t():   '時又' is unique
Message: stadt_t::stadt_t():   founding new city named '時又'
Message: check_bau_rathaus():   bev=0, new=1 name=時又
Message: new townhall:   use layout=0
Message: stadt_t::check_bau_rathaus():   add townhall (bev=77, ptr=055F5750)
Message: stadt_t::change_size():   0 + 585
Message: stadt_t::change_size():   585+585
Message: karte_t::distribute_groundobjs_cities():   Erzeuge stadt 0 with 998 inhabitants

Quote
sim.exe caused an Access Violation at location 005c7d49 in module sim.exe Reading from location 00000000.

Registers:
eax=00000000 ebx=056e4008 ecx=056e4008 edx=00000010 esi=056e4008 edi=056e4008
eip=005c7d49 esp=0023e784 ebp=0023e9b8 iopl=0         nv up ei pl nz na po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000206

Call stack:
005C7D49  sim.exe:005C7D49  stringhash_t::hash(char const*)  stringhashtable_tpl.h:22
005777B0  sim.exe:005777B0  karte_t::enlarge_map(einstellungen_t*, signed char*)  simworld.cc:1312
   ...
   marker.init(new_groesse_x, new_groesse_y);
   
>   distribute_groundobjs_cities(sets->get_anzahl_staedte(),old_x, old_y);
   
   // hausbauer_t::neue_karte(); <- this would reinit monuments! do not do this!
   ...

005B02D3  sim.exe:005B02D3  WinMain  simsys_w16.cc:756
00401247  sim.exe:00401247
00401298  sim.exe:00401298
7C817067  kernel32.dll:7C817067  RegisterWaitForInputIdle

Frank

no error in program

in simuconf.tab not defined

# Type of initial intercity roads - must be available
# as PAK file. Fallback (if PAK is not found) is "asphalt_road"
intercity_road_type = cobblestone_road

# Type of city roads - must be available as PAK file.
# Fallback (and default) is "city_road"
city_road_type = city_road


jamespetts

It can't be right to say that there's no error in the program when a missing line in a configuration file causes an access violation. The error in the program is not having a system of handling the absence of such a line. Indeed, the simuconf.tab comments specifically state that there is a fallback ("ashphalt_road"); perhaps it is this that is not working?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Frank

sorry,

fallback is, if not found defined pak-file

no defined pakfile is a pakset-error



jamespetts

If that is the case, the program should produce an error message stating "Error: no inter-city road specified in the simuconf.tab of your selected pakset", not crash with an access violation.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

prissi


Frank

#6
r2290

tested parameter intercity_road_type

simutrans crash by not found pak file
Message: check_bau_rathaus(): bev=0, new=1 name=Rasttal
Message: new townhall: use layout=0
Message: stadt_t::check_bau_rathaus(): add townhall (bev=84, ptr=0100DA08)
Message: stadt_t::change_size(): 0 + 206
Message: stadt_t::change_size(): 206+206
Message: karte_t::distribute_groundobjs_cities(): Erzeuge stadt 0 with 737 inhabitants
Warning: karte_t::init(): road type '


not trim the pak file name
example 'asphalt_road ' then crash
Message: check_bau_rathaus(): bev=0, new=1 name=Rasttal
Message: new townhall: use layout=0
Message: stadt_t::check_bau_rathaus(): add townhall (bev=84, ptr=0100DA08)
Message: stadt_t::change_size(): 0 + 206
Message: stadt_t::change_size(): 206+206
Message: karte_t::distribute_groundobjs_cities(): Erzeuge stadt 0 with 737 inhabitants
Warning: karte_t::init(): road type '


not defined then crash
Message: check_bau_rathaus(): bev=0, new=1 name=Rasttal
Message: new townhall: use layout=0
Message: stadt_t::check_bau_rathaus(): add townhall (bev=84, ptr=0100D960)
Message: stadt_t::change_size(): 0 + 206
Message: stadt_t::change_size(): 206+206
Message: karte_t::distribute_groundobjs_cities(): Erzeuge stadt 0 with 737 inhabitants

prissi