-
-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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 Condition "p_value.get_type() != Variant::BOOL" is true. Returning: false on opening editor with project in 4.3 #89026
Comments
@akien-mga I have moved this issue to: 89066 |
@mr-dreich Your error doesn't appear to be related to the OP. Could you open a new issue? Edit: I see it mentions MultiplayerAPI in the stacktrace, but this is a bug of the crash handler, it's hallucinating symbols in a build stripped of debug symbols. The crash is likely not related at all, as the other stack frames also make no sense. You would need to compile from source with |
It seems that something changed in the way we set the initial values of resources from a file, and they are now being set twice. Adding some prints, it's clear that We can probably play around with the check, though this seems like a regression in resource loading?
EDIT: Using this patch to get the print: diff --git a/modules/multiplayer/scene_replication_config.cpp b/modules/multiplayer/scene_replication_config.cpp
index 836fa1014d..10199107a7 100644
--- a/modules/multiplayer/scene_replication_config.cpp
+++ b/modules/multiplayer/scene_replication_config.cpp
@@ -40,6 +40,7 @@ bool SceneReplicationConfig::_set(const StringName &p_name, const Variant &p_val
int idx = prop_name.get_slicec('/', 1).to_int();
String what = prop_name.get_slicec('/', 2);
+ WARN_PRINT(vformat("Prop num: %d, idx: %d, what: %s", properties.size(), idx, what));
if (properties.size() == idx && what == "path") {
ERR_FAIL_COND_V(p_value.get_type() != Variant::NODE_PATH, false);
NodePath path = p_value;
@@ -56,7 +57,7 @@ bool SceneReplicationConfig::_set(const StringName &p_name, const Variant &p_val
property_set_replication_mode(prop.name, mode);
return true;
}
- ERR_FAIL_COND_V(p_value.get_type() != Variant::BOOL, false);
+ ERR_FAIL_COND_V_MSG(p_value.get_type() != Variant::BOOL, false, vformat("Invalid value '%s' for property '%s'", p_value, p_name));
if (what == "spawn") {
property_set_spawn(prop.name, p_value);
return true; |
This is the comparison between those two commits: c5e6a58...bd8380d I tested a local revert and confirmed that this is caused by #85501. |
Line 96 in f2045ba
@Faless it seems Doing it lazily like so fixes the issue.
|
I am getting the same error on 4.2. Should I just upgrade to 4.3 to take advantage of the proposed fix in #89108. |
@alexeocto I've come across this error in 4.2 as well, and since the PR hasn't been cherry-picked, the only way to get rid of it is by upgrading to 4.3, yes |
Tested versions
bd8380d
c5e6a58
System information
Godot v4.3.dev (bd8380d) - Windows 10.0.22621 - GLES3 (Compatibility) - NVIDIA GeForce RTX 3080 Ti (NVIDIA; 31.0.15.5161) - AMD Ryzen 9 5900X 12-Core Processor (24 Threads)
Issue description
Starting with v4.3.dev.custom_build [bd8380d] bd8380d Godot appears to throw this error once for each synced variable contained within any MultiplayerSynchronizer in an open scene:
modules\multiplayer\scene_replication_config.cpp:59 - Condition "p_value.get_type() != Variant::BOOL" is true. Returning: false
Steps to reproduce
gh repo clone chrisl8/space-game
Open it up with 4.3 bd8380d or newer.
Open up the
player
folderOpen the
player
sceneMinimal reproduction project (MRP)
I was not able to reproduce this with any basic startup project or Godot demo project.
You can clone my project from here and the error is consistent:
https://github.com/chrisl8/space-game
Then open up the
player.tscn
inside of theplayer
folder.It also happens with any other scene with a MultiplayerSynchronizer in it such as most of the scenes in folders under
things
.The text was updated successfully, but these errors were encountered: