-
-
Notifications
You must be signed in to change notification settings - Fork 18.7k
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
Double-clicking a node without script when connecting signals crashes engine #34555
Comments
Backtrace
|
I think it's a bad idea ;-), see #27125 (comment) |
I don't see why. I'm connecting |
It may work in some cases, but generally connecting a signal to a built-in function doesn't work as expected. Check the examples in #27125 e.g. #27125 (comment) |
I had a very similar issue; it can be reproduced as follows:
Here is a video of me causing the crash I've diagnosed the problem as follows: Normally it wouldn't be possible to click on the "Connect" button if no node is selected, because the button would be disabled. However, double clicking on a node is also hooked up to the same signal and double clicking is possible even if the "Connect" button is disabled. Here is the method that is called when the "Connect" button is pressed, or if a node is double clicked: /*
* Signal automatically called by parent dialog.
*/
void ConnectDialog::ok_pressed() {
if (dst_method->get_text() == "") {
error->set_text(TTR("Method in target node must be specified."));
error->popup_centered_minsize();
return;
}
Node *target = tree->get_selected();
if (target->get_script().is_null()) {
if (!target->has_method(dst_method->get_text())) {
error->set_text(TTR("Target method not found. Specify a valid method or attach a script to the target node."));
error->popup_centered_minsize();
return;
}
}
emit_signal("connected");
} If no method name is provided the method returns early, no crash. Otherwise, the result of |
Godot version: 3.2 beta 4
OS/device including version: Windows 10
Issue description:
I'm trying to connect a signal to a built-in function (
queue_free
) of a node without a script. When I try to connect it by double-clicking, the engine crashes.This, however, works in Advanced mode with no problems.
Steps to reproduce:
hide()
tofree()
)Minimal reproduction project:
The text was updated successfully, but these errors were encountered: