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

Quitting .NET editor prints error: ERROR: Condition "!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)" is true. Returning: Variant() #84839

Open
bcornelison opened this issue Nov 13, 2023 · 5 comments

Comments

@bcornelison
Copy link

Godot version

v4.1.3.stable.mono.official [f06b6836a]

System information

Godot v4.1.3.stable.mono - Windows 10.0.19045 - Vulkan (Compatibility) - Intel(R) HD Graphics 400 () - Intel(R) Atom(TM) x5-Z8350 CPU @ 1.44GHz (4 Threads)

Issue description

While creating issue #84838 I was testing different projects, and to do so I used the Quit to Project List in the Project menu of the editor. Upon looking through the log in the command prompt (I used a windows batch file to launch Godot with the OpenGL renderer), I noticed the errors below. Other than the error messages I have not noticed any ill effects, though I haven't tested thoroughly.
ERROR: Condition "!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)" is true. Returning: Variant() at: _EDITOR_GET (editor/editor_settings.cpp:1127) ERROR: 1 RID allocations of type 'N5GLES37TextureE' were leaked at exit.

Steps to reproduce

  1. Open Godot using the console (e.g. the Godot console exe, a batch file as I have done above, command prompt, etc.)
  2. Create or open any project.
  3. Click Project -> Quit to Project List from the file menu
  4. Error message appears in the console window that opened Godot

Minimal reproduction project

N/A

@akien-mga
Copy link
Member

akien-mga commented Nov 14, 2023

@thygrrr Your issue is a duplicate of #84728

@bcornelison reports it against 4.1.3, which doesn't have this change so it must be a different bug.

@akien-mga akien-mga changed the title Quit to Project List Errors Quitting .NET editor prints error: ERROR: Condition "!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)" is true. Returning: Variant() Nov 14, 2023
@akien-mga akien-mga changed the title Quitting .NET editor prints error: ERROR: Condition "!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)" is true. Returning: Variant() Quitting .NET editor prints error: ERROR: Condition "!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)" is true. Returning: Variant() Nov 14, 2023
@akien-mga
Copy link
Member

Stacktrace for this error on the master branch, with #84847 merged locally (which fixes the issue where this error was spammed repeatedly):

(gdb) bt
#0  _err_print_error (p_function=0x4748df7 "_EDITOR_GET", p_file=0x4745ae4 "./editor/editor_settings.cpp", p_line=1140, 
    p_error=0x4748d70 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_message=0x55f0aa8 "", p_editor_notify=false, 
    p_type=ERR_HANDLER_ERROR) at core/error/error_macros.cpp:86
#1  0x0000000009f55968 in _err_print_error (p_function=0x4748df7 "_EDITOR_GET", p_file=0x4745ae4 "./editor/editor_settings.cpp", p_line=1140, 
    p_error=0x4748d70 "Condition \"!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)\" is true. Returning: Variant()", p_editor_notify=false, p_type=ERR_HANDLER_ERROR)
    at core/error/error_macros.cpp:77
#2  0x0000000007244d77 in _EDITOR_GET (p_setting=...) at ./editor/editor_settings.cpp:1140
#3  0x0000000006e4dbfe in EditorExportPlatformAndroid::_check_for_changes_poll_thread (ud=0x7ffee8037ec0) at ./platform/android/export/export_plugin.cpp:415
#4  0x00000000099839a8 in Thread::callback (p_caller_id=16, p_settings=..., p_callback=0x6e4c3b6 <EditorExportPlatformAndroid::_check_for_changes_poll_thread(void*)>, p_userdata=0x7ffee8037ec0) at ./core/os/thread.cpp:61
#5  0x00000000099966f3 in std::__invoke_impl<void, void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> (
    __f=@0xd5ad258: 0x998391a <Thread::callback(unsigned long, Thread::Settings const&, void (*)(void*), void*)>) at /usr/include/c++/12/bits/invoke.h:61
#6  0x00000000099965bc in std::__invoke<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> (
    __fn=@0xd5ad258: 0x998391a <Thread::callback(unsigned long, Thread::Settings const&, void (*)(void*), void*)>) at /usr/include/c++/12/bits/invoke.h:96
#7  0x0000000009996477 in std::thread::_Invoker<std::tuple<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> >::_M_invoke<0ul, 1ul, 2ul, 3ul, 4ul> (this=0xd5ad238) at /usr/include/c++/12/bits/std_thread.h:279
#8  0x0000000009994d4a in std::thread::_Invoker<std::tuple<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> >::operator() (this=0xd5ad238)
    at /usr/include/c++/12/bits/std_thread.h:286
#9  0x0000000009993bfc in std::thread::_State_impl<std::thread::_Invoker<std::tuple<void (*)(unsigned long, Thread::Settings const&, void (*)(void*), void*), unsigned long, Thread::Settings, void (*)(void*), void*> > >::_M_run (this=0xd5ad230) at /usr/include/c++/12/bits/std_thread.h:231
#10 0x000000000a363f13 in std::execute_native_thread_routine (__p=0xd5ad230) at ../../../../../libstdc++-v3/src/c++11/thread.cc:82
#11 0x00007ffff7d668da in start_thread () from /lib64/libc.so.6
#12 0x00007ffff7de248c in clone3 () from /lib64/libc.so.6

That's still related to what @raulsntos debugged in #84735 (comment), so (assuming the stacktrace would be the same for 4.1.3), that bug already existed in 4.1 as reported here.

@akien-mga akien-mga added this to the 4.x milestone Nov 14, 2023
@raulsntos
Copy link
Member

It seems EditorSettings:get_singleton() is null at the time of this _EDITOR_GET call, probably because it has been freed before EditorExportPlatformAndroid.

I've been unable to reproduce ERROR: 1 RID allocations of type 'N5GLES37TextureE' were leaked at exit. It may be unrelated.

@akien-mga
Copy link
Member

I've been unable to reproduce ERROR: 1 RID allocations of type 'N5GLES37TextureE' were leaked at exit. It may be unrelated.

Yeah that would be a separate issue, and it seems fixed in master at least.

@nagyv
Copy link

nagyv commented Dec 23, 2023

I run into likely the same issue on Godot v4.2.stable.mono.official [46dc277], running godot --headless --export-debug Android exports/android/tobecool.apk --verbose.

The export was successful, but Godot exited with:

Successfully completed signing build.
export: end
EditorSettings: Save OK!
Unloading: Disposing tracked instances...
ERROR: Condition "!EditorSettings::get_singleton() || !EditorSettings::get_singleton()->has_setting(p_setting)" is true. Returning: Variant()
   at: _EDITOR_GET (editor/editor_settings.cpp:1140)
Unloading: Finished disposing tracked instances.
XR: Clearing primary interface
XR: Removed interface "Native mobile"
XR: Removed interface "OpenXR"
Orphan StringName: Node (static: 5, total: 6)
StringName: 1 unclaimed string names at exit.

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

No branches or pull requests

5 participants