Skip to content

Manually Advancing before portrait animation done playing causes leaked tweens #2731

@snaketrain127

Description

@snaketrain127

The problem

Describe the bug
When manually advancing dialogue to a new character before the portrait of the previous character is done loading, the Tween utilized for the portrait animation is not properly removed. This creates an accumulating number of hanging tweens depending on how quickly the player is moving through dialogue, causing an increasing amount of memory use.

Image

To Reproduce
I have created a reproduction repo here: https://github.com/snaketrain127/dialogic-memory-leak-test
Of note, there appears to be an issue with Dialogic where the editor will crash the first time this repository is opened. Opening the project again should allow you to open without issue; if not, open in recovery mode and then switching back to normal or opening after deleting everything in .godot except .gdignore.

The project is two characters utilizing the premade speaker style, looping through a few test lines of dialogue. If the dialogue is repeatedly manually advanced as the portrait loads in, like so:
https://github.com/user-attachments/assets/d2eff885-7bc1-4475-92cd-1a71ef51a27a
A number of leaked tweens are created approximately equal to the number of times the portrait change animation was skipped.
If each line of dialogue is allowed to play without manually advancing, and the player waits until the portrait animation has completely finished, no tweens are leaked.

Image

System (please complete the following information):

  • OS: Ubuntu 24.04.3
  • Godot Version: 4.5.1
  • Dialogic Version: 2.0 Alpha 19

Solutions

Workaround

Setting the Default Animation lengths in Settings -> Portraits to 0.0 and disabling Wait seems to prevent this issue by bypassing portrait animations entirely.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions