Fix crash in FileAccessCompressed and improve error handling - #77306
Fix crash in FileAccessCompressed and improve error handling#77306RedworkDE wants to merge 1 commit into
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. |
|
Would be worth rebasing as this was last updated a year ago. |
|
Needs rebase if this is still relevant. |
Fixes partially #62585 (on MSVC #74582 is also required or it will just crash in
CowData::resizebefore any of this matters)Only the change in
WRITE_FITis strictly required to fix the crash.The error handling improvements are required so that
ResourceSaver::savedoesn't OK when output file will be corrupted, with them it correctly returnsERR_CANT_CREATE.Without the
FileAccessCompressed::store_bufferimplementation, the file writing will instead get stuck spamming errors for each byte in the buffer.