Skip to main content
Topic: [solved]v101 - pure virtual function call when building a station building (Read 5058 times) previous topic - next topic

[solved]v101 - pure virtual function call when building a station building

How to reproduce:
1. Load attached savegame
2. select "Big modern terminal 2" on airport tool.
3. move cursor to (44,46)
4. click

Quote
Message: karte_t::interactive_event(event_t &ev):   calling a tool
Message: wkz_station_building_aux():   building mail office/station building on square 44,46
FATAL ERROR: unknown
pure virtual function call
Aborting program execution ...


[attachment deleted by admin]

Re: v101 - pure virtual function call when building a station building

Reply #1
Crash still occurs in rev.2266 (win-SDL).

Re: v101 - pure virtual function call when building a station building

Reply #2
I get "tile not empty" error message.

Re: v101 - pure virtual function call when building a station building

Reply #3
I get the same message for other (occupied) tiles, but for (44,46), the crash definitely happens in my setup with r2266 (pak64: r127 +f+w).

Re: v101 - pure virtual function call when building a station building

Reply #4
Tested in r2310.
Didn't crash but ...

[edit]
Ahh, this is still dangerous.
If there is a factory or a cityhall at there, we will lost it.
Maybe we might lost savegame.

Why this routine changes the position after checking empty tile.
In this case, checking empty tile is completely meaningless.

Re: v101 - pure virtual function call when building a station building

Reply #5
Actually there is first a check (Ist_platz_frei()) only then further checks are done. So there is at least on but probably several bugs.

Re: [solved]v101 - pure virtual function call when building a station building

Reply #6
Solved in r2316. Thank you.