Skip to main content

Show Posts

This section allows you to view all Show Posts made by this member. Note that you can only see Show Posts made in areas you currently have access to.

Messages - Hanczar

2
Simutrans-Extended development / Re: [bug v6.1] P****enger/mail convoi weird display
Here you go

pak 64, one train line, it has loaded mail and p****engers ( mail slot empty and mail bags at the end of p****enger list )
http://simutrans-germany.com/files/upload/pak64_train_with_p****enger_mail.sve

pak 128, there is a bus line "(3) Line Pas" between Hereford and London, it has loaded only mail ( 2 mail slots are displayed after clicking on it ).
http://simutrans-germany.com/files/upload/p****enger_mail_convoy.sve

Problem is reproducible every time for every convoy which transport p****enger and mail ( checked on buses and trains ).
If on such convoy has loaded only mail without p****engers -> display shows 2 mail slots.
If such convoy has loaded mail and p****engers -> display shows empty mail slot, and mails bags at the end of p****enger list.
4
Simutrans-Extended development / gprof on SE 6.1
Hi,
I was asked to run gprof with new version.

centralized path search, Yoshi well developed save game ( yoshi87-2-101.sve )
profile from loading game, and fastforward through two months ( 1 August - 2 October )

 
Code: [Select]
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total          
 time   seconds   seconds    calls   s/call   s/call  name   
 17.78     23.70    23.70     1002     0.02     0.02  path_explorer_t::compartment_t::step()
 10.47     37.66    13.96    14952     0.00     0.00  karte_t::sync_step(long, bool, bool)
  4.43     43.56     5.90  6493920     0.00     0.00  display_img_aux(unsigned int, short, short, int, bool)
  3.07     47.65     4.09   899322     0.00     0.00  haltestelle_t::hole_ab(ware_besch_t const*, unsigned int, schedule_t const*, spieler_t const*, convoi_t*)
  2.30     50.72     3.06 91893479     0.00     0.00  planquadrat_t::get_boden_in_hoehe(short) const
  1.91     53.27     2.55 176115732     0.00     0.00  grund_t::get_hoehe() const
  1.75     55.60     2.33 28919702     0.00     0.00  convoi_t::sync_step(long)
  1.64     57.79     2.19  1721419     0.00     0.00  hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::put(sync_steppable*, sync_steppable*)
  1.43     59.70     1.91 134020314     0.00     0.00  vehikel_basis_t::fahre_basis(unsigned int)
  1.42     61.59     1.89 17172945     0.00     0.00  convoi_t::calc_acceleration(long)
  1.37     63.41     1.82 27709211     0.00     0.00  convoi_t::step()
  1.27     65.11     1.70 145209180     0.00     0.00  ding_t::get_flag(ding_t::flag_values) const
  1.22     66.73     1.62 47299503     0.00     0.00  quickstone_tpl<simline_t>::is_bound() const
  1.19     68.32     1.59 58702496     0.00     0.00  vehikel_t::get_gesamtgewicht() const
  1.13     69.83     1.50 53592195     0.00     0.00  grund_t::get_vmove(koord) const
  1.05     71.23     1.41 95889267     0.00     0.00  dingliste_t::bei(unsigned char) const
  1.05     72.62     1.40 984440325     0.00     0.00  vector_tpl<ware_t>::get_count() const
  1.04     74.02     1.39 96303660     0.00     0.00  grund_t::get_weg(waytype_t) const
  0.99     75.33     1.31 55792036     0.00     0.00  vehikel_t::get_frictionfactor() const
  0.94     76.58     1.25 54594377     0.00     0.00  ding_t::is_moving() const
  0.86     77.73     1.15 451953241     0.00     0.00  ware_t::get_besch() const
  0.82     78.82     1.09 555062394     0.00     0.00  vector_tpl<ware_t>::operator[](unsigned int)
  0.82     79.91     1.09 12484608     0.00     0.00  dingliste_t::remove(ding_t const*)
  0.81     80.99     1.08 410595159     0.00     0.00  slist_iterator_tpl<hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::node_t>::next()
  0.75     81.98     0.99 549415079     0.00     0.00  quickstone_tpl<haltestelle_t>::quickstone_tpl(quickstone_tpl<haltestelle_t> const&)
  0.74     82.97     0.98 279300031     0.00     0.00  koord3d::get_2d() const
  0.73     83.94     0.97 174352925     0.00     0.00  karte_t::lookup(koord) const
  0.69     84.86     0.93  8295244     0.00     0.00  vehikel_t::hop()
  0.64     85.72     0.85 159118527     0.00     0.00  array_tpl<vehikel_t*>::operator[](unsigned int)
  0.64     86.57     0.85 71533136     0.00     0.00  fussgaenger_t::sync_step(long)
  0.64     87.42     0.85  8406673     0.00     0.00  binary_heap_tpl<route_t::ANode*>::pop()
  0.62     88.25     0.83 29154269     0.00     0.00  planquadrat_t::get_boden_count() const
  0.61     89.06     0.81 91983019     0.00     0.00  karte_t::lookup(koord3d) const
  0.59     89.85     0.79 26355641     0.00     0.00  grund_t::get_neighbour(grund_t*&, waytype_t, koord) const
  0.56     90.59     0.74  1264193     0.00     0.00  stadtauto_t::hop_check()
  0.54     91.31     0.72   116007     0.00     0.00  route_t::intern_calc_route(karte_t*, koord3d, koord3d, fahrer_t*, unsigned int, unsigned int, unsigned int)
  0.50     91.97     0.66 448949646     0.00     0.00  ware_besch_t::get_catg_index() const
  0.48     92.61     0.64 15187762     0.00     0.00  convoi_t::calc_adjusted_power()
  0.47     93.23     0.62  8888187     0.00     0.00  int_sqrt(unsigned int)
  0.44     93.82     0.59 436629257     0.00     0.00  ware_t::get_zwischenziel() const
  0.44     94.40     0.58 190850468     0.00     0.00  slist_tpl<hashtable_tpl<quickstone_tpl<haltestelle_t>, haltestelle_t::connexion*, quickstone_hash_tpl<haltestelle_t> >::node_t>::empty() const
  0.42     94.96     0.56  1566383     0.00     0.00  verkehrsteilnehmer_t::hop()
  0.39     95.47     0.52 377485657     0.00     0.00  koord::koord(short, short)
  0.38     95.98     0.51 108387051     0.00     0.00  obj_besch_t::get_child(int) const
  0.38     96.49     0.51  5670071     0.00     0.00  fabrik_t::step(long)
  0.36     96.97     0.48 174432890     0.00     0.00  karte_t::ist_in_kartengrenzen(short, short) const
  0.35     97.44     0.47 123249155     0.00     0.00  route_t::ANode::operator<=(route_t::ANode) const
  0.35     97.91     0.46 160792715     0.00     0.00  ding_t::set_flag(ding_t::flag_values)
  0.34     98.36     0.45 199642923     0.00     0.00  operator==(koord const&, koord const&)
  0.32     98.78     0.43 11351955     0.00     0.00  dingliste_t::intern_add_moving(ding_t*)
  0.32     99.20     0.42  8416847     0.00     0.00  haltestelle_t::get_ware_summe(ware_besch_t const*) const
  0.31     99.62     0.41  5209147     0.00     0.00  freelist_t::gimme_node(unsigned int)
  0.30    100.03     0.41 212712957     0.00     0.00  slist_iterator_tpl<hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::node_t>::access_current()
  0.30    100.42     0.40 12954229     0.00     0.00  dingliste_t::add(ding_t*)
  0.29    100.81     0.39 104961809     0.00     0.00  ding_t::get_pos() const
  0.29    101.19     0.38  8442612     0.00     0.00  vehikel_t::hop_check()
  0.28    101.56     0.38 26296568     0.00     0.00  grund_t::is_connected(grund_t const*, waytype_t, koord) const
  0.28    101.94     0.38  4791280     0.00     0.00  quickstone_tpl<haltestelle_t>::operator!=(quickstone_tpl<haltestelle_t> const&) const
  0.28    102.31     0.37 80174266     0.00     0.00  grund_t::get_grund_hang() const
  0.27    102.67     0.36     4601     0.00     0.00  karte_ansicht_t::display(bool)
  0.27    103.03     0.35 129456349     0.00     0.00  hashtable_iterator_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::next()
  0.27    103.38     0.35 27512174     0.00     0.00  planquadrat_t::get_boden_bei(unsigned int) const
  0.26    103.73     0.35  7708304     0.00     0.00  stadtauto_t::sync_step(long)
  0.26    104.07     0.34 208776141     0.00     0.00  quickstone_tpl<haltestelle_t>::operator==(quickstone_tpl<haltestelle_t> const&) const
  0.25    104.40     0.33 17622215     0.00     0.00  fixed_list_tpl<short, 16>::add_index(unsigned char, unsigned char, int)
  0.24    104.72     0.32 14727359     0.00     0.00  vehikel_basis_t::calc_height()
  0.23    105.03     0.31 278284064     0.00     0.00  ptrhash_tpl<sync_steppable*>::comp(sync_steppable*, sync_steppable*)
  0.23    105.33     0.31   580859     0.00     0.00  vector_tpl<ware_t>::vector_tpl()
  0.23    105.64     0.30 36095965     0.00     0.00  quickstone_tpl<haltestelle_t>::is_bound() const
  0.22    105.92     0.29  5626957     0.00     0.00  gebaeude_t::sync_step(long)
  0.21    106.21     0.28 195016241     0.00     0.00  slist_iterator_tpl<hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::node_t>::get_current() const
  0.21    106.49     0.28  2875773     0.00     0.00  hashtable_tpl<quickstone_tpl<haltestelle_t>, haltestelle_t::connexion*, quickstone_hash_tpl<haltestelle_t> >::empty() const
  0.21    106.77     0.28     2291     0.00     0.00  path_explorer_t::compartment_t::clear_all_connexion_tables()
  0.20    107.04     0.27  8193922     0.00     0.00  vehikel_t::calc_modified_speed_limit(koord3d const*, unsigned char, bool)
  0.20    107.30     0.26 45514307     0.00     0.00  waggon_t::get_waytype() const
  0.20    107.56     0.26  2399437     0.00     0.00  automobil_t::ist_weg_frei(int&)
  0.19    107.81     0.26 129445134     0.00     0.00  hashtable_iterator_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::get_current_value() const
  0.19    108.06     0.25 10752740     0.00     0.00  vehikel_basis_t::betrete_feld()
  0.18    108.31     0.24  9435275     0.00     0.00  binary_heap_tpl<route_t::ANode*>::insert(route_t::ANode*)
  0.18    108.55     0.24 138061132     0.00     0.00  koord3d::koord3d()
  0.18    108.79     0.24 27986558     0.00     0.00  quickstone_tpl<convoi_t>::operator->() const
  0.18    109.03     0.23 36618546     0.00     0.00  quickstone_tpl<convoi_t>::quickstone_tpl(quickstone_tpl<convoi_t> const&)
  0.18    109.26     0.23 32463838     0.00     0.00  planquadrat_t::get_halt() const
  0.18    109.50     0.23 21664384     0.00     0.00  bild_besch_t::get_nummer() const
  0.18    109.73     0.23 18897828     0.00     0.00  haltestelle_t::get_basis_pos() const
  0.17    109.96     0.23    62824     0.00     0.00  display_fillbox_wh(short, short, short, short, unsigned short, int)
  0.17    110.19     0.23    12196     0.00     0.01  karte_t::step()
  0.17    110.41     0.22 16161647     0.00     0.00  simrand(unsigned int)
  0.17    110.63     0.22  1201129     0.00     0.00  stadt_t::bewerte_loc(koord, char const*, unsigned short)
  0.16    110.84     0.21 30403859     0.00     0.00  bildliste_besch_t::get_bild(unsigned short) const
  0.16    111.06     0.21 33916711     0.00     0.00  planquadrat_t::get_kartenboden() const
  0.16    111.27     0.21 31002367     0.00     0.00  grund_t::get_halt() const
  0.16    111.47     0.21 17999616     0.00     0.00  vehikel_t::rauche()
  0.16    111.69     0.21 16503851     0.00     0.00  convoi_t::get_heaviest_vehicle() const
  0.16    111.89     0.21  2375010     0.00     0.00  fabrik_t::get_base_production() const
  0.16    112.11     0.21   279577     0.00     0.00  stadt_t::step_p****agiere()
  0.15    112.31     0.20  6599533     0.00     0.00  vector_tpl<ware_t>::operator[](unsigned int) const
  0.15    112.51     0.20 73821087     0.00     0.00  grund_t::get_weg_hang() const
  0.15    112.71     0.20 17257899     0.00     0.00  convoi_t::book(long long, int)
  0.15    112.91     0.20 14071617     0.00     0.00  wolke_t::sync_step(long)
  0.14    113.09     0.19 15296269     0.00     0.00  simrand_plain()
  0.14    113.28     0.18 29675138     0.00     0.00  weg_t::get_ribi_unmasked() const
  0.14    113.45     0.18  2960470     0.00     0.00  dingliste_t::suche(ding_t::typ, unsigned char) const
  0.13    113.62     0.17  6949776     0.00     0.00  waggon_t::betrete_feld()
  0.13    113.80     0.17   963244     0.00     0.00  haltestelle_t::recalc_status()
  0.12    113.96     0.17 53798055     0.00     0.00  grund_t::ist_bruecke() const
  0.12    114.12     0.16 26114378     0.00     0.00  marker_t::ist_markiert(grund_t const*) const
  0.12    114.28     0.16 10451171     0.00     0.00  haltestelle_t::get_besitzer() const
  0.12    114.44     0.16  8505637     0.00     0.00  spieler_t::buche(long long, player_cost)
  0.12    114.59     0.15 10760141     0.00     0.00  vehikel_basis_t::verl****e_feld()
  0.11    114.75     0.15 29500972     0.00     0.00  grund_t::get_weg_ribi_unmasked(waytype_t) const
  0.11    114.89     0.15 14913854     0.00     0.00  grund_t::ist_tunnel() const
  0.11    115.05     0.15  9517689     0.00     0.00  vehikel_besch_t::get_bild_nr(unsigned char, ware_besch_t const*) const
  0.11    115.19     0.15  2807502     0.00     0.00  display_mark_img_dirty(unsigned int, short, short)
  0.11    115.34     0.15  2682072     0.00     0.00  int_noise(long, long)
  0.11    115.50     0.15  1045746     0.00     0.00  waggon_t::ist_weg_frei(int&)
  0.11    115.64     0.14  2848702     0.00     0.00  haltestelle_t::is_enabled(ware_besch_t const*)
  0.11    115.78     0.14 50998359     0.00     0.00  str****e_t::get_waytype() const
  0.11    115.92     0.14 45371205     0.00     0.00  ware_t::get_index() const
  0.11    116.06     0.14 41029177     0.00     0.00  quickstone_tpl<haltestelle_t>::operator->() const
  0.11    116.20     0.14  7965269     0.00     0.00  vehikel_t::calc_akt_speed(grund_t const*)
  0.10    116.33     0.14  8193922     0.00     0.00  fixed_list_tpl<short, 16>::add_to_tail(short)
  0.10    116.47     0.14  5645060     0.00     0.00  karte_t::lookup_kartenboden(koord) const
  0.10    116.60     0.13  1257642     0.00     0.00  slist_tpl<grund_t const*>::is_contained(grund_t const* const&) const
  0.10    116.73     0.13   743426     0.00     0.00  waggon_t::block_reserver(route_t const*, unsigned short, int, bool) const
  0.09    116.85     0.12 95029541     0.00     0.00  grund_t::obj_bei(unsigned char) const
  0.09    116.97     0.12   629135     0.00     0.00  stadt_t::step(long)
  0.09    117.09     0.12   227883     0.00     0.00  convoi_t::laden()
  0.09    117.20     0.12 18158865     0.00     0.00  koord::koord(unsigned char)
  0.09    117.32     0.12 10752566     0.00     0.00  grund_t::get_weg_yoff() const
  0.09    117.44     0.12 10045216     0.00     0.00  haltestelle_t::get_halt(karte_t*, koord3d, spieler_t const*)
  0.09    117.55     0.12  1680131     0.00     0.00  dingliste_t::display_dinge(short, short, unsigned char, bool) const
  0.08    117.66     0.11 29236036     0.00     0.00  vehikel_basis_t::get_fahrtrichtung() const
  0.08    117.77     0.11  6028644     0.00     0.00  hashtable_tpl<quickstone_tpl<haltestelle_t>, haltestelle_t::connexion*, quickstone_hash_tpl<haltestelle_t> >::get(quickstone_tpl<haltestelle_t>) const
  0.08    117.88     0.11  1723915     0.00     0.00  hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::remove(sync_steppable*)
  0.08    117.99     0.11  1721419     0.00     0.00  slist_tpl<sync_steppable*>::remove_first()
  0.08    118.10     0.11  1386928     0.00     0.00  path_explorer_t::compartment_t::get_path_between(quickstone_tpl<haltestelle_t>, quickstone_tpl<haltestelle_t>, unsigned short&, quickstone_tpl<haltestelle_t>&)
