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

Errors in Godot 4.1-stable-mono #11

Open
claychinasky opened this issue Jul 16, 2023 · 7 comments · May be fixed by #12
Open

Errors in Godot 4.1-stable-mono #11

claychinasky opened this issue Jul 16, 2023 · 7 comments · May be fixed by #12
Labels

Comments

@claychinasky
Copy link

claychinasky commented Jul 16, 2023

There are many errors at runtime, most of them about red colored errors:

E 0:00:00:0987   is_auto_translating: This function in this node (/root/DebugMenu/DebugMenu/VBoxContainer/Settings) can only be accessed from either the main thread or a thread group. Use call_deferred() instead.
  <C++ Error>    Condition "!is_readable_from_caller_thread()" is true. Returning: (false)
  <C++ Source>   scene/gui/control.cpp:3047 @ is_auto_translating()

many of these errors are Use call_deferred() probably cause of the changes in 4.1
and this :

E 0:00:00:0527   viewport_set_measure_render_time: Condition "!viewport" is true.
  <C++ Source>   servers/rendering/renderer_viewport.cpp:1253 @ viewport_set_measure_render_time()

plugin seems to work fine but not sure if any of the errors impacts the performance or make the calculations incorrect.

@Calinou
Copy link
Member

Calinou commented Jul 16, 2023

I don't know why an is_auto_translating() threading warning appears, since I never call it in the project.

I could probably disable automatic translation in the debug menu, as it's not really designed for internationalization and can be counterproductive for the use cases stated in the README. This probably won't fix the warning though.

@Calinou Calinou added the bug label Jul 16, 2023
@claychinasky
Copy link
Author

claychinasky commented Jul 17, 2023

I tried to fix these but many of these API calls are not even used directly, most of the errors are confusing to me, VBoxContainer/... and a few others. I was able to fix a few but here is the rest of the errors.
image

@isirode
Copy link

isirode commented Jul 31, 2023

Hello,

To Calinou, I was doing to push a PR, but I've noticed your change in the changelog when looking at the contributing.md document.

This code also works:

var viewport_rid_for_thread := get_viewport().get_viewport_rid()
thread.start(
  func():
	  # Enable required time measurements to display CPU/GPU frame time information.
	  # These lines are time-consuming operations, so run them in a separate thread.
	  RenderingServer.viewport_set_measure_render_time(viewport_rid_for_thread, true)
	  call_deferred("update_information_label")
	  call_deferred("update_settings_label")
)

Since you've already made a fix I won't make a PR, but I thought you might want to know this.

@Calinou
Copy link
Member

Calinou commented Jul 31, 2023

Since you've already made a fix I won't make a PR, but I thought you might want to know this.

It appears my fix isn't complete for 4.1, so a PR is still welcome 🙂

@isirode
Copy link

isirode commented Aug 2, 2023

It's there #12

I did not updated the changelog nor version, let me know if I should update them (maybe the changelog).

@LeeWannacott
Copy link

LeeWannacott commented Aug 3, 2023

Get 500+fps less (which is about 25%) in VISIBLE_DETAILED vs VISIBLE_COMPACT; Guessing it's because all of the errors :/. Also get a couple hundred more fps than what is reported in the Godot profiler in both modes... I don't know if this plugin/addon is currently very accurate.

@Calinou
Copy link
Member

Calinou commented Aug 3, 2023

Get 500+fps less (which is about 25%) in VISIBLE_DETAILED vs VISIBLE_COMPACT; Guessing it's because all of the errors :/.

If no errors are spammed every frame, this is because 2D rendering is expensive in Vulkan: godotengine/godot#71084
Rendering more elements slows down rendering, since more glyphs need to be drawn.

Note that FPS is not a linear metric, so I suggest you compare the difference in frametime (milliseconds per frame) instead of FPS. 5000 vs 5500 FPS is a very small difference, while 50 FPS vs 550 FPS is a huge difference.

Also get a couple hundred more fps than what is reported in the Godot profiler in both modes... I don't know if this plugin/addon is currently very accurate.

I suggest using an external FPS counter to compare with, such as RTSS, MangoHud or Special K. At very high FPS values (more than 1,000), you should expect significant discrepancies to occur anyway. What FPS value are you getting, and on which hardware?

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

Successfully merging a pull request may close this issue.

4 participants