CCSequence goes on endless in latest unstable build from GitHub

This might be currently fixed or already fixed, but I just did some testing with the latest build from GitHub and I had an issue with a CCSequence going on endless and keeping to call the last action with a time of 1.0.
Again, I know the latest stuff is experimental, but I just wanted to inform you that there might be a bug. If it’s already taken care of - nevermind.

This causes the bug:

auto actionOne = Sequence::create(DelayTime::create(delayPerCard * i), Show::create(), EaseOut::create(ScaleTo::create(cardOpenAnimationDuration, 1.0), cardOpenAnimationRate), NULL);

This does not cause the bug:

    auto actionOne = Sequence::create(DelayTime::create(delayPerCard * i), Show::create(), EaseOut::create(ScaleTo::create(cardOpenAnimationDuration, 1.0), cardOpenAnimationRate), CallFunc::create([=] {
        MLLOG("Call DONE");
    }), NULL);

Hence, adding an additional action that is instant, does fix it. I stepped through CCSequence and it indeed keeps calling the last action in the first case.

For some additional testing:

I copied over CCActionInterval.h/cpp and CCActionManager.h/cpp from 3.14.1 in the cocos2d-x source and the bug is fixed.

@zhangxm can you have a look?

@framusrock may be it is caused by this PR: https://github.com/cocos2d/cocos2d-x/pull/17557.

I have tried to reproduce the issue in this branch: https://github.com/j-jorge/cocos2d-x/tree/infinite-sequence

Everything seems to work as expected.

@framusrock can you give us the values of delayPerCard, i, cardOpenAnimationDuration and cardOpenAnimationRate so we can test the exact same case?

@j_jorge

Thanks for checking it out.

Yes, sure!

float delayPerCard = 0.1;
float cardOpenAnimationDuration = 0.7;
float cardOpenAnimationRate = 2.0;

The variable i was used in a for loop to animate 10 card sprites around, but one after another with a slight delay.

I hope this helps.

I had same issue week ago, and was able to solve this issue by adding instant action at the end of sequence.

The issue on github is here

1 Like

After some testing it seems that both issues are fixed by the pull request #17557. Please update your version of Cocos2d-x and tell us if it works for you.

I just tested it and it seems to be fixed for me as well, @bsy6766 can you also confirm?

Yes it seems like fixed. Thanks!