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

DOComplete -> TweenManager.FilteredOperation: IndexOutOfRangeException (Possibly related to SetTweensCapacity?) #672

Open
PortgateStudios opened this issue Jan 28, 2024 · 0 comments

Comments

@PortgateStudios
Copy link

PortgateStudios commented Jan 28, 2024

Hi guys!

I get relatively regular crash reports of IndexOutOfRangeException from TweenManager's FilteredOperation, however I couldn't reproduce it.

I updated DOTween to 1.2.745 but it still happens.

Here's the stacktrace:

DG.Tweening.Core.TweenManager.FilteredOperation
// Based on DOTween source code here should be a DOTween.Complete call but I guess IL2CPP skips it somehow.
DG.Tweening.ShortcutExtensions.DOComplete
// My Code, see below

From the limited reports (Windows, and Linux, both IL2CPP), all I know is that this happens on freshly loaded scenes.

The my side of the stacktrace should look like something like this, but sadly IL2CPP butchered it, so I cannot be sure:

  1. In a manager behaviour's Start I call some simple things, and also: DOTween.SetTweensCapacity(500, 312);
  2. I dispatch an event to my UserInterface.
  3. UserInterface wants to fade out a screen-covering blank image, calling DOFade() on its CanvasGroup... BUT before that: I call DOComplete() on it, because there are cases when there is an ongoing tween on it, and I don't want any interference.

I assume the problem isn't related to calling DOComplete() while there isn't any tween on the target, right?
I mean this was my assumption, because I use it all the time, and this error only happens here, and only just on some devices.

Could it be related to Tween capacity changing?
Okay, reading the comments on this method now really makes me think that having activate tweens is what causes this issue.
In some Start() methods maybe I tween something and their Start()s are called earlier.
Or maybe there are still tweens running due to the previous scene (through DontDestroyOnLoad).

Thanks in advance for all the help, let me know if I could provide more information. :)

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

No branches or pull requests

1 participant