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

Connecting a signal to an already existing function in editor causes a C++ error #92995

Closed
anniryynanen opened this issue Jun 10, 2024 · 3 comments · Fixed by #93042
Closed

Comments

@anniryynanen
Copy link
Contributor

anniryynanen commented Jun 10, 2024

Edit: The connecting doesn't fail, it just prints the error.

Tested versions

  • Reproduces in v4.3.beta1.official [a4f2ea9]
  • Doesn't reproduce in v4.3.dev6.official [89850d5]

System information

Windows 10.0.22631 - Vulkan (Forward+) - dedicated AMD Radeon RX 7700 XT (Advanced Micro Devices, Inc.; 31.0.24027.1012) - AMD Ryzen 7 5700X3D 8-Core Processor (16 Threads)

Issue description

When a signal is connected to an already existing function and there's no undo history, the following error is printed in the output:

scene/gui/text_edit.cpp:3905 - Condition "undo_stack.is_empty()" is true.

Steps to reproduce

Open MRP in editor and try to connect any signal to the do_something() function.

Minimal reproduction project (MRP)

undo-stack-is-empty.zip

@jsjtxietian
Copy link
Contributor

For me the connection seems to succeed despite the error printed.

It seems the regression comes from #86978, in add_callback , it uses end_complex_operation which will err fail if TextEdit has no undo_stack

@anniryynanen
Copy link
Contributor Author

For me the connection seems to succeed despite the error printed.

Oo... you're right. Good to know it's not as bad as I thought. I'll edit the issue.

@anniryynanen anniryynanen changed the title Can't connect signal to an already existing function in editor Connecting a signal to an already existing function in editor causes a C++ error Jun 11, 2024
@akien-mga
Copy link
Member

CC @kitbdev

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

Successfully merging a pull request may close this issue.

4 participants