Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: z9999 on February 11, 2009, 12:52:39 pm
Title: r2319 - Crash when build a brigde crossong monorail
Post by: z9999 on February 11, 2009, 12:52:39 pm
When I build a bridge which is crossing monorail, simutrans crash.
Quote
Message: karte_t::interactive_event(event_t &ev): calling a tool Message: brueckenbauer_t::baue(): called on 60,91 for bridge type 'ModernRoad' Message: brueckenbauer_t::baue(): build from 60,91,0 FATAL ERROR: crossing_t::crossing_t() requested for waytypes 1 and 5 but nothing defined! Aborting program execution ...
Please report all fatal errors to
Quote
sim.exe caused an Integer Divide By Zero at location 0058d06d in module sim.exe.
Registers: eax=0000000f ebx=0023ea40 ecx=00000000 edx=00000000 esi=006d0074 edi=00730070 eip=0058d06d esp=0023e708 ebp=0023e9c8 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: 0058D06D sim.exe:0058D06D log_t::fatal(char const*, char const*, ...) log.cc:238 ... 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; } ...
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: z9999 on February 11, 2009, 06:01:15 pm
Sorry, double post. Similar problems.
- Power brigde can connect to monorail - Rail bridge can connect to elevated road
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: Dwachs on February 11, 2009, 07:04:40 pm
It seems like simutrans wants to create a crossing there! In the monorail case it crashes with the message 'No crossing between waytypes x and y defined'.
Imho, your observation in post 2 is more a feature than a bug ;)
Patch attached.
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: prissi on February 11, 2009, 09:11:39 pm
Imho Powerlines and crossing also are not intended. Thank you for the bugfix!
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: z9999 on February 12, 2009, 06:22:07 am
I can't compile it.
Quote
$ make ===> DEP simcity.cc ===> DEP bauer/brueckenbauer.cc ===> CXX bauer/brueckenbauer.cc bauer/brueckenbauer.cc: In static member function `static koord3d brueckenbauer_t::finde_ende(karte_t*, koord3d, koord, const bruecke_besch_t*, const char*&)': bauer/brueckenbauer.cc:219: error: expected `while' before "gr2" bauer/brueckenbauer.cc:219: error: expected `(' before "gr2" bauer/brueckenbauer.cc:219: error: expected `)' before ';' token bauer/brueckenbauer.cc: At global scope: bauer/brueckenbauer.cc:263: error: expected unqualified-id before "while" bauer/brueckenbauer.cc:266: error: expected constructor, destructor, or type conversion before '=' token bauer/brueckenbauer.cc:267: error: expected unqualified-id before "return" bauer/brueckenbauer.cc:268: error: expected declaration before '}' token make: *** [bauer/brueckenbauer.o] Error 1
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: Dwachs on February 12, 2009, 06:55:21 am
In brueckenbauer.cc line 203 a '{' is missing.
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: z9999 on February 12, 2009, 12:35:13 pm
Thank you. Solved the crash problem.
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: Dwachs on February 23, 2009, 09:00:59 pm
The same bug appears for bridges ending on vertical slopes. Patch attached.
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: prissi on February 23, 2009, 10:00:21 pm
Wegbauer.cc already contains bool wegbauer_t::check_crossing(). Maybe the logik from there should be reused?
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: Dwachs on February 24, 2009, 06:57:45 am
yes, of course! I did not know that.
Another issue: it is still possible to build a bridge through a double slope if a suitable bridge end can be found behind. Hidden feature or bug?
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: gerw on February 24, 2009, 07:19:24 am
Also the crossing with leitungen has to be checked (wegbauer_t::check_for_leitung).
Another issue is found with powerline bridges starting/ending on ways (image and patch attached).
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: prissi on February 24, 2009, 09:21:43 am
I think the building through a slope should be forbidden too.
Title: Re: r2319 - Crash when build a brigde crossong monorail
Post by: Dwachs on February 24, 2009, 08:11:21 pm