Skip to content
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

Error when saving a scene using native file dialog #90947

Closed
timothyqiu opened this issue Apr 20, 2024 · 1 comment · Fixed by #91071
Closed

Error when saving a scene using native file dialog #90947

timothyqiu opened this issue Apr 20, 2024 · 1 comment · Fixed by #91071

Comments

@timothyqiu
Copy link
Member

Tested versions

master[4a01602]

System information

Arch Linux

Issue description

When "Use Native File Dialogs" is enabled, saving a scene produces these errors:

ERROR: Do not use progress dialog (task) while flushing the message queue or using call_deferred()!
   at: add_task (editor/progress_dialog.cpp:155)
ERROR: Condition "!tasks.has(p_task)" is true. Returning: canceled
   at: task_step (editor/progress_dialog.cpp:188)
ERROR: Condition "!tasks.has(p_task)" is true. Returning: canceled
   at: task_step (editor/progress_dialog.cpp:188)
ERROR: Condition "!tasks.has(p_task)" is true. Returning: canceled
   at: task_step (editor/progress_dialog.cpp:188)
ERROR: Condition "!tasks.has(p_task)" is true. Returning: canceled
   at: task_step (editor/progress_dialog.cpp:188)
ERROR: Condition "!tasks.has(p_task)" is true. Returning: canceled
   at: task_step (editor/progress_dialog.cpp:188)
ERROR: Condition "!tasks.has(p_task)" is true.
   at: end_task (editor/progress_dialog.cpp:215)

The scene is saved nevertheless.

Steps to reproduce

  1. Turn on interface/editor/use_native_file_dialogs in editor settings.
  2. Create a new scene.
  3. Save the scene.

Minimal reproduction project (MRP)

N/A

@bruvzg
Copy link
Member

bruvzg commented Apr 22, 2024

I can't reproduce it on macOS, probably related to the fact native file dialog are non-blocking on Linux (API limitation) or it's caused by call_deferred (Linux native dialogs are handled from the thread).

The core of the issues is likely EditorProgressDialog and the way long tasks in the editor are handled (blocking main thread and trying to run main event loop iterations manually in the process).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants