godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
89.13k stars 20.2k forks source link

Warn when disk space is low before installing export templates in the editor #95111

Open Zoomgle opened 1 month ago

Zoomgle commented 1 month ago

Tested versions

Reproducable in all Godot versions i have tried. like 4.2.2 or 4.2.1

System information

Godot v4.2.2.stable - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i5-6402P CPU @ 2.80GHz (4 Threads)

Issue description

When i try to download the export template for Godot, there always comes a bunch of error messages in the console and when i try to export the game it says that the file is curropted. I have tried to uninstall and download the export files and even Godot several times but it's always the same issue. i also found out that when Godot "finishes" downloading the files when i look at the file at opens Ableton Live for some reason???

image

Steps to reproduce

I just tried to download the export template files

Minimal reproduction project (MRP)

N/A

kus04e4ek commented 1 month ago

Do you have enough space on the main disk? It needs a little bit more than 2 GB to install

Zoomgle commented 1 month ago

Do you have enough space on the main disk? It needs a little bit more than 2 GB to install

I removed some apps to free up space and it helped!! Thank you so much!

kus04e4ek commented 1 month ago

Perhaps Godot could indicate that it ran out of space better, I think it's worth keeping this issue open for this

Zoomgle commented 1 month ago

Perhaps Godot could indicate that it ran out of space better, I think it's worth keeping this issue open for this

Yes ok! Thanks for the help again :D

AThousandShips commented 1 month ago

It might not be trivial to check what went wrong, all the check does is check if the number of written bytes matches what we asked for, this could be caused by various causes, including access restrictions etc.

But worth looking at if we can get some information from it, or add a message that suggests different options to check, like "Make sure there's enough space on the drive and that you have permission to write to the location."

kus04e4ek commented 1 month ago

It might not be trivial to check what went wrong.

I believe fwrite sets errno when something goes wrong, at least explain_fwrite seems to use errno

AThousandShips commented 1 month ago

Might not be cross platform but worth investigating

Calinou commented 1 month ago

It might not be trivial to check what went wrong, all the check does is check if the number of written bytes matches what we asked for, this could be caused by various causes, including access restrictions etc.

We have a warning in MovieWriter when disk space is low before starting a write: https://github.com/godotengine/godot/pull/62418

We can do something similar in the export templates manager dialog. Uncompressed export templates roughly take 2 GB at most (typically around 1 GB for official export templates), so it should be safe to use this as a threshold for a long time.