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

Trying to save under a folder with no write permissions causes a crash. #20845

Closed
ZehMatt opened this issue Oct 3, 2023 · 3 comments · Fixed by #21238
Closed

Trying to save under a folder with no write permissions causes a crash. #20845

ZehMatt opened this issue Oct 3, 2023 · 3 comments · Fixed by #21238
Labels
bug Something went wrong. crash Game exits suddenly.

Comments

@ZehMatt
Copy link
Member

ZehMatt commented Oct 3, 2023

It seems that attempting to do so will just lead to a crash instead of proper error handling and informing the user that saving the file failed.

To reproduce such a crash try to save a park file under C:\Program Files or any other folder in where the write permissions are restricted, this requires UAC on Windows to be enabled. The same will most likely happen on Linux too when trying to save it under /root when the user is not root or has no permissions granted to write anything there.

@ocalhoun6
Copy link
Contributor

ocalhoun6 commented Oct 3, 2023

Just tested this in linux:
Screenshot_20231003_154132
It gives a very sensible error message, but the error message is presented in a new out-of-game window. The game appears to freeze at that point, and appears to crash when you close the error message, but it actually doesn't. The game only gets minimized and runs in the background. If you switch back to it with Alt+Tab, you can resume play without losing anything.


I kind of suspect that it might be the attempt to display this error message that's actually crashing windows, not the save attempt itself.

Edit: this error message also gives users the option to trigger a crash and submit a bug report. The crash reports you're seeing might actually just be a result of people clicking that button.

The error message refers to a closed issue: #17664 which leads me to believe that the use of this error message (and the option to trigger an assert) might be outdated and no longer needed.

@ZehMatt
Copy link
Member Author

ZehMatt commented Oct 3, 2023

I just tested this, it definitely asks if the user wants to report a bug but when the user doesn't have permissions to write in a certain directory, its not really a bug and should rather tell the user to choose a different path instead of giving the possibility of sending a useless report.

@Gymnasiast Gymnasiast added bug Something went wrong. crash Game exits suddenly. labels Dec 25, 2023
@zzril
Copy link
Contributor

zzril commented Jan 16, 2024

This error message was added to src/openrct2/park/ParkFile.cpp in #17665 as a means to collect memory dumps in order to help with investigating the - at that time unfixed - issue #17664. (See this resolved discussion in the PR that introduced the error message.)

That issue has been identified as a memory / resource leak and was fixed with the merge of #18178 in October 2022, so there's no need for the error message anymore.

Edit: The conversation page on #18178 however also shows two later PRs by @janisozaur referencing it that may have made use of the memory dumps provided by users in response to the error message showing up. So, keeping it may still be useful?
Might want to rephrase the message into sthg more general, though.

