Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mechanics sometimes fall down from rides #7176

Open
2 tasks done
deurklink opened this issue Feb 13, 2018 · 18 comments
Open
2 tasks done

Mechanics sometimes fall down from rides #7176

deurklink opened this issue Feb 13, 2018 · 18 comments
Labels
original bug This was an issue in the original game already.

Comments

@deurklink
Copy link
Contributor

deurklink commented Feb 13, 2018

OS: Windows 10
Version: 0.1.2
Commit/Build: 3ea6a3e - Original bug

Sometimes, mechanics fall down from a ride. I first noticed this on my space base park, which has paths which are all above ground level. Sometimes a mechanic would get stuck down in a building with no way to get up. Later on when i made a park that was competely suspended above water, i sometimes noticed a mechanic drowning for no reason.

I decided to make a test park with many rides above water, and 50 mechanics. After fastforwarding for 22 years, i only had about 30 mechanics left.

This behaviour is also present in vanilla RCT2.

  • Reproducible in RCT2 (vanilla)?
  • Multiplayer?

Steps to reproduce:

  1. Open my test park which is completely above water
  2. Fastforward for a few years
  3. Watch the amount of mechanics slowly decline as they drown

Screenshots / Video:
image
In above screenshot, i fastforwarded for many years. I started with 50 mechanics. The handymen and guests do not drown.

Save game:
___Mechanictest.zip

@AaronVanGeffen
Copy link
Member

I guess even mechanics get dizzy sometimes… 😉

@deurklink
Copy link
Contributor Author

Just to clarify, I haven't caught a mechanic in the act of falling down yet, so i don't know when exactly it happens. It's one of those rare things you find out when it has already happened.

@LordMarcel
Copy link

I tested this along with Deurklink and in further tests I found out that in a certain save file, the same mechanic drowns at the same time every time I load the game. In the save file I attached mechanic 28 will drown on the 8th of may, right when he walks out of the station's side of an exit to start an inspection.

Mechanic drowning.zip

@AaronVanGeffen
Copy link
Member

Tagging @zaxcav, our resident pathfinding expert. 😃

janisozaur added a commit to janisozaur/OpenRCT2 that referenced this issue Feb 13, 2018
While looking at
OpenRCT2#7176 (comment)
I got a crash with stacktrace:

    OpenRCT2#0 0x7f9e81fa2e30 in object_entry_get_entry(int, unsigned long) ../src/openrct2/object/ObjectList.cpp:181
    #1 0x7f9e81fa24ae in get_loaded_object_entry(unsigned long) ../src/openrct2/object/ObjectList.cpp:142
    #2 0x7f9e8215d64f in S6Exporter::Export() ../src/openrct2/rct2/S6Exporter.cpp:169
    #3 0x7f9e8216de71 in scenario_save(char const*, int) ../src/openrct2/rct2/S6Exporter.cpp:757
    #4 0x7f9e81c932b0 in game_autosave() ../src/openrct2/Game.cpp:1590
    #5 0x7f9e828625b6 in scenario_autosave_check() ../src/openrct2/scenario/Scenario.cpp:297
    #6 0x7f9e81c8a958 in game_update() ../src/openrct2/Game.cpp:439
    #7 0x7f9e81c6731f in OpenRCT2::Context::Update() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10f331f)
    #8 0x7f9e81c6674c in OpenRCT2::Context::RunVariableFrame() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10f274c)
    #9 0x7f9e81c6402d in OpenRCT2::Context::RunFrame() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10f002d)
    #10 0x7f9e81c638f4 in OpenRCT2::Context::RunGameLoop() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10ef8f4)
    #11 0x7f9e81c627bf in OpenRCT2::Context::Launch() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10ee7bf)
    #12 0x7f9e81c5b08a in OpenRCT2::Context::RunOpenRCT2(int, char const**) ../src/openrct2/Context.cpp:170
    #13 0x56323695b95e in main ../src/openrct2-ui/Ui.cpp:60

