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

Dialogue sometimes fails to show after changing scenes #2487

Open
CaseyWalshWarder opened this issue Nov 25, 2024 · 0 comments
Open

Dialogue sometimes fails to show after changing scenes #2487

CaseyWalshWarder opened this issue Nov 25, 2024 · 0 comments
Labels
Bug 🐞 Something isn't working Needs testing More feedback/testing would be good

Comments

@CaseyWalshWarder
Copy link

CaseyWalshWarder commented Nov 25, 2024

The problem

Describe the bug
When a couple lines of dialogue play and then a dialogic signal causes a scene change, if dialogue starts in the _ready function in the next scene, that dialogue sometimes fails to be shown. It appears to be a threading bug.

To Reproduce
Steps to reproduce the behavior:

  1. Clone the repo from https://github.com/CaseyWalshWarder/DialogicThreadingBugReproduction and open it with Godot 4.3
  2. Run the project
  3. Click through the dialogue until the text in the upper left corner says SecondScene
  4. Sometimes, the next dialogue will be shown, and sometimes not. You may need to run the project many times to get a different result.

Expected behavior
The dialogue in the second scene should always be shown.

System:

  • OS: Windows, Linux
  • Godot Version: 4.3
  • Dialogic Version: 2.0 Alpha 16

Solutions

Workaround

Rather than starting the dialogue in _ready, starting it the first time _process runs seems to avoid the issue. I don't know whether this just makes the issue more rare.

Possible fixes

When the second dialogue fails to show, the DialogicGameHandler.gd ends up in state 1 (REVEALING_TEXT), set from line 125 of subsystem_text.gd. It ends up in state 0 (IDLE) if the second dialogue shows.

As far as I can tell, the result isn't deterministic even when I click through the dialogue the same way, so I think it's a threading issue.

I was able to reproduce it on the main branch of dialogic recently.

@Jowan-Spooner Jowan-Spooner added Bug 🐞 Something isn't working Needs testing More feedback/testing would be good labels Nov 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug 🐞 Something isn't working Needs testing More feedback/testing would be good
Development

No branches or pull requests

2 participants