janisozaur added a commit that referenced this issue Feb 4, 2024
- Feature: [#21062] [Plugin] Add API for managing a guest's items.
- Improved: [#18632, #21306] Land ownership and construction rights are now shown on top of the water.
- Improved: [#20951] Activate OpenRCT2 window after using native file dialog on macOS.
- Improved: [#21184] The construction marker for rides, paths and large scenery is now shown on top of the water.
- Improved: [#21192] Tooltips will now follow the cursor.
- Improved: [#21227] Entrance style dropdown is now sorted alphabetically everywhere.
- Change: [#21200] Raise maximum lift speeds of the Reverser Coaster, Side Friction Coaster, and Virginia Reel for RCT1 parity.
- Change: [#21225] Raise maximum allowed misc entities to 1600.
- Fix: [#19494] RCT1 fence gate walls not imported properly if they were placed on slopes.
- Fix: [#20196] New scenarios start with an incorrect temperature.
- Fix: [#20255] Images from the last hovered-over coaster in the object selection are not freed.
- Fix: [#20616] Confirmation button in the track designer’s quit prompt has the wrong text.
- Fix: [#20628] Moving caret using Ctrl+left can move too far when using a multibyte grapheme.
- Fix: [#20631] IME window not positioned correctly.
- Fix: [#20845] Trying to save under a folder with no write permissions causes a crash.
- Fix: [#21054] “No entrance” style is selected by default in the track designer.
- Fix: [#21145] [Plugin] setInterval/setTimeout handle conflict.
- Fix: [#21157] [Plugin] Widgets do not redraw correctly when updating disabled or visibility state.
- Fix: [#21158] [Plugin] Potential crash using setInterval/setTimeout within the callback.
- Fix: [#21171] [Plugin] Crash creating entities with no more entity slots available.
- Fix: [#21178] Inca Lost City’s scenario description incorrectly states there are height restrictions.
- Fix: [#21179] Additional missing land/construction rights tiles in Inca Lost City & Renovation.
- Fix: [#21198] [Plugin] Setting brake or booster speeds on a tile element doesn’t work.
- Fix: [#21290] Sound keeps playing when paused from fast-forward mode.
- Fix: [#21291] Hungry guests heading to any flat ride do not count for warning threshold (original bug).
- Fix: [#21309] Africa - Oasis & Blackpool Pleasure Beach’s monorails are built outside the park’s land rights.
- Fix: [#21316] Isolated land for sale tile on Extreme Hawaiian Island.
CorySanin added a commit to CorySanin/OpenRCT2 that referenced this issue Feb 4, 2024
Release v0.4.8

- Feature: [OpenRCT2#21062] [Plugin] Add API for managing a guest's items.
- Improved: [OpenRCT2#18632, OpenRCT2#21306] Land ownership and construction rights are now shown on top of the water.
- Improved: [OpenRCT2#20951] Activate OpenRCT2 window after using native file dialog on macOS.
- Improved: [OpenRCT2#21184] The construction marker for rides, paths and large scenery is now shown on top of the water.
- Improved: [OpenRCT2#21192] Tooltips will now follow the cursor.
- Improved: [OpenRCT2#21227] Entrance style dropdown is now sorted alphabetically everywhere.
- Change: [OpenRCT2#21200] Raise maximum lift speeds of the Reverser Coaster, Side Friction Coaster, and Virginia Reel for RCT1 parity.
- Change: [OpenRCT2#21225] Raise maximum allowed misc entities to 1600.
- Fix: [OpenRCT2#19494] RCT1 fence gate walls not imported properly if they were placed on slopes.
- Fix: [OpenRCT2#20196] New scenarios start with an incorrect temperature.
- Fix: [OpenRCT2#20255] Images from the last hovered-over coaster in the object selection are not freed.
- Fix: [OpenRCT2#20616] Confirmation button in the track designer’s quit prompt has the wrong text.
- Fix: [OpenRCT2#20628] Moving caret using Ctrl+left can move too far when using a multibyte grapheme.
- Fix: [OpenRCT2#20631] IME window not positioned correctly.
- Fix: [OpenRCT2#20845] Trying to save under a folder with no write permissions causes a crash.
- Fix: [OpenRCT2#21054] “No entrance" style is selected by default in the track designer.
- Fix: [OpenRCT2#21145] [Plugin] setInterval/setTimeout handle conflict.
- Fix: [OpenRCT2#21157] [Plugin] Widgets do not redraw correctly when updating disabled or visibility state.
- Fix: [OpenRCT2#21158] [Plugin] Potential crash using setInterval/setTimeout within the callback.
- Fix: [OpenRCT2#21171] [Plugin] Crash creating entities with no more entity slots available.
- Fix: [OpenRCT2#21178] Inca Lost City’s scenario description incorrectly states there are height restrictions.
- Fix: [OpenRCT2#21179] Additional missing land/construction rights tiles in Inca Lost City & Renovation.
- Fix: [OpenRCT2#21198] [Plugin] Setting brake or booster speeds on a tile element doesn’t work.
- Fix: [OpenRCT2#21290] Sound keeps playing when paused from fast-forward mode.
- Fix: [OpenRCT2#21291] Hungry guests heading to any flat ride do not count for warning threshold (original bug).
- Fix: [OpenRCT2#21309] Africa - Oasis & Blackpool Pleasure Beach’s monorails are built outside the park’s land rights.
- Fix: [OpenRCT2#21316] Isolated land for sale tile on Extreme Hawaiian Island.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something went wrong. crash Game exits suddenly.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants