-
-
Notifications
You must be signed in to change notification settings - Fork 21.8k
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
Fix two signal errors, remove unused break_request signals in profilers #36340
Conversation
I don't think the fix for I tried looking for the |
@JFonS Your grep-fu failed you ;) It's connected in
The visual profiler also never emits the signal BTW, so it's also buggy. |
Well... turns out pulling from upstream before searching is a wise decision. I'm not sure why @reduz added the |
I will push an update in about ten minutes, I may remove |
Update
8ec898d
to
a31bc1b
Compare
Thanks! |
editor->call_deferred("connect", "play_pressed", this, "_update_override_camera_button", make_binds(true)); | ||
editor->call_deferred("connect", "stop_pressed", this, "_update_override_camera_button", make_binds(false)); | ||
editor->call_deferred("connect", make_binds("play_pressed", this, "_update_override_camera_button", true)); | ||
editor->call_deferred("connect", make_binds("stop_pressed", this, "_update_override_camera_button", false)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This does not seem correct to me. make_binds creates
a Vector<Variant>
out of the arguments passed to the function. However, there is no overload of connect
function that would take a single parameter of type Vector<Variant>
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think MessageQueue (backend of call deferred) uses a Vector. Ideally we should fix varargs since they are poorly implemented :| that's something I need to work on in C++
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MessageQueue::push_call - the overload that Object::call_deferred calls - uses VARIANT_ARG for passing message parameters, not Vector.
I dug into this a little and tested your solution and as it turns out, it only silences the error but doesn't solve the issue. By packing the parameters into |
Eventually, I found the culprit here was Variant to Vector conversion operator. There were changes made to Variant class recently and a small typo made it in (PR #36404). It turns out this conversion function gets used rarely so it slipped the attention and exhibited here as a failed signal call. I suggest reverting the latter of your changes back to original once #36404 is merged as it should work correctly again. |
@rxlecky Would you like to make a commit that reverts my changes to |
Also a heads-up to @akien-mga not to cherry-pick this one to 3.2 just yet :) |
@nathanwfranke oh, it's literally just turning the lines 5416 and 5417 back to what they were before: editor->call_deferred("connect", "play_pressed", this, "_update_override_camera_button", make_binds(true));
editor->call_deferred("connect", "stop_pressed", this, "_update_override_camera_button", make_binds(false)); I can make the commit if you like, I just thought you'd prefer to do it yourself since it's your PR. |
Tried that, there is a conflict with #35864. Still not sure if I should say |
The conflict with #35864 is truly strange since it doesn't even touch the same files. Oh, you are right, I completely forgot about #36368 that got merged soon after your PR. The lines should be as follows to accommodate for the change editor->call_deferred("connect", "play_pressed", Callable(this, "_update_override_camera_button"), make_binds(true));
editor->call_deferred("connect", "stop_pressed", Callable(this, "_update_override_camera_button"), make_binds(false)); Also, I did not mean to intimidate you in any way, I'm really sorry if that was the case. On the contrary, I'm happy to give a hand or explain if you don't understand something. Just be sure to speak up 🙂 |
@rxlecky No problem, I put that in the pull request above your comment. Also thanks for the heads up but I figured it out. It's good practice for me anyways. |
The original change was in godotengine#36340
This change fixes two errors I found while running the latest master. Not sure when they came about
This signal just doesn't exist. I added it, but it currently is never emitted. Keeping it to be consistent with the other profiler classes
Calling for @rxlecky who authored #27742
(?) Not sure exactly what was happening here. Presumably
call_deferred
takes a vararg (Vector) but the connect will mess up if the binds argument is another vararg.Once
connect
was called, the first value inp_args
wasNil
, now it correctly holds true/false