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

Debugger error after timeline ends when started from "Play Timeline" mode #2069

Closed
Atlinx opened this issue Feb 3, 2024 · 3 comments · Fixed by #2072
Closed

Debugger error after timeline ends when started from "Play Timeline" mode #2069

Atlinx opened this issue Feb 3, 2024 · 3 comments · Fixed by #2072

Comments

@Atlinx
Copy link
Contributor

Atlinx commented Feb 3, 2024

The problem

Describe the bug
When starting a timeline using the "Play Timeline" button, after the timeline ends, the debugger throws an error. This seems to be harmless, but cleaning up the error would make it more intuitive

This is the error thrown by the debugger:

E 0:00:05:0177   event_text.gd:215 @ _on_dialogic_input_action(): Attempt to disconnect a nonexistent connection from '[Text:-9223371957532096845]'. Signal: 'advance', callable: 'GDScriptFunctionState::_signal_callback'.
  <C++ Error>    Condition "!s->slot_map.has(*p_callable.get_base_comparator())" is true. Returning: false
  <C++ Source>   core/object/object.cpp:1420 @ _disconnect()
  <Stack Trace>  event_text.gd:215 @ _on_dialogic_input_action()
                 subsystem_input.gd:79 @ handle_input()
                 node_input.gd:21 @ _on_gui_input()

To Reproduce
Steps to reproduce the behavior:

  1. Create a timeline
  2. Add a text node
  3. Press "Play Timeline" and keep on clicking until the timeline is finished
  4. See the error in the debugger tab

Expected behavior
No errors should appear when the timeline is finished

Screenshots
N/A

System (please complete the following information):

  • OS: Windows
  • Godot Version: 4.2.1.stable.official
  • Dialogic Version: 2.x (main)

Solutions

Workaround
N/A

Possible fixes
Not sure yet.

@Atlinx
Copy link
Contributor Author

Atlinx commented Feb 3, 2024

This seems to be caused by GDScriptFunctionState, which is a temporary class that connects to a signal whenever you try to await a signal. Specifically, event_text awaits for advance, which causes this object to be attached.

This is also only a problem if the timeline ends with a text node.

@Atlinx
Copy link
Contributor Author

Atlinx commented Feb 3, 2024

On second thought, this might be intended since having an end timeline node at the end fixes the issue.

@Jowan-Spooner
Copy link
Collaborator

There should be no errors. Also an EndTimeline event is kinda implied at the end of a timeline anyways. The real reason seems to be that it only happens if the last event is a text event. It might be because the cleaning happens on the very next frame and maybe the connection lists (used for cleaning) are only updated once per frame.

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