-
-
Notifications
You must be signed in to change notification settings - Fork 21k
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
ProgressDialog crash when importing TTF font at the same time as a big addon with glb files #93159
Comments
Crash log from macOS, seems like process dialog is popped up from the thread (which definitely should not happen):
|
A quick fix for the crash (switches to background progress if called for non-main thread), but it's probably something wrong with the FS update logic as well:
struct EditorProgress {
String task;
- bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true) { return EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh); }
+ bool step(const String &p_state, int p_step = -1, bool p_force_refresh = true) {
+ if (Thread::is_main_thread()) {
+ return EditorNode::progress_task_step(task, p_state, p_step, p_force_refresh);
+ } else {
+ EditorNode::progress_task_step_bg(task, p_step);
+ return false;
+ }
+ }
EditorProgress(const String &p_task, const String &p_label, int p_amount, bool p_can_cancel = false) {
- EditorNode::progress_add_task(p_task, p_label, p_amount, p_can_cancel);
+ if (Thread::is_main_thread()) {
+ EditorNode::progress_add_task(p_task, p_label, p_amount, p_can_cancel);
+ } else {
+ EditorNode::progress_add_task_bg(p_task, p_label, p_amount);
+ }
task = p_task;
}
- ~EditorProgress() { EditorNode::progress_end_task(task); }
+ ~EditorProgress() {
+ if (Thread::is_main_thread()) {
+ EditorNode::progress_end_task(task);
+ } else {
+ EditorNode::progress_end_task_bg(task);
+ }
+ }
};
class EditorPluginList : public Object { |
I looked into it. Effectively, the replacement of the I'll create a PR to fix that soon. I also think that the suggestion from @bruvzg could be a really nice fail safe. |
Tested versions
update_files
after #92893 #93006System information
Fedora Linux 40 (KDE Plasma) - Wayland - Vulkan (Forward+) - dedicated AMD Radeon RX 7600M XT (RADV NAVI33) - AMD Ryzen 7 7840HS w/ Radeon 780M Graphics (16 Threads)
Issue description
When first importing a project that includes TTF files and the proton_scatter addon (which includes GLB and Blend files), I get the following crash:
It was introduced after 4.3-beta1 with #93006.
CC @Hilderin @RandomShaper @KoBeWi @bruvzg
Steps to reproduce
rm -rf .godot/ ~/.cache/godot/*
to make sure it's importing from scratch, and that previews aren't generated yet (can't exclude the preview gen from triggering the issue, it's a usual suspect)godot -e -v
Minimal reproduction project (MRP)
ttf-crash.zip
The text was updated successfully, but these errors were encountered: