News:

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

r2000 + pak64 on WinXp, Random Crashes

Started by yoshi, September 06, 2008, 07:45:31 AM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

yoshi

r2000 + pak64 on WinXp
I encounter random crashes when viewing or scrolling over the game view. I guess this bug already existed at least in 100.0.

I know this is not a good bug report, as I'm not sure when I encounter this bug and I cannot reproduce it. But I have taken log files and they might help to fix the bug...

<Last 20 lines from log1>

Warning: route_t::find_route():   Too many steps (693>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (694>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (695>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (696>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (696>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (697>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (66>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (697>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (699>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (700>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (700>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (700>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (700>=max 1000000) in route (too long/complex)
Message: karte_t::interactive_event(event_t &ev):   calling a tool
Message: wkz_abfrage():   checking map square 449,328
Message: wkz_abfrage():   index 0
Message: gebaeude_t::zeige_info():   at 448,328 - name is 'Tankstelle'
Message: gui_textarea_t::recalc_size():   reset size to 11,22
Message: create_win():   ins_win=0
Message: create_win():   new ins_win=1


<Last 20 lines from log2>

Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Message: route_t::append():   last=427,134,0   first=427,134,0
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (67>=max 1000000) in route (too long/complex)
Message: karte_t::interactive_event(event_t &ev):   calling a tool
Message: wkz_abfrage():   checking map square 254,140
Message: wkz_abfrage():   index 0
Message: gebaeude_t::zeige_info():   at 253,140 - name is 'Ölkraftwerk'
Message: gui_textarea_t::recalc_size():   reset size to 11,22


<Last 20 lines from log3>

Warning: route_t::find_route():   Too many steps (68>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (68>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (68>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (68>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (68>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (68>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (68>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (68>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (68>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (69>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (69>=max 1000000) in route (too long/complex)
Message: karte_t::interactive_event():   Keyboard event with code 27 '?'
Warning: void release_focus():   Focus was already released
Message: karte_t::interactive_event():   Keyboard event with code 0 '?'
Warning: route_t::find_route():   Too many steps (69>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (69>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (69>=max 1000000) in route (too long/complex)
Message: karte_t::interactive_event(event_t &ev):   calling a tool
Message: wkz_abfrage():   checking map square 237,312
Message: wkz_abfrage():   index 0
Message: gebaeude_t::zeige_info():   at 237,311 - name is 'Ölkraftwerk'
Message: gui_textarea_t::recalc_size():   reset size to 11,22


prissi

Actually, this is nothing out of the ordinary. :( Sorry, I can not help about this.

yoshi

OK, thank you. I will try to produce a savegame with the bug...

whoami

I also have random crashes in the recent past, e.g. with rev.2002 (Win-SDL), both Pak64 and Pak128.

There is the same action right before the crash in the three examples from Yoshi and the one simu.log that I could record: the info windows for a factory is opened. But ST doesn't consistently crash, even for a given factory, so it may have to do with the values that are going to be shown.
There are also other occasions where ST exits, with no obvious connection to any user action, so I thought that it could have to do with factory/curiosity creation. The connection between the two reasons could be: factory details (connections) have been changed before the info window is opened.

simu.log at a crash (Pak128):
Warning: route_t::find_route():   Too many steps (1>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (14>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (8>=max 1000000) in route (too long/complex)
Message: karte_t::interactive_event(event_t &ev):   calling a tool
Message: wkz_abfrage():   checking map square 148,194
Message: wkz_abfrage():   index 0
Message: gebaeude_t::zeige_info():   at 147,192 - name is 'Stahlwerk'
Message: gui_textarea_t::recalc_size():   reset size to 11,22

prissi

By the way, was the debug level 3 or 4 (-debug 4)? Then you could use mingw to find out in which routine simutrans crashed. It seem to me rather like a debuglevel 1 (default).

z9999

Quote from: prissi on September 07, 2008, 07:26:58 PM
By the way, was the debug level 3 or 4 (-debug 4)? Then you could use mingw to find out in which routine simutrans crashed. It seem to me rather like a debuglevel 1 (default).

Maybe 5...

log.cc
Quote
#ifdef DEBUG
   if(old_level>4) {
      // generate a division be zero error, if the user request it
      printf("%i",15/make_this_a_division_by_zero);
      make_this_a_division_by_zero &= 0xFF;
   }
#endif

And default level is not 1 but 4.

simmain.cc
Quote
   if(  gimme_arg(argc, argv, "-debug", 0) != NULL  ) {
      const char *s = gimme_arg(argc, argv, "-debug", 1);
      int level = 4;
      if(s!=NULL  &&  s[0]>='0'  &&  s[0]<='9'  ) {
         level = atoi(s);
      }
      umgebung_t::verbose_debug = level;
   }

whoami

#6
Now I got an access violation when querying a church (Pak128) - Dr.Watson output attached, executable is Win-SDL rev.2002 nightly. I also have a user.dmp of 110 MB. :) The church isn't even connected to a stop, and the problem is not reproducable.

Warning: route_t::find_route():   Too many steps (1>=max 1000000) in route (too long/complex)
Warning: route_t::find_route():   Too many steps (1>=max 1000000) in route (too long/complex)
Message: karte_t::interactive_event(event_t &ev):   calling a tool
Message: wkz_abfrage():   checking map square 227,148
Message: wkz_abfrage():   index 0
Message: gebaeude_t::zeige_info():   at 227,148 - name is 'Besonderes Gebaeude'
Message: create_win():   ins_win=0
Message: create_win():   new ins_win=1

prissi

Infourtunately Dr. Watson is useless. The only thing marginally useful is Drmingw.

whoami

#8
OK then, the attached zipfile contains output for five crashes under the eyes of DrMingW on W2KPro (the first two may lack information due to missing switches). All but the last (Win-GDI rev.2009) are for Win-SDL rev.2008.
(The map is a small, but densely developed world that is used with Pak128 rev.61, and doesn't load in 100.0-release, so I can't compare that version.)

Even these files show very little information, and the whole thing is very inconclusive - no connection to a certain user action is evident, and the map itself will run with fast-forward for hours, as long as there is no user action. Simu.log doesn't show anything useful, even with debug level 5.

hellmade

#9
hi prissi,

maybe this helps a bit:

Message: gebaeude_t::zeige_info():      at 234,154 - name is 'M�llverbrennungsanlage'
Message: gui_textarea_t::recalc_size(): reset size to 11,22
Message: create_win():  ins_win=2
Message: create_win():  new ins_win=3
Speicherzugriffsfehler


This is the output of a linux version (-log option dosn't seem to generate a file there btw)
I always get the crashes if I am doing somthing, espescialy opening a window and mostly (but not always) when its gebaeude_t::zeige_info. That dosn't mean that zeige_info always crashes. It runs perfectly for 100 times but then it just crashes.
Maybe this has something to do with the position the window should be placed.



prissi

All this does not help any bit, I am afraid.

@whoami
All but the last one are errors inside Windows. Maybe with your graphivs driver? Simutrans uses 16Bit bitmaps, which are unfourtunately poorly supported (and tested) with many graphics driver.

You can try to use an own build (it is not too difficult with svn and mingw), which may give a little more info on a crash. But without that I would need a savegame to debug and some course of action to crash it.

hellmade

hi prissi, please read my last post again since I've extended it.
The problem is that if I hat found a routin and/or savegame causing the crash all the times everything would be here.


I've been using r1952 to r2009 encountering the crashes.

jarauh

On my system, the first version 100.0 and pak64 used to be pretty stable.
Since I use the nightly and pak128 I also experience these difficulties. I run Gentoo, so assuming that my problems are related, they are not specific to Windows.

prissi

Well, all these debug messages are pretty standard messages and do not really give a hint, what may have gone wrong :(

whoami

(I finally got around to install a MinWG build environment.)

Now I've played the same map for hours with a full debugging executable (revs.2014, 2015), and naturally, no crash occurred. Does anybody still encounter crashes (as described here) in revisions 2014 or later?

yoshi

I have also played with self-compiled r2016 with debug level 3 for some hours. But I didn't encounter any crashes... It has been solved? I'm not sure.

whoami

No further reports about this - hopefully solved by the bugfix from topic r2022:all paks:memory corruption => closed.