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

Tween.is_active() always true after tween.stop() and then tween.start() #39760

Closed
jmb462 opened this issue Jun 22, 2020 · 6 comments · Fixed by #39801
Closed

Tween.is_active() always true after tween.stop() and then tween.start() #39760

jmb462 opened this issue Jun 22, 2020 · 6 comments · Fixed by #39801

Comments

@jmb462
Copy link
Contributor

jmb462 commented Jun 22, 2020

Godot version:3.2

OS/device including version: Several OS (Win10 / MacOS)

Issue description:
Tween never gets finished when tween.start() is called after tween.stop() without calling tween.resume()

Steps to reproduce:
Start() a tween.
is_active() become true (normal)
Stop() the tween before it finished.
is_active() become false (normal)
Start() the tween again.
is_active() become true (normal)

but in this case when the tween is over, it never switch is_active() to false.
Completed events are not fired.

Minimal reproduction project:
tween_bug.zip

@akien-mga
Copy link
Member

Confirmed in 3.2.2 RC 3 (1468c0b).

@jmb462 jmb462 changed the title Tween.is_active() always true after tween.stop() and the tween.start() Tween.is_active() always true after tween.stop() and then tween.start() Jun 22, 2020
@kyleguarco
Copy link

kyleguarco commented Jun 23, 2020

Just leaving this here as a note to myself, or to anyone else that may try and fix this

In the engine source, Tween::set_active is called in Tween::_tween_process at the end of the function when all the tween data has been successfully processed. It's on these lines (3.2 commit a662b85)

if (all_finished) {
set_active(false);
emit_signal("tween_all_completed");
}

Notice that the signal tween_all_completed is emitted when the Tween is supposedly finished processing data. This signal does not fire when the bug is triggered, meaning that the culprit is somewhere in Tween::_tween_process

@ChristopheLY
Copy link
Contributor

I would like to work on this issue if there nobody

akien-mga added a commit that referenced this issue Jul 20, 2020
@akien-mga akien-mga added this to the 4.0 milestone Jul 20, 2020
akien-mga pushed a commit to akien-mga/godot that referenced this issue Jul 24, 2020
@jmb462
Copy link
Contributor Author

jmb462 commented Jul 24, 2020

Thanks a lot for your efforts to fix this issue but the commited fix in 3.2.3 RC1 introduce another bug : #40679

akien-mga added a commit that referenced this issue Aug 25, 2020
@jmb462
Copy link
Contributor Author

jmb462 commented Aug 25, 2020

I think the issue should be re-opened with the above revert of 8ef40b9 commit.

@akien-mga
Copy link
Member

No because the issue is still fixed in the master branch.

MarcusElg pushed a commit to MarcusElg/godot that referenced this issue Oct 19, 2020
huhund pushed a commit to huhund/godot that referenced this issue Nov 10, 2020
huhund pushed a commit to huhund/godot that referenced this issue Nov 10, 2020
akien-mga pushed a commit that referenced this issue Jun 3, 2021
Fix #39760 & #39801

These issues were resolved in master branch (and closed) but are still active in the 3.2 branch.
akien-mga added a commit that referenced this issue Jun 3, 2021
…-after-stop-and-start

[3.x] Fix Tween.is_active() always true after stop() and then start() (Fix #39760 & #39801)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants