The International Simutrans Forum

 

Author Topic: r2032 - Un-removable track tunnle remains when AI bankrupt  (Read 3962 times)

0 Members and 1 Guest are viewing this topic.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
r2032 - Un-removable track tunnle remains when AI bankrupt
« on: September 25, 2008, 11:31:42 AM »
simutrans v100.0 and r2032

When AI bankrupts, track tunnle remains.
This tunnle doesn't show any information with inspection tool.
And when I tried to remove this tunnel, simutrans crashed.

Quote
simutrans-.exe caused an Access Violation at location 00549c9e in module simutrans-.exe Reading from location 00000000.

Registers:
eax=00000000 ebx=051593e0 ecx=00000000 edx=0000001a esi=006d0074 edi=00730070
eip=00549c9e esp=0023f064 ebp=0023f298 iopl=0         nv up ei pl nz na pe nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000202

Call stack:
00549C9E  simutrans-.exe:00549C9E  wkz_remover_t::wkz_remover_intern(spieler_t*, karte_t*, koord, char const*&)  simwerkz.cc:373
   ...
   if(gr->ist_tunnel()  &&  gr->ist_karten_boden()) {
   DBG_MESSAGE("wkz_remover()",  "removing tunnel  from %d,%d,%d",gr->gib_pos().x, gr->gib_pos().y, gr->gib_pos().z);
>   msg = tunnelbauer_t::remove(welt, sp, gr->gib_pos(), gr->gib_weg_nr(0)->gib_waytype());
   return msg == NULL;
   }
   ...

0057023C  simutrans-.exe:0057023C  karte_t::interactive()  simworld.cc:4060
   ...
   
   if (!swallowed) {
>   interactive_event(ev);
   }
   
   ...

00595E23  simutrans-.exe:00595E23  WinMain  simsys_w16.cc:756
00401247  simutrans-.exe:00401247
00401298  simutrans-.exe:00401298
7C817067  kernel32.dll:7C817067  RegisterWaitForInputIdle

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: r2032 - Un-removable track tunnle remains when AI bankrupt
« Reply #1 on: September 28, 2008, 06:58:41 PM »
I could remove tunnel as public player. It was owned by nobody though.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: r2032 - Un-removable track tunnle remains when AI bankrupt
« Reply #2 on: September 30, 2008, 09:23:39 AM »
Crash for me.
Can someone confirm this problem with the attached savegame ?

Offline DirrrtyDirk

  • Devotees (Inactive)
  • *
  • Posts: 1253
  • JR 700 Series Shinkansen
  • Languages: EN,DE
Re: r2032 - Un-removable track tunnle remains when AI bankrupt
« Reply #3 on: September 30, 2008, 11:27:34 AM »
Tried with 2040 - crashed (also when trying as public player).

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: r2032 - Un-removable track tunnle remains when AI bankrupt
« Reply #4 on: September 30, 2008, 12:51:35 PM »
Hmm, in your testgames the way was removed, in my not. Very strange. I will correct htis.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: r2032 - Un-removable track tunnle remains when AI bankrupt
« Reply #5 on: September 30, 2008, 03:23:01 PM »
Thank you.
And bridges have problems, too.
They are public and they don't cause crash, but have "ribi 0" and be removed partly.


Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10681
  • Languages: De,EN,JP
Re: r2032 - Un-removable track tunnle remains when AI bankrupt
« Reply #6 on: September 30, 2008, 07:14:14 PM »
This should be actually both be gone with r2045 ...

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: r2032 - Un-removable track tunnle remains when AI bankrupt
« Reply #7 on: October 01, 2008, 11:08:25 AM »
Thank you, solved in r2045.

But sometimes error happened when ai bunkrupts.
I don' know this is related to this fix or not, but didn't happen before.

last 4 lines of simu.log
Quote
Message: grund_t::weg_entfernen():   this 05E3F734
Message: grund_t::weg_entfernen():   weg 05F0A328
Message: grund_t::weg_entfernen():   this 05E3F86C
Message: grund_t::weg_entfernen():   weg 05F0A300

Code: [Select]
Registers:
eax=05ee2000 ebx=05ee1ff8 ecx=00000004 edx=05c679bc esi=ffffffff edi=00730070
eip=0052dd48 esp=0023ec80 ebp=0023f038 iopl=0         nv up ei pl nz ac po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000216

Call stack:
0052DD48  simutrans-.exe:0052DD48  planquadrat_t::boden_entfernen(grund_t*)  simplan.cc:151
...
// found
while(i<ground_size) {
> data.some[i] = data.some[i+1];
i++;
}
...

00569338  simutrans-.exe:00569338  karte_t::neuer_monat()  simworld.cc:2086
...
for(int i=0; i<MAX_PLAYER_COUNT; i++) {
if(spieler[i] != NULL) {
> spieler[i]->neuer_monat();
}
}
...

0059A013  simutrans-.exe:0059A013  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
« Last Edit: October 01, 2008, 11:10:50 AM by z9999 »