The International Simutrans Forum

 

Author Topic: r2119 - Divide By Zero in stadtauto_t::can_overtake  (Read 1852 times)

0 Members and 1 Guest are viewing this topic.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
r2119 - Divide By Zero in stadtauto_t::can_overtake
« on: November 17, 2008, 07:50:24 AM »
simutrans r2119 GDI

When I loaded a very old game, simutrans crashed just after starting the game.

Quote
simutrans-.exe caused an Integer Divide By Zero at location 005979b9 in module simutrans-.exe.

Registers:
eax=000382a0 ebx=000382a0 ecx=00000000 edx=00000000 esi=08e0abb0 edi=00730070
eip=005979b9 esp=0023ee90 ebp=0023f298 iopl=0         nv up ei pl zr ac po nc
cs=001b  ss=0023  ds=0023  es=0023  fs=003b  gs=0000             efl=00000256

Call stack:
005979B9  simutrans-.exe:005979B9  stadtauto_t::can_overtake(overtaker_t*, int, int, int)  simverkehr.cc:893
0057AE28  simutrans-.exe:0057AE28  karte_t::interactive()  simworld.cc:4320
005A24E3  simutrans-.exe:005A24E3  WinMain  simsys_w16.cc:756
00401247  simutrans-.exe:00401247
00401298  simutrans-.exe:00401298
7C817067  kernel32.dll:7C817067  RegisterWaitForInputIdle

vehicle\simverkehr.cc:893
Code: [Select]
sint32 distance = current_speed*((10<<4)+steps_other)/(besch->gib_geschw()-other_speed);


« Last Edit: November 17, 2008, 07:53:52 AM by z9999 »

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10829
  • Languages: De,EN,JP
Re: r2119 - Divide By Zero in stadtauto_t::can_overtake
« Reply #1 on: November 17, 2008, 10:09:05 AM »
Hmm, not easy to see why this could happen. Do you have the savegame in question?

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
Re: r2119 - Divide By Zero in stadtauto_t::can_overtake
« Reply #2 on: November 17, 2008, 03:58:23 PM »
Thank you.
It's not my game, so I send a PM.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 10829
  • Languages: De,EN,JP
Re: r2119 - Divide By Zero in stadtauto_t::can_overtake
« Reply #3 on: November 17, 2008, 09:27:36 PM »
Maybe fixed in next nightly.

Offline z9999

  • Devotees (Inactive)
  • *
  • Posts: 848
[solved]Re: r2119 - Divide By Zero in stadtauto_t::can_overtake
« Reply #4 on: November 18, 2008, 06:29:25 AM »
Thank you.