The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: z9999 on November 17, 2008, 07:50:24 AM

Title: r2119 - Divide By Zero in stadtauto_t::can_overtake
Post by: z9999 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

sint32 distance = current_speed*((10<<4)+steps_other)/(besch->gib_geschw()-other_speed);



Title: Re: r2119 - Divide By Zero in stadtauto_t::can_overtake
Post by: prissi on November 17, 2008, 10:09:05 AM
Hmm, not easy to see why this could happen. Do you have the savegame in question?
Title: Re: r2119 - Divide By Zero in stadtauto_t::can_overtake
Post by: z9999 on November 17, 2008, 03:58:23 PM
Thank you.
It's not my game, so I send a PM.
Title: Re: r2119 - Divide By Zero in stadtauto_t::can_overtake
Post by: prissi on November 17, 2008, 09:27:36 PM
Maybe fixed in next nightly.
Title: [solved]Re: r2119 - Divide By Zero in stadtauto_t::can_overtake
Post by: z9999 on November 18, 2008, 06:29:25 AM
Thank you.