Sadly I cannot reproduce it anymore
janisozaur added a commit that referenced this issue Feb 14, 2018
While looking at
#7176 (comment)
I got a crash with stacktrace:

    #0 0x7f9e81fa2e30 in object_entry_get_entry(int, unsigned long) ../src/openrct2/object/ObjectList.cpp:181
    #1 0x7f9e81fa24ae in get_loaded_object_entry(unsigned long) ../src/openrct2/object/ObjectList.cpp:142
    #2 0x7f9e8215d64f in S6Exporter::Export() ../src/openrct2/rct2/S6Exporter.cpp:169
    #3 0x7f9e8216de71 in scenario_save(char const*, int) ../src/openrct2/rct2/S6Exporter.cpp:757
    #4 0x7f9e81c932b0 in game_autosave() ../src/openrct2/Game.cpp:1590
    #5 0x7f9e828625b6 in scenario_autosave_check() ../src/openrct2/scenario/Scenario.cpp:297
    #6 0x7f9e81c8a958 in game_update() ../src/openrct2/Game.cpp:439
    #7 0x7f9e81c6731f in OpenRCT2::Context::Update() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10f331f)
    #8 0x7f9e81c6674c in OpenRCT2::Context::RunVariableFrame() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10f274c)
    #9 0x7f9e81c6402d in OpenRCT2::Context::RunFrame() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10f002d)
    #10 0x7f9e81c638f4 in OpenRCT2::Context::RunGameLoop() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10ef8f4)
    #11 0x7f9e81c627bf in OpenRCT2::Context::Launch() (/home/janisozaur/workspace/OpenRCT2/build/libopenrct2.so+0x10ee7bf)
    #12 0x7f9e81c5b08a in OpenRCT2::Context::RunOpenRCT2(int, char const**) ../src/openrct2/Context.cpp:170
    #13 0x56323695b95e in main ../src/openrct2-ui/Ui.cpp:60

Sadly I cannot reproduce it anymore
@zaxcav
Copy link
Contributor

zaxcav commented Feb 14, 2018

The pathfinding logic is only responsible for getting the mechanic to the ride exit. I don't know how it works after that - i.e. what is responsible for walking the peep through the ride exit and onto the station platform.

I dug into the code enough to find where the mechanic falls, and the culprit in this case is the following lines in function peep_update_heading_to_inspect() (in Peep.cpp):

if (ride->mechanic_status != RIDE_MECHANIC_STATUS_HEADING || !(ride->lifecycle_flags & RIDE_LIFECYCLE_DUE_INSPECTION))
    {
        peep_decrement_num_riders(peep);
        peep->state = PEEP_STATE_FALLING;
        peep_window_state_update(peep);
        return;
    }

I.e. the game no longer thinks the ride is due for inspection, and the "resolution" in this case (and other checks prior to this) is to set the peep to falling. I believe that the prior checks cover cases such as the ride/exit is deleted from under the peep, in which case falling makes sense. In this case though, with the ride still there and water under the exit, it's fatal.
Other questions: Why is the ride no loner due for inspection? Overflow error somewhere?

@Gymnasiast Gymnasiast added the pathfinding Relates to how peeps move and interact with stuff in the game. label Feb 14, 2018
@deurklink
Copy link
Contributor Author

@Gymnasiast Could you add Original bug label?

@zaxcav
Copy link
Contributor

zaxcav commented Feb 14, 2018

I've dug a little deeper, and the function ride_prepare_breakdown() in Ride.cpp is responsible for clearing the RIDE_LIFECYCLE_DUE_INSPECTION flag when the ride is about to breakdown.
In my opinion, if a mechanic happens to inspect a ride when it's about to breakdown, we are lucky and should let the mechanic inspection fix the problem before the ride actually breaks down.
Expanding the guard in Peep.cpp to deal with this case is trivial, however would still have the mechanic fall when attempting an inspection when no inspection is due and no breakdown is pending. Is this possible?
Other thoughts about how to fix this?
Would others be happy with this fix?

@LordMarcel
Copy link

The ride that the mechanic drowned at in my linked save file breaks down 3 days after the mech drowns. With another drowning, the ride broke down on the same day as the drowning, so I can confirm that this happens in the games.

@duncanspumpkin
Copy link
Contributor

@zaxcav setting peep to falling is just telling it to recalculate what its doing. Its the basic state all peeps are put into after anything happens. They will fall until they hit the ground which most of the time is the next frame. Its possible that something has the z coordinate of the exit at the wrong height though and that is getting passed to the mechanic.

@zaxcav
Copy link
Contributor

zaxcav commented Feb 14, 2018

@duncanspumpkin What does "ground" here mean?
The peeps are currently falling through the "floor" of the ride exit.
Is that the real bug here?

@duncanspumpkin
Copy link
Contributor

Ground is any path or surface element. I see these are floating so it's perhaps getting the x and y coordinates wrong

@duncanspumpkin duncanspumpkin added bug Something went wrong. and removed pathfinding Relates to how peeps move and interact with stuff in the game. labels Feb 14, 2018
@zaxcav
Copy link
Contributor

zaxcav commented Feb 14, 2018

Correct me if I'm wrong, but a ride exit is neither a path nor surface element, so falling through the "floor" is expected for a ride exit.
The first surface at the x,y in the sample save game is the lake bed.

@duncanspumpkin
Copy link
Contributor

Yes that's why i think it will be something messing up the leaving of the exit. There is some code that performs the walk through the exit. That may be failing for whatever reason.

@Gymnasiast
Copy link
Member

In my opinion, if a mechanic happens to inspect a ride when it's about to breakdown, we are lucky and should let the mechanic inspection fix the problem before the ride actually breaks down.

I agree.

@deurklink
Copy link
Contributor Author

I think this one should be reopened. I just tried the test park from the first post, and while it is a lot less frequent now, mechanics still drown sometimes. (1 per year, on average)

@Broxzier Broxzier reopened this May 19, 2018
janisozaur added a commit that referenced this issue Jun 10, 2018
- Feature: [#1417] Allow saving track designs for flat rides.
- Feature: [#1675] Auto-rotate shops to face footpaths.
- Feature: [#3473] Add button in ride window's maintainance tab to refurbish the ride.
- Feature: [#6510] Ability to select edges or a row of tiles by holding down Ctrl using the land tool.
- Feature: [#7187] Option for early scenario completion.
- Feature: [#7266] Make headless instances use an interactive terminal with access to the in-game console API.
- Feature: [#7267] Leverage more historical data in Finances window.
- Feature: [#7316] Cheat to allow freezing all staff
- Feature: [#7332] Keyboard shortcuts for view path issues and cutaway view.
- Feature: [#7348] Add large half loops to the Vertical Drop Roller Coaster.
- Feature: [#7459] Allow opening and closing of parks that use no money.
- Feature: [#7579] New horizontal +/- spinner widgets to make adjusting values easier.
- Fix: [#2053] When clearance checks are disabled, a track piece ghost can remove non-ghost track pieces.
- Fix: [#2611] Some objects show (undefined string) instead of a description in Korean.
- Fix: [#3596] Saving parks, landscapes and tracks with a period in the filenames don't get their extension.
- Fix: [#5210] Default system dialog not accessible from saving landscape window.
- Fix: [#6134] Scenarios incorrectly categorised when using Polish version of RCT2.
- Fix: [#6141] CSS50.dat is never loaded.
- Fix: [#6647] Changelog window causes FPS drop.
- Fix: [#6938] Banner do not correctly capitalise non-ASCII characters.
- Fix: [#7176] Mechanics sometimes fall down from rides.
- Fix: [#7303] Visual glitch with virtual floor near map edges.
- Fix: [#7313] Loading an invalid path with openrct2 produces results different than expected.
- Fix: [#7327] Abstract scenery and stations don't get fully See-Through when hiding them (original bug).
- Fix: [#7331] Invention list in scenario editor crashes upon removing previously-enabled ride/stall entries.
- Fix: [#7341] Staff may auto-spawn on guests walking outside of paths.
- Fix: [#7354] Cut-away view does not draw tile elements that have been moved down on the list.
- Fix: [#7358] Peeps and staff entering rides still have the slope speed penalty set.
- Fix: [#7382] Opening the mini-map reverts the size of the land tool to 1x1, regardless of what was selected before.
- Fix: [#7402] Edges of neigbouring footpaths stay connected after removing a path that's underneath a ride entrance.
- Fix: [#7405] Rides can be covered by placing scenery underneath them.
- Fix: [#7418] Staff walk off paths with a connection but no adjacent path.
- Fix: [#7434] Diagonal ride segments cannot be deleted if they are isolated.
- Fix: [#7436] Only the first 32 vehicles of a train can be painted.
- Fix: [#7480] Graphs skip values of 0.
- Fix: [#7505] Game crashes when trying to make path over map edge while having clearance checks disabled.
- Fix: [#7528] In park entrance pricing tab, switching tabs happens on mouse-down instead of mouse-up
- Fix: [#7544] Starting a headless server with no arguments causes the game to freeze.
- Fix: [#7571] Hovering a ride design over scenery or tracks will give tons of money.
- Improved: [#2989] Multiplayer window now changes title when tab changes.
- Improved: [#5339] Change eyedropper icon to actual eyedropper and change cursor to crosshair.
- Improved: [#5832] Resize tile inspector automatically when selecting a tile element.
- Improved: [#6221] The scenario editor's invention list is now resizeable.
- Improved: [#7069] The arbitrary ride type selection dropdown is now sorted orthographically, and has its spinners removed.
- Improved: [#7302] Raising land near the map edge makes the affected area smaller instead of showing an 'off edge map' error.
- Improved: [#7435] Object indexing now supports multi-threading.
- Improved: [#7510] Add horizontal clipping to cut-away view options.
- Improved: [#7531] "Save track design" dropdown now stays open.
- Improved: [#7548] Ctrl-clicking with the tile inspector open now directly selects an element and its tile.
- Improved: [#7555] Allow setting the Twitch API URL, allowing custom API servers.
- Improved: [#7567] Improve the performance of loading parks and the title sequence.
- Improved: [#7577] Allow fine-tuning the virtual floor style.
- Improved: [#7608] The vehicle selection dropdown is now sorted orthographically.
- Improved: [#7613] Resizing the staff window now resizes the name and action columns too.
- Improved: [#7627] Allow scrolling up and down on spinners to change their values.
BenjixD pushed a commit to BenjixD/OpenRCT2 that referenced this issue Jul 27, 2018
… to inspection (OpenRCT2#7201)

* Fix pending breakdown interfering with mechanic heading to inspection

* Rename peep_fixing sub states per suggestions.

Reset ride->mechanic_status to UNDEFINED in sub-state finish fix/inspect (previously sub_state_13).

* Increment network version. Fix tabs/spaces
@lalip
Copy link
Contributor

lalip commented Aug 13, 2022

Since this was brought up recently on discord,

Here's a fast-forward of @LordMarcel's save above. Mechanic 60 drowns 3 days into the save on April 13th, Year 2 (yeah, it took that long) while responding to a nonexistent breakdown on Roto-Drop 2 - in fact, the ride breaks down the moment our mechanic starts falling.
Reproduced on v0.4.1

Mechanic drowning again.zip

@lalip
Copy link
Contributor

lalip commented Aug 13, 2022

Just to rule out funny business going on in the savefile, here's a brand new one. Mechanic 20 is going for an inspection this time around, on Launched Freefall 81. It breaks down upon contact just like with the last one.

yet another mechanic drowning.zip

@Gymnasiast Gymnasiast added original bug This was an issue in the original game already. and removed bug Something went wrong. labels Aug 13, 2022
@astraylife1
Copy link

astraylife1 commented May 30, 2024

Didn't want to create a new issue since this one still exists. But I have noticed mechanics drowning in one of my parks, albeit very rarely. Also, one of them just fell into the void I suspect because an exit was underground. The drowning case actually has the exit path sloping up from the exit building. The mechanic that disappeared into the void I'm not sure of the occurrence since there was never a message alerting me to the incident, just a missing mechanic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
original bug This was an issue in the original game already.
Projects
None yet
Development

No branches or pull requests

9 participants