godotengine / godot

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

Pressing Cancel while exporting project does nothing #93481

Open KoBeWi opened 2 months ago

KoBeWi commented 2 months ago

Tested versions

4.3 beta2 and earlier

System information

Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 (NVIDIA; 31.0.15.4633) - Intel(R) Core(TM) i7-7700HQ CPU @ 2.80GHz (8 Threads)

Issue description

https://github.com/godotengine/godot/assets/2223172/92740b33-0803-4287-98a4-0c3401072961

There is no way to cancel the export. You have to kill the editor and restart.

Steps to reproduce

  1. Export the project
  2. Press Cancel while exporting is in progress

Minimal reproduction project (MRP)

N/A

DylanCheetah commented 1 month ago

I can confirm that this bug is present on Windows 11. It appears that the export process blocks the main thread and causes all input to be ignored. Furthermore, if you move the mouse around and/or click enough times on the window while exporting a large project, Windows will think Godot has frozen and stop updating its window until the export process completes. The only solution I can think of to fix this bug is to run the actual export process in a background thread so it won't block the main thread. And include a way to signal the export thread to stop when the cancel button is clicked.