5
Simutrans-Extended development / Re: [Bug v4.5] An Easy Way to Become a Billionnaire ^_^
Quote
I interpreted electrifaction as laying power lines between a power factory and another factory, but what was meant here was electrification of tracks
Quote
Thats what I mean, this particular bug indeed didn't exist before (as far as I know), but a similar bug with powerlines did

For me it looks now exactly as this.  Construct power line on every title gives me ~43000000 $ .
It happens when I have exe built from sources, or downloaded from http://www.43-1.org/~simutrans/simutrans-exp/i386/.
I have used clean configs but all time the same.  Build 5.1 ( released 17 VII 2009 ) works ok , build 6.1 ( released 26 VII 2009 ) gives 43M per power line title.

Ubuntu 9.04, 32-bit
EDIT: I tested pak64 and pak128 on both problem is reproducible.
6
Incorporated Patches and Solved Bug Reports / Re: [rev 2542] Compile problem on Linux
In relation to recently opened thread:
http://forum.simutrans.com/index.php?topic=2831.0

I think that compilation problem when DEBUG is not defined in some random place with missing reference to standard library function don't tells good for everyone who download sources and try compile it.

So for me such scenarios looks ok in consideration of problems mentioned in previous posts:
a) define DEBUG is defined always , so it not need to enable it in configuration makefile, or in this makefile is note that it must be defined. ( But then this variable loss its sense )
b) compilation breaks with error some like this ("currently non-DEBUG builds are not supported") , not by random missing reference to function from standard library.

