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

TweenManager.getTimelinesCount getting exception #13

Closed
GoogleCodeExporter opened this issue Aug 22, 2015 · 8 comments
Closed

TweenManager.getTimelinesCount getting exception #13

GoogleCodeExporter opened this issue Aug 22, 2015 · 8 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Create Several Object to be tweened
2. call TweenManager.getRunningTimelinesCount() before every tween creating( 
this must happen even during animations)
3. Keep doing animation until the exception happens

What is the expected output? What do you see instead?

We receive a array out of bounds exception during 
tweenManager.getRunningTimelinesCount().

What version of the product are you using? On what operating system?
6.3.3 on Android

Please provide any additional information below.

The method have this line of code:
"for (int i=0, n=objs.size(); i<n; i++)"
But during the for loop, it seems that an Tween has ended and are removed from 
the "objs" array, causing the array out of bounds.

Original issue reported on code.google.com by paulovic...@gmail.com on 31 Aug 2012 at 12:58

@GoogleCodeExporter
Copy link
Author

Forgot to say the Auto Remove was enabled!

Original comment by paulovic...@gmail.com on 31 Aug 2012 at 1:00

@GoogleCodeExporter
Copy link
Author

Issue 12 has been merged into this issue.

Original comment by aurelien.ribon on 31 Aug 2012 at 1:01

@GoogleCodeExporter
Copy link
Author

Wow, this is really strange. Sounds like a concurrency issue to me. Do you 
update the manager in the same thread as the one in which you call 
getRunningTimelinesCount()?

Original comment by aurelien.ribon on 31 Aug 2012 at 1:03

@GoogleCodeExporter
Copy link
Author

No. you're right, that is the problem. We are creating the Tween in the main 
thread and updating in a rendering thread.

Original comment by paulovic...@gmail.com on 31 Aug 2012 at 1:11

@GoogleCodeExporter
Copy link
Author

Glad you solved your issue :)

Original comment by aurelien.ribon on 31 Aug 2012 at 1:14

  • Changed state: Invalid

@GoogleCodeExporter
Copy link
Author

Don't know if this is the right place to ask, but what is the best approach to 
avoid this concurrency problems in your engine. I have a main thread that 
create all the tweens and update the objects and a redering thread that calls 
TweenManage.update() and draws all the objects.

Original comment by paulovic...@gmail.com on 31 Aug 2012 at 1:17

@GoogleCodeExporter
Copy link
Author

Are you speaking about a native android application or a game? In either way, 
what do you call a "main thread"? Android applications entry point is the 
"onCreate()" method, which already runs in the rendering thread. Do you create 
another thread in there?

Btw, if you need to paste code or if you want a better place to discuss this, 
see the forum: http://www.aurelienribon.com/forum/ Issue reports are quite 
limited :p

Original comment by aurelien.ribon on 31 Aug 2012 at 1:25

@GoogleCodeExporter
Copy link
Author

Thank you, i just did that!

Original comment by paulovic...@gmail.com on 31 Aug 2012 at 1:49

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

No branches or pull requests

1 participant