-
-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Fix crash in FileAccessCompressed and improve error handling #77306
base: master
Are you sure you want to change the base?
Fix crash in FileAccessCompressed and improve error handling #77306
Conversation
49b7ccc
to
30fee2e
Compare
The behavior of this PR rebased against
|
Other than the resize crash on MSVC, the crash caused by this might be ASAN only iirc. Also the main difference is that with the PR |
With PR #86730 merged, Godot still crashes in #62585. Applying this PR on top, it replaces the crash with an error popup. However large resource files are still not saved. See #62585 (comment) for details. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes look good to me.
I'll unlink #62585 as it won't be fully fixed yet, but this seems to be a step in the right direction.
Would be worth rebasing as this was last updated a year ago. |
Fixes partially #62585 (on MSVC #74582 is also required or it will just crash in
CowData::resize
before any of this matters)Only the change in
WRITE_FIT
is strictly required to fix the crash.The error handling improvements are required so that
ResourceSaver::save
doesn't OK when output file will be corrupted, with them it correctly returnsERR_CANT_CREATE
.Without the
FileAccessCompressed::store_buffer
implementation, the file writing will instead get stuck spamming errors for each byte in the buffer.