c) DEBUG is not needed, compilation without it is corrected.
+ optionaly the most important debug parts are moved outside debug variable, and code which can have influence on performance as sanity checks inside loops or something like this are kept only in debug builds.
+ optionaly info in title of window on nondebug builds meaning "crash reports from nondebugs builds are not respected and they are ignored ".
8
Simutrans-Extended development / [bug v6.1] P****enger/mail convoi weird display
I create  convoy with bus and post trailer.
But after a while when open convoy display There appears two mail slots ( 1/25 mail and 0/25 mail )
Screenshot in attachment.

pak128, Simutrans 6.1
It very reproductive for me ( 4/4 ). This problem was introduced before 6.1, I saw it before, only I don't bother with it.


I saw similar problem about a week ago, when I load Yoshi big game to collect some profile data.
When I click on train with p****engers and mail wagons, it shows f.e 0/120 Mail loaded, but some bags with mails are displayed at end of p****enger list.
Screenshot done in current simutrans version in attachment.
pak64, Simutrans 6.1

In Simutrans-Standards such convoys displayed data correctly.


EDIT: images uploaded again ( thanks for reporting that they was broken ).
9
Simutrans-Extended development / Re: [Valgrind v5.0]

I attach trivial patch which removes like 90% valgrinds reports related to Simutrans Experimental. It only adds initialization of three variables with zeros in vehikel_t constructors as it seems that they are later used in ****umption that they initial state is zero.

EDIT: proper patch in attachment
10
Implemented feature ideas / Re: Re-scaling Simutrans
I tried 4096x4096 512xcities 128xindustries with default city size equals 1600, and it took about 2 min on release build.
When I increase size of cities to 50000 on choice map, it took about 15 min to create ( ~50min on gprof build ).

Run on:
AMD 64bit 5200+ (2Cores), 4GB Ram
Ubuntu 9.04 32bit
Simutrans Experimental 5.1

Gprof output from 4096x4096 512xcities 128xindustries with median citizens per city 50000 below
Memory consumed by simutrans after creating map was 830 MB.

Profile contains:
1. starting simutrans ( ~30s)
2. creating map  ( ~50min)
3. about ~3min freeplay without user action
4. saving map (~2min)
5. game exit ( ~20 s )

Code: [Select]

Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total          
 time   seconds   seconds    calls  Ks/call  Ks/call  name    
 13.00    117.11   117.11 549407190     0.00     0.00  stadt_t::bewerte_loc(koord, char const*, int)
 10.64    212.96    95.85 364706243     0.00     0.00  karte_t::lookup(koord) const
  6.85    274.68    61.72    14224     0.00     0.00  karte_t::sync_step(long, bool, bool)
  5.14    321.02    46.34 3704417418     0.00     0.00  int_noise(long, long)
  5.13    367.21    46.20 3983280983     0.00     0.00  karte_t::lookup_kartenboden(koord) const
  4.85    410.87    43.65   237557     0.00     0.00  slist_tpl<weg_t*>::remove(weg_t* const&)
  3.55    442.85    31.98  6996965     0.00     0.00  display_img_nc(short, short, short, unsigned short const*)
  2.99    469.74    26.89 31000511     0.00     0.00  planquadrat_t::get_kartenboden() const
  2.64    493.49    23.75 431849510     0.00     0.00  karte_t::ist_in_kartengrenzen(short, short) const
  2.51    516.10    22.61   417116     0.00     0.00  bauplatz_mit_str****e_sucher_t::find_dist_next_special(koord) const
  1.73    531.66    15.56 2424424730     0.00     0.00  ding_t::get_pos() const
  1.24    542.81    11.14 24962556     0.00     0.00  stadt_t::baue()
  1.04    552.19     9.38   967778     0.00     0.00  hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::put(sync_steppable*, sync_steppable*)
  0.94    560.68     8.49 915996195     0.00     0.00  grund_t::get_hoehe() const
  0.94    569.17     8.49 2637349483     0.00     0.00  operator==(koord const&, koord const&)
  0.94    577.62     8.45 411601927     0.00     0.00  smoothed_noise(int, int)
  0.90    585.75     8.12 606167970     0.00     0.00  simrand(unsigned int)
  0.80    592.98     7.23 1392724500     0.00     0.00  grund_t::get_weg(waytype_t) const
  0.78    600.02     7.04 320128882     0.00     0.00  ding_t::get_flag(ding_t::flag_values) const
  0.77    607.00     6.98        2     0.00     0.38  karte_t::distribute_groundobjs_cities(int, short, short)
  0.76    613.85     6.85 2349165751     0.00     0.00  weighted_vector_tpl<gebaeude_t*>::const_iterator::operator++()
  0.75    620.63     6.79 328759854     0.00     0.00  planquadrat_t::get_boden_in_hoehe(short) const
  0.75    627.37     6.73 2349165751     0.00     0.00  koord_distance(koord3d, koord)
  0.74    634.05     6.68      542     0.00     0.00  slist_tpl<koord>::at(unsigned int) const
  0.71    640.46     6.41 330637814     0.00     0.00  karte_t::lookup(koord3d) const
  0.71    646.83     6.37 313375935     0.00     0.00  fussgaenger_t::sync_step(long)
  0.65    652.68     5.86 755799640     0.00     0.00  slist_iterator_tpl<hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::node_t>::next()
  0.63    658.34     5.65 210929037     0.00     0.00  grund_t::get_vmove(koord) const
  0.60    663.71     5.38 16777215     0.00     0.00  planquadrat_t::rdwr(karte_t*, loadsave_t*, koord)
  0.60    669.08     5.37 316523988     0.00     0.00  vehikel_basis_t::fahre_basis(unsigned int)
  0.54    673.96     4.88 1126814832     0.00     0.00  grund_t::hat_weg(waytype_t) const
  0.49    678.38     4.42  3085439     0.00     0.00  get_aus_liste(vector_tpl<haus_besch_t const*> const&, int, unsigned short, climate)
  0.48    682.71     4.33 2755450246     0.00     0.00  koord::koord(short, short)
  0.47    686.91     4.21  2396339     0.00     0.00  brueckenbauer_t::finde_ende(karte_t*, koord3d, koord, bruecke_besch_t const*, char const*&, bool)
  0.45    690.96     4.04 102900481     0.00     0.00  interpolated_noise(double, double)
  0.44    694.93     3.98 42030290     0.00     0.00  binary_heap_tpl<route_t::ANode*>::pop()
  0.44    698.89     3.96 137476790     0.00     0.00  stadt_t::bewerte_pos(koord, char const*)
  0.44    702.82     3.92 2349582813     0.00     0.00  weighted_vector_tpl<gebaeude_t*>::const_iterator::operator!=(weighted_vector_tpl<gebaeude_t*>::const_iterator const&)
  0.42    706.64     3.82      542     0.00     0.00  slist_tpl<koord>::remove(koord const&)
  0.41    710.35     3.71 46569685     0.00     0.00  grund_t::calc_back_bild(signed char, signed char)
  0.41    714.03     3.69 2349165737     0.00     0.00  weighted_vector_tpl<gebaeude_t*>::const_iterator::operator*() const
  0.39    717.56     3.53 58107946     0.00     0.00  pixcopy(unsigned short*, unsigned short const*, unsigned int)
  0.38    720.95     3.39 203741444     0.00     0.00  karte_t::ist_in_kartengrenzen(koord) const
  0.37    724.30     3.35     5442     0.00     0.00  wegbauer_t::intern_calc_route(vector_tpl<koord3d> const&, vector_tpl<koord3d> const&)
  0.37    727.61     3.31 105455715     0.00     0.00  grund_t::get_neighbour(grund_t*&, waytype_t, koord) const
  0.36    730.82     3.21 1162947311     0.00     0.00  koord3d::get_2d() const
  0.34    733.88     3.06 113961692     0.00     0.00  planquadrat_t::get_boden_count() const
  0.33    736.85     2.98 23772308     0.00     0.00  hashtable_tpl<char const*, groundobj_besch_t*, stringhash_t>::empty() const
  0.32    739.76     2.91 326629625     0.00     0.00  hashtable_iterator_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::next()
  0.29    742.34     2.58 2401002969     0.00     0.00  slist_tpl<hashtable_tpl<char const*, groundobj_besch_t*, stringhash_t>::node_t>::empty() const
  0.28    744.90     2.56 394409010     0.00     0.00  karte_t::lookup_hgt(koord) const
  0.27    747.34     2.44 680559013     0.00     0.00  route_t::ANode::operator<=(route_t::ANode) const
  0.25    749.63     2.29 308512111     0.00     0.00  stadt_t::bewerte_str****e(koord, int, char const*)
  0.25    751.89     2.27 561700816     0.00     0.00  simrand_plain()
  0.23    753.97     2.07  1672401     0.00     0.00  weighted_vector_tpl<gebaeude_t*>::remove_at(unsigned int)
  0.23    756.00     2.04        2     0.00     0.06  karte_t::cleanup_karte(int, int)
  0.22    758.00     2.00 40583965     0.00     0.00  wegbauer_t::is_allowed_step(grund_t const*, grund_t const*, long*)
  0.20    759.85     1.84   900162     0.00     0.00  MTgenerate()
  0.20    761.67     1.82 507734363     0.00     0.00  haus_besch_t::is_allowed_climate(climate) const
  0.19    763.38     1.71 15174334     0.00     0.00  karte_t::ist_platz_frei(koord, short, short, int*, climate_bits) const
  0.18    765.02     1.65 50622775     0.00     0.00  karte_t::access(koord)
  0.18    766.65     1.63 426771711     0.00     0.00  ptrhash_tpl<sync_steppable*>::comp(sync_steppable*, sync_steppable*)
  0.18    768.28     1.63 342388308     0.00     0.00  koord3d::koord3d()
  0.18    769.91     1.63 329983232     0.00     0.00  ding_t::set_flag(ding_t::flag_values)
  0.18    771.53     1.61 454396529     0.00     0.00  slist_iterator_tpl<hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::node_t>::get_current() const
  0.18    773.12     1.59 546432400     0.00     0.00  karte_t::ist_in_gittergrenzen(short, short) const
  0.17    774.68     1.56       91     0.00     0.00  setsimrand(unsigned int, unsigned int)
  0.17    776.23     1.54   685454     0.00     0.00  display_img_wc(short, short, short, unsigned short const*)
  0.17    777.75     1.53   967831     0.00     0.00  hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::remove(sync_steppable*)
  0.17    779.27     1.52 600437204     0.00     0.00  operator==(koord const&, koord const&)
  0.17    780.79     1.51 811692728     0.00     0.00  grund_t::get_grund_hang() const
  0.17    782.29     1.50 16781312     0.00     0.00  planquadrat_t::~planquadrat_t()
  0.17    783.78     1.50 298990603     0.00     0.00  slist_iterator_tpl<hashtable_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::node_t>::access_current()
  0.16    785.25     1.47 50361612     0.00     0.00  karte_t::calc_natural_slope(koord) const
  0.16    786.65     1.40 339770087     0.00     0.00  dingliste_t::bei(unsigned char) const
  0.15    788.02     1.36 163078008     0.00     0.00  dingliste_t::get_top() const
  0.15    789.38     1.35 44949134     0.00     0.00  binary_heap_tpl<route_t::ANode*>::insert(route_t::ANode*)
  0.15    790.72     1.34 326615405     0.00     0.00  hashtable_iterator_tpl<sync_steppable*, sync_steppable*, ptrhash_tpl<sync_steppable*> >::get_current_value() const
  0.15    792.06     1.34 27655731     0.00     0.00  hausbauer_t::get_special(int, haus_besch_t::utyp, unsigned short, bool, climate)
  0.15    793.38     1.32 174228472     0.00     0.00  marker_t::ist_markiert(grund_t const*) const
  0.15    794.70     1.31 17150081     0.00     0.00  perlin_noise_2D(double, double, double)
  0.13    795.91     1.22 62590928     0.00     0.00  karte_t::max_hgt(koord) const
  0.13    797.12     1.21 245128128     0.00     0.00  operator+(koord const&, koord const&)
  0.13    798.33     1.21 804865381     0.00     0.00  boden_t::get_typ() const
  0.13    799.52     1.20 594593471     0.00     0.00  slist_iterator_tpl<haus_besch_t const*>::next()
  0.13    800.71     1.19 146899693     0.00     0.00  operator+(koord3d const&, koord const&)
  0.13    801.88     1.18                             non-virtual thunk to fussgaenger_t::sync_step(long)
  0.12    803.00     1.11 179042014     0.00     0.00  boden_t::ist_natur() const
  0.12    804.11     1.11 34200191     0.00     0.00  freelist_t::gimme_node(unsigned int)
  0.12    805.15     1.04    14227     0.00     0.00  karte_ansicht_t::display(bool)
  0.11    806.17     1.02 414274897     0.00     0.00  grund_t::get_weg_hang() const
  0.11    807.18     1.01 464087130     0.00     0.00  koord3d::koord3d(short, short, signed char)
  0.11    808.20     1.01 16789631     0.00     0.00  karte_t::raise_clean(short, short, short)

EDIT: profile result moved in code section
11
Implemented feature ideas / Re: Re-scaling Simutrans
I run simutrans with gprof ( with simutrans compiled with fno-inline/fno-default-inline to keep called functions ) during creating map.

Creating map 512x512 ( 16 cities, 6 industries ) took  18 s  ( 8 s on optimized build without profiler ) .

Quote
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total          
 time   seconds   seconds    calls   s/call   s/call  name   
 30.25      2.54     2.54 102878640     0.00     0.00  int_noise(long, long)
  5.73      3.02     0.48    92709     0.00     0.00  display_img_nc(short, short, short, unsigned short const*)
  3.58      3.31     0.30 11430960     0.00     0.00  smoothed_noise(int, int)
  3.58      3.62     0.30    27877     0.00     0.00  image_reader_t::read_node(_IO_FILE*, obj_node_info_t&)
  2.86      3.85     0.24      280     0.00     0.00  create_textured_tile_mix(bild_besch_t const*, unsigned char, bild_besch_t const*, bild_besch_t const*, bild_besch_t const*, bild_besch_t const*)
  2.51      4.07     0.21   651651     0.00     0.00  stadt_t::bewerte_loc(koord, char const*, int)
  2.27      4.25     0.19 69412056     0.00     0.00  vector_tpl<baum_besch_t const*>::operator[](unsigned int)
  2.27      4.45     0.19 55460617     0.00     0.00  decode_uint16(char*&)
  1.85      4.60     0.15  2857740     0.00     0.00  interpolated_noise(double, double)
  1.43      4.72     0.12   349794     0.00     0.00  baum_t::random_tree_for_climate_intern(climate)
  1.31      4.83     0.11 17618868     0.00     0.00  planquadrat_t::get_kartenboden() const
  1.31      4.94     0.11 17572288     0.00     0.00  karte_t::lookup(koord) const
  1.19      5.04     0.10  1432460     0.00     0.00  grund_t::get_neighbour(grund_t*&, waytype_t, koord) const
  1.13      5.13     0.10       54     0.00     0.00  setsimrand(unsigned int, unsigned int)

Creating map 2048x2048  ( 16 cities, 6 industries )  took  4m 50s  ( 1m 8s on optimized build without profiler )

Quote
Flat profile:

Each sample counts as 0.01 seconds.
  %   cumulative   self              self     total          
 time   seconds   seconds    calls   s/call   s/call  name   
 19.28     11.45    11.45 910421384     0.00     0.00  int_noise(long, long)
  8.54     16.52     5.07 2268456581     0.00     0.00  vector_tpl<baum_besch_t const*>::operator[](unsigned int)
  6.29     20.25     3.73 143427665     0.00     0.00  planquadrat_t::get_kartenboden() const
  5.54     23.54     3.29 34642258     0.00     0.00  baum_t::get_anzahl_besch(climate)
  5.39     26.74     3.20 2012634501     0.00     0.00  baum_besch_t::is_allowed_climate(climate) const
  4.30     29.30     2.56  8663719     0.00     0.00  baum_t::random_tree_for_climate_intern(climate)
  3.58     31.42     2.12 2055940478     0.00     0.00  vector_tpl<baum_besch_t const*>::get_count() const
  3.13     33.28     1.86 101157929     0.00     0.00  smoothed_noise(int, int)
  1.92     34.42     1.14 83651997     0.00     0.00  simrand(unsigned int)
  1.85     35.52     1.10 129127330     0.00     0.00  karte_t::lookup(koord) const
  1.73     36.55     1.02 25289479     0.00     0.00  interpolated_noise(double, double)
  1.53     37.45     0.91      132     0.01     0.19  baum_t::create_forest(karte_t*, koord, koord)
  1.36     38.27     0.81 38166453     0.00     0.00  baum_t::plant_tree_on_coordinate(karte_t*, koord, unsigned char)
  1.27     39.02     0.76  9237598     0.00     0.00  grund_t::calc_back_bild(signed char, signed char)
  1.22     39.74     0.72 625806692     0.00     0.00  slist_tpl<hashtable_tpl<char const*, groundobj_besch_t*, stringhash_t>::node_t>::empty() const
  1.18     40.45     0.70  6196106     0.00     0.00  hashtable_tpl<char const*, groundobj_besch_t*, stringhash_t>::empty() const
  1.15     41.12     0.68 26420166     0.00     0.00  baum_t::get_typ() const
  0.99     41.71     0.58  3066671     0.00     0.00  karte_t::ist_platz_frei(koord, short, short, int*, climate_bits) const
  0.94     42.27     0.56        2     0.28     3.15  karte_t::distribute_groundobjs_cities(int, short, short)
  0.89     42.80     0.53        2     0.27     1.89  karte_t::cleanup_karte(int, int)
  0.84     43.30     0.50   103346     0.00     0.00  display_img_nc(short, short, short, unsigned short const*)
  0.81     43.78     0.48 283692089     0.00     0.00  koord::koord(short, short)
  0.76     44.23     0.45 69828794     0.00     0.00  karte_t::lookup_hgt(koord) const
  0.74     44.67     0.44 83602020     0.00     0.00  simrand_plain()
  0.61     45.03     0.36 52667916     0.00     0.00  dingliste_t::get_top() const
  0.60     45.39     0.35 19098119     0.00     0.00  freelist_t::gimme_node(unsigned int)
  0.60     45.74     0.35        6     0.06     0.06  setsimrand(unsigned int, unsigned int)
  0.56     46.08     0.34  8665740     0.00     0.00  ding_t::mark_image_dirty(unsigned short, signed char) const
  0.54     46.40     0.32 145920942     0.00     0.00  karte_t::ist_in_kartengrenzen(short, short) const
  0.51     46.70     0.30   133978     0.00     0.00  MTgenerate()
  0.49     46.99     0.29  4202626     0.00     0.00  karte_t::raise_clean(short, short, short)
  0.45     47.26     0.27 12595211     0.00     0.00  karte_t::calc_natural_slope(koord) const
  0.45     47.53     0.27  8642742     0.00     0.00  karte_t::max_hgt(koord) const
  0.45     47.80     0.27 46034195     0.00     0.00  grund_t::hat_wege() const
  0.44     48.05     0.26    27877     0.00     0.00  image_reader_t::read_node(_IO_FILE*, obj_node_info_t&)
  0.41     48.30     0.24 78692899     0.00     0.00  karte_t::get_groesse_x() const
  0.39     48.53     0.23 108213142     0.00     0.00  karte_t::ist_in_gittergrenzen(short, sh

So time of creating map is in rough linear with comparison to size.

For 4 M titles some of functions are called for 2 G times, it looks as a quite big amount
12
Simutrans-Extended development / Re: [bug v5.1] Click Depot Crash
EDIT:<<<<
Sry, I was looking at this problem and don't see your post.
Quote
Thanks a lot for your help.
No problem, It's nice to help with small brick for such great game ;-)

Quote
Unfortunately, crash reports like yours cannot help to identify the code that causes the problem. I think the only way to find the root cause is to review all ST EXP specific code once.
I'll try give as much information as is possible, and I know that backtraces can be sometimes very useful for crashes :-) and sometimes not..
EDIT:>>>>

I look through backtraces and code and such thing is suspicious to me:

In depot_frame_t  constructor initializes convoy_****embler by calling check_way_electrified() function, but in check_way_electrified function, convoy_****embler->set_electrified() is called.
So convoy_****embler->set_electrified() it called before convoy_****embler is initialized and proper constructor for this called.

backtrace in quotes in previous comment shows exactly this case:
frame #4 : depot_frame_t (this=0xb1c5f20, depot=0xa6cdd58) at gui/depot_frame.cc:50   <- so constructor for depot here is called
frame #3 : depot_frame_t::check_way_electrified (this=0xb1c5f20) at gui/depot_frame.cc:710  <- check_way_electrified before convoy_****embler is initialized
frame #2 : 0x080cde38 in gui_convoy_****embler_t::build_vehicle_lists (this=0xb1c64a8) at gui/components/gui_convoy_****embler.cc:481 <- build_vehlicle_list is on convoi_****embler called ( from convoy:set_electrified) before it is initialized, and it crashes .

second backtrace crashes 'a few lines of code' later, in constructor of convoy_****embler, but maybe because situation above doesn't crash this time only corrupt some memory
13
Simutrans-Extended development / [bug v5.1] Click Depot Crash
Sometimes it happens that after clicking on depot game crashes.

Occurs on version 5.1 either, when clicking on tram depot.

crashes in malloc, so reason seems as some memory corruption?
backtrace:
#0  0xb7cedb18 in ?? () from /lib/tls/i686/cmov/libc.so.6
#1  0xb7cef9c5 in malloc () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7ecef47 in operator new () from /usr/lib/libstdc++.so.6
#3  0xb7ecf08d in operator new[] () from /usr/lib/libstdc++.so.6
#4  0x080d2787 in vector_tpl<gui_image_list_t::image_data_t>::resize (this=0xcdf6928, new_size=31) at gui/components/../../tpl/vector_tpl.h:58
#5  0x080ce433 in gui_convoy_****embler_t::build_vehicle_lists (this=0xcdf6290) at gui/components/gui_convoy_****embler.cc:508
#6  0x080cfb63 in gui_convoy_****embler_t (this=0xcdf6290, w=0x97b6e20, wt=tram_wt, player_nr=0 '\0', electrified=true) at gui/components/gui_convoy_****embler.cc:106
#7  0x080f0056 in depot_frame_t (this=0xcdf5d08, depot=0xcc8b340) at gui/depot_frame.cc:50
#8  0x08182499 in depot_t::zeige_info (this=0xcc8b340) at simdepot.cc:168
#9  0x081beb81 in wkz_abfrage_t::work (this=0xc664e50, welt=0x97b6e20, sp=0xcad1080, pos={x = 118, y = 35, z = 0 '\0', static invalid = {x = -1, y = -1, z = -1 'ÿ', static invalid = <same as static member of an already seen type>}}) at simwerkz.cc:342
#10 0x081cdfdf in karte_t::interactive_event (this=0x97b6e20, ev=@0xbfae2608) at simworld.cc:4636
#11 0x081ce3bc in karte_t::interactive (this=0x97b6e20) at simworld.cc:4769
#12 0x081a27c4 in simu_main (argc=704, argv=0xd439218) at simmain.cc:957
#13 0x081ff718 in main (argc=1, argv=0xbfae4744) at simsys_s.cc:737

and in thread about valgrind I put other backtrace from crash after clicking depot.  It crashes in some other place, but context on backtrace is similar ( build_vehicle_list ).

Quote
#0  0x0804d024 in einstellungen_t::get_use_timeline (this=0x73) at vehicle/../dataobj/einstellungen.h:396
(gdb) bt
#0  0x0804d024 in einstellungen_t::get_use_timeline (this=0x73) at vehicle/../dataobj/einstellungen.h:396
#1  0x0804d343 in karte_t::get_timeline_year_month (this=0x9c75218) at simworld.h:540
#2  0x080cde38 in gui_convoy_****embler_t::build_vehicle_lists (this=0xb1c64a8) at gui/components/gui_convoy_****embler.cc:481
#3  0x080edb75 in depot_frame_t::check_way_electrified (this=0xb1c5f20) at gui/depot_frame.cc:710
#4  0x080f0006 in depot_frame_t (this=0xb1c5f20, depot=0xa6cdd58) at gui/depot_frame.cc:50
#5  0x08182499 in depot_t::zeige_info (this=0xa6cdd58) at simdepot.cc:168
#6  0x081beb81 in wkz_abfrage_t::work (this=0x9ee9bd0, welt=0x9ca6c90, sp=0x9ca23b0, pos={x = 229, y = 81, z = 3 '\003', static invalid = {x = -1, y = -1, z = -1 'ÿ', static invalid = <same as static member of an already seen type>}}) at simwerkz.cc:342
#7  0x081cdfdf in karte_t::interactive_event (this=0x9ca6c90, ev=@0xbfb8beb8) at simworld.cc:4636
#8  0x081ce3bc in karte_t::interactive (this=0x9ca6c90) at simworld.cc:4769
#9  0x081a27c4 in simu_main (argc=704, argv=0xa69bcd8) at simmain.cc:957
#10 0x081ff788 in main (argc=1, argv=0xbfb8dff4) at simsys_s.cc:737


Ubuntu 9.04, 32-bit, Simutrans 5.1 built from sources
pak128 with modified configs
15
Simutrans-Extended development / [bug 5.1] index of bounds in vector
When I started new games in 5.1 version, they works quite stable by six hours ( my previous game started with 5.0 crashes often as I wrote in thread about Valgrind reports ).
But after playing about 2 hours in new game, a message window appear with 'FATAL ERROR: vector_tpl<T>::[] index out of bounds: 0 not in 0..-1, press any key' and abort was called.

Screenshot with error attached.

backtrace:
#0  0xb80c1430 in __kernel_vsyscall ()
#1  0xb7da16d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7da3098 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0x081dfb8e in log_t::fatal (this=0x84ba130, who=0x820082d "vector_tpl<T>::[]", format=0x8200984 "index out of bounds: %i not in 0..%d") at utils/log.cc:244
#4  0x08133243 in vector_tpl<quickstone_tpl<convoi_t> >::operator[] (this=0x4f54, i=6) at dataobj/../dataobj/../tpl/vector_tpl.h:233
#5  0x08133271 in simline_t::get_convoy (this=0xbf911f8, i=0) at simline.h:115
#6  0x081dcc65 in path_explorer_t::compartment_t::step (this=0xbb8b48c) at path_explorer.cc:612
#7  0x081dd292 in path_explorer_t::step () at path_explorer.cc:82
#8  0x081cda75 in karte_t::step (this=0x8587a50) at simworld.cc:3002
#9  0x081ce4f8 in karte_t::interactive (this=0x8587a50) at simworld.cc:4743
#10 0x081a27c4 in simu_main (argc=704, argv=0xbec6d10) at simmain.cc:957
#11 0x081ff718 in main (argc=1, argv=0xbfbdd044) at simsys_s.cc:737

Version 5.1 built from sources, with using pak128 with modified config files.
16
Simutrans-Extended development / Re: [Valgrind v5.0]
Quote
Obviously, this bug is not caused by Line 939, but it has nevertheless triggered it. The real culprit may be some other centralised path searching code, but it can also be caused by other unrelated code.

Yes, this backtrace tells only that during this allocation from line 939, corruption memory in glibc was detected, and completely other part of program can do it. Although high probability is that is related to centralised path system I think.

Quote
for (uint16 i = 0; i < working_halt_count; i++)
{
transport_matrix = new transport_element_t[working_halt_count];
}

I sry, I didn't put it at once in previous comment, when it occured I checked variables, and they was : working_halt_count = 24 and i = 13.
17
Simutrans-Extended development / Re: [Valgrind v5.0]
And this one occured exactly during click on truck depot. I have save game with decentralized path system, load it, played it about 20 min, enable centralized path system, and in two minutes during click on truck depot crash:

#0  0x0804d024 in einstellungen_t::get_use_timeline (this=0x73) at vehicle/../dataobj/einstellungen.h:396
(gdb) bt
#0  0x0804d024 in einstellungen_t::get_use_timeline (this=0x73) at vehicle/../dataobj/einstellungen.h:396
#1  0x0804d343 in karte_t::get_timeline_year_month (this=0x9c75218) at simworld.h:540
#2  0x080cde38 in gui_convoy_****embler_t::build_vehicle_lists (this=0xb1c64a8) at gui/components/gui_convoy_****embler.cc:481
#3  0x080edb75 in depot_frame_t::check_way_electrified (this=0xb1c5f20) at gui/depot_frame.cc:710
#4  0x080f0006 in depot_frame_t (this=0xb1c5f20, depot=0xa6cdd58) at gui/depot_frame.cc:50
#5  0x08182499 in depot_t::zeige_info (this=0xa6cdd58) at simdepot.cc:168
#6  0x081beb81 in wkz_abfrage_t::work (this=0x9ee9bd0, welt=0x9ca6c90, sp=0x9ca23b0, pos={x = 229, y = 81, z = 3 '\003', static invalid = {x = -1, y = -1, z = -1 'ÿ', static invalid = <same as static member of an already seen type>}}) at simwerkz.cc:342
#7  0x081cdfdf in karte_t::interactive_event (this=0x9ca6c90, ev=@0xbfb8beb8) at simworld.cc:4636
#8  0x081ce3bc in karte_t::interactive (this=0x9ca6c90) at simworld.cc:4769
#9  0x081a27c4 in simu_main (argc=704, argv=0xa69bcd8) at simmain.cc:957
#10 0x081ff788 in main (argc=1, argv=0xbfb8dff4) at simsys_s.cc:737

(gdb) frame 0
#0  0x0804d024 in einstellungen_t::get_use_timeline (this=0x73) at vehicle/../dataobj/einstellungen.h:396
(gdb) frame 1
#1  0x0804d343 in karte_t::get_timeline_year_month (this=0x9c75218) at simworld.h:540
(gdb) print einstellungen
$3 = (einstellungen_t *) 0x73

so pointer for einstellungen in karte_t was invalid, maybe together with some memory area corrupted.
18
Simutrans-Extended development / Re: [Valgrind v5.0]
I played more than one hour with disabled centralized path system, then I turn it on and after few minutes it crashed.


*** glibc detected *** /home/hanczar/workspace/simutrans-experimental-cpy/simutrans/sim: corrupted double-linked list: 0x09fd5280 ***
======= Backtrace: =========
/lib/tls/i686/cmov/libc.so.6[0xb7c9c604]
/lib/tls/i686/cmov/libc.so.6[0xb7c9f5d2]
/lib/tls/i686/cmov/libc.so.6(__libc_malloc+0x95)[0xb7ca09c5]
/usr/lib/libstdc++.so.6(_Znwj+0x27)[0xb7e7ff47]
/usr/lib/libstdc++.so.6(_Znaj+0x1d)[0xb7e8008d]
/home/hanczar/workspace/simutrans-experimental-cpy/simutrans/sim[0x81dcf56]
======= Memory map: ========


backtrace:

(gdb) bt
#0  0xb7f78430 in __kernel_vsyscall ()
#1  0xb7c586d0 in raise () from /lib/tls/i686/cmov/libc.so.6
#2  0xb7c5a098 in abort () from /lib/tls/i686/cmov/libc.so.6
#3  0xb7c9624d in ?? () from /lib/tls/i686/cmov/libc.so.6
#4  0xb7c9c604 in ?? () from /lib/tls/i686/cmov/libc.so.6
#5  0xb7c9f5d2 in ?? () from /lib/tls/i686/cmov/libc.so.6
#6  0xb7ca09c5 in malloc () from /lib/tls/i686/cmov/libc.so.6
#7  0xb7e7ff47 in operator new () from /usr/lib/libstdc++.so.6
#8  0xb7e8008d in operator new[] () from /usr/lib/libstdc++.so.6
#9  0x081dcf56 in path_explorer_t::compartment_t::step (this=0x9f7957c) at path_explorer.cc:939
#10 0x081dd262 in path_explorer_t::step () at path_explorer.cc:82
#11 0x081cda75 in karte_t::step (this=0x9fd3c80) at simworld.cc:3002
#12 0x081ce4f8 in karte_t::interactive (this=0x9fd3c80) at simworld.cc:4743
#13 0x081a27c4 in simu_main (argc=704, argv=0xa9c7a58) at simmain.cc:957
#14 0x081ff788 in main (argc=1, argv=0xbfb93804) at simsys_s.cc:737
19
Simutrans-Extended development / Re: [Valgrind v5.0]
2x time exactly when I clicked on tram depot ( without any convoi ). Rest 3-4times I don't exactly remember, rather when I do usual  actions on map ( scrolling , clicking on buildings , convoys ).
I'll try catch backtrace from such crash.
20
Simutrans-Extended development / Re: [Valgrind v5.0]
Version 5.1 (built from 2009VII18 sources ) crashes from time to time - in 20 min - 1h of play, with error from glibc about memory corruption.
I tried to catch this problem with valgrind but with no luck. Log from playing 5.1 version attached. It was centralized / decentralized / centralized switches during this play, but I don't see reports related to path searches.
Using uninitialized variables which developers from ST Standard corrected not occurs any more - thanks :) - but some probably related to Experimental still exists.

21
Simutrans-Extended development / Re: [Valgrind v5.0]
Valgrind marks as 'definitely lost' only memory block which was allocated but not freed and there is no more pointers for this block in program. So this block can't be used anymore nor deleted.  Valgrind can be cheated by hiding pointers by doing some arithmetic operations on them - but this is not common practise ;) - and very seldom it log false reports.
I look and check a few from log and they seem to be real memory leaks , even this one with zero bytes loses ;)
Quote
0 bytes in 559 blocks are definitely lost in loss record 1 of 250
I know that most of problems are trivial one, but they still are bugs, and such great memory leak detection tool can help to find some more serious problems :)
23
Simutrans-Extended development / Re: [Valgrind v5.0]
Quote
I should be very grateful if you could run Valgrind again on version 5.1
No problem :) As soon as it'll be available :)

Quote
May I know whether you were using centralised path searching system or distributed path searching system during testing?

I can't find any entry in your file regarding path_explorer_t or path_explorer.cc . I just want to make sure.

Centralised. So problems in path_explorer not detected yet ;)



I run it again with same larger game and there seems to be one problem which occurs in hundreds times

Conditional jump or move depends on uninitialised value(s)
==16003==    at 0x81E0D13: money_to_string(char*, double) (simstring.cc:82)
==16003==  Uninitialised value was created by a heap allocation
==16003==    at 0x40269EE: operator new(unsigned int) (vg_replace_malloc.c:224)
==16003==    by 0x817B94D: convoi_t::rdwr(loadsave_t*) (simconvoi.cc:2178)
==16003==    by 0x817F031: convoi_t::convoi_t(karte_t*, loadsave_t*) (simconvoi.cc:190)
==16003==    by 0x81D36E7: karte_t::laden(loadsave_t*) (simworld.cc:3969)
==16003==    by 0x51E58803: ???

Something is not initialized during load?
whole log attached
24
Simutrans-Extended development / [Valgrind v5.0]
Hi,

I run SimutranExperimental built from today sources ( 2009VII15 ) with Valgrind tool. It was a new short game, only one tram line and one bus line created and run by about month.
Valgrind showed usage of some unitialized variables and memory leaks. I think it can be useful for developers , so I attach valgrind log from this game. Even if some problems reported are minors and hasn't bit influence on game, I think it can be worth of clean it up as later it will be easier to catch serious problems.
I'll try later run valgrind with larger p****enger network but first I have to create one ;)