I'm fed up with transitions. Is there any way to use the old Transition 1.0 API?

Hi Corona community and staff!

After spending some days tracking strange bugs in our last game, we realized all of them are related with the new transition api, it was not about our code, specially with onComplete functions, which generates lots of memory leaks in our game until crashing it.

I’ve read all of those problems appeared after build 2076, but we are not longer allowed to download this build.

The oldest build I can see in the download page is 2082 (besides Graphics 1.0 builds).

Is there any way to download the build 2076, or at least, a code shortcut to use transition 1.0 api (which worked perfectly) instead transition 2.0 like with graphics 2.0/1.0 ( graphicsCompatibility = 1 ) ?

Thank you for reading!

The release archive is here:  https://developer.coronalabs.com/downloads/archive

Can you provide more concrete examples of something that doesn’t work that we can give to Engineering.  A sample app would be fantastic that demonstrates the problem.

Thanks

Rob

Hi @Rob Miracle, thank you for your answer!.

I’ve tried to isolate any of the problems, but I can’t. I don’t know why. Probably the bug/bugs are triggered with many simultaneous transitions, storyboard or something else.

Example:

Function A -> Transition to scale image to 2.0, onComplete load Function B.

Function B -> Transition to scale image back to 1.0, onComplete load Function A.

(I use this to simulate a breathing movement with some sprites). With this example in the game, after a few seconds it seems the onComplete starts to trigger twice calling the other function. A few seconds after, it calls onComplete four times, after a few seconds 8 times… until it crashes the app.

I’ve tried to create a small lua with an example to report it as a bug. But with this two functions isolated I’ve not experienced any problem, it only happens in the game.

I know it could be my mistake with the code, but, since it only happens with any Daily Build after 2076, and it doesn’t with 2076, I’m pretty sure there is some kind of bug with transitions after that build.

I will try to investigate it more and write you back if I can figure out a way to reproduce the bug.

Thank you!

Looking at the release notes, I see that there checkins to the Transition engine in build 2085.  You might want to test your app with builds on either side of that and see if the issues come and go. 

Your description sounds more like something is getting started up twice.  This could be something as simple as a touch handler that does a storyboard.gotoScene() twice because it’s not catching the began and ended phase.

But let’s try the builds around 2085.

Rob

Hi again Rob,

I run a test.

With build 2085

  • With the transition running, the memory garbage starts to climb until crash the app.

  • If we comment the line with the transition with oncomplete works fine.

  • If we change the oncomplete call with a timer with delay works fine (but is not the optimal solution). 

With build 2082

  • Works perfectly without changing the code.

Before writing this post, we double checked all the code (we thought it was our mistake with the code on first instance), even writing from the ground some parts of it, to check listeners and other triggers to be activated twice. Only after a few days of testing we figured out it was about transitions and specially transitions with oncomplete. The only way to solve for now, is changing transitions with oncomplete, with transitions and a timer with delay.

I’m pretty confident is a bug in the corona build and starts in 2085, but unfortunately I can’t isolate it.

This sounds like a bug.  I however cannot go to Engineering with “there is a bug”.  We will need a sample project that the engineers can use that shows how you are using it that’s creating the problem.  It’s passing our tests so we have to see your use case to figure it out.

Once you get your project narrowed down enough to show it, please file a bug report using the link at the top of the page.

Thanks

Rob

Hi again Rob, I think this problem with transitions is related to this:

http://forums.coronalabs.com/topic/43558-storyboard-firing-enterscene-event-twice-when-using-fade-effect-new-composer-class/?p=226958

It seems, storyboard enterScene fires twice when using “fade” effect, we use enterScene to create transitions and fire other functions and events, so this is why the memory starts to duplicated until crashing the game.

I doubt this is a bug in Storyboard.  Too many people use it.  There is likely something executing storyboard.gotoScene() multiple times.  I’ve had this happen when my storyboard.gotoScene() is in a touch handler  in a move phase or where people don’t catch the phases in their touch handler.

Rob

I was finally able to isolate this. The problem is when you cancel a transition on an object by its handle, sometimes, it triggers onComplete events on other unrelated transitions twice. With storyboard if using a “fade” effect its the same, as I understand it uses the same transition engine and the “onComplete” event is to dispatch the event “enterScene” to the new scene.

Here you can find a example, only a main.lua and two empty scenes with a print to check what I’m saying.

https://www.dropbox.com/s/8xww9vnd1medyom/Bug.ziphttps://www.dropbox.com/s/8xww9vnd1medyom/Bug.zip

Hi again, I was doing some test to isolate even more. Now I realize why this issue was so difficult to reproduce. This is not only when you use the object handle to cancel the transition instead a transition variable, it also happens with the transition variable, tags, or even calling transition.cancel() without arguments. (You can see this by yourself with the example provided in my last post).

  • If you use a timer.performwithdelay for calling the new scene, the problem is gone. (Even with 0 ms).

  • If you use a timer.performwithdelay for canceling the transition, the problem is also gone. (Even with 0 ms).

  • If you cancel the transition before calling the new scene, the problem is also gone.

This problem seems to happen in very certain moments, but, in some of our games, we have a game loop, controlling, among other things, objects, transitions, etc. This loop must be running continuously in the game, and when we call an overlay scene, it triggers this error very often. The enterFrame event duplicates, it starts to insert two event listeners in the new objects, and, everything starts to duplicate in an exponential way until crashing the game.

Please, take a look at the example provided. We really need some feedback with this.

Thank you for your time, Rob!

Out of curiosity I tested this with Composer and its the same buggy behavior so switching to that is not going to help…

Can you go ahead and file a bug report on this since you have the sample?  Please make sure to include a build.settings file with it.

When you get the confirmation email, please post the bug ID back here.

Thanks

Rob

Hi Rob, this is done.

Case 29913

Thank you for your help with this.

Thanks!

Rob

The release archive is here:  https://developer.coronalabs.com/downloads/archive

Can you provide more concrete examples of something that doesn’t work that we can give to Engineering.  A sample app would be fantastic that demonstrates the problem.

Thanks

Rob

Hi @Rob Miracle, thank you for your answer!.

I’ve tried to isolate any of the problems, but I can’t. I don’t know why. Probably the bug/bugs are triggered with many simultaneous transitions, storyboard or something else.

Example:

Function A -> Transition to scale image to 2.0, onComplete load Function B.

Function B -> Transition to scale image back to 1.0, onComplete load Function A.

(I use this to simulate a breathing movement with some sprites). With this example in the game, after a few seconds it seems the onComplete starts to trigger twice calling the other function. A few seconds after, it calls onComplete four times, after a few seconds 8 times… until it crashes the app.

I’ve tried to create a small lua with an example to report it as a bug. But with this two functions isolated I’ve not experienced any problem, it only happens in the game.

I know it could be my mistake with the code, but, since it only happens with any Daily Build after 2076, and it doesn’t with 2076, I’m pretty sure there is some kind of bug with transitions after that build.

I will try to investigate it more and write you back if I can figure out a way to reproduce the bug.

Thank you!

Looking at the release notes, I see that there checkins to the Transition engine in build 2085.  You might want to test your app with builds on either side of that and see if the issues come and go. 

Your description sounds more like something is getting started up twice.  This could be something as simple as a touch handler that does a storyboard.gotoScene() twice because it’s not catching the began and ended phase.

But let’s try the builds around 2085.

Rob

Hi again Rob,

I run a test.

With build 2085

  • With the transition running, the memory garbage starts to climb until crash the app.

  • If we comment the line with the transition with oncomplete works fine.

  • If we change the oncomplete call with a timer with delay works fine (but is not the optimal solution). 

With build 2082

  • Works perfectly without changing the code.

Before writing this post, we double checked all the code (we thought it was our mistake with the code on first instance), even writing from the ground some parts of it, to check listeners and other triggers to be activated twice. Only after a few days of testing we figured out it was about transitions and specially transitions with oncomplete. The only way to solve for now, is changing transitions with oncomplete, with transitions and a timer with delay.

I’m pretty confident is a bug in the corona build and starts in 2085, but unfortunately I can’t isolate it.

This sounds like a bug.  I however cannot go to Engineering with “there is a bug”.  We will need a sample project that the engineers can use that shows how you are using it that’s creating the problem.  It’s passing our tests so we have to see your use case to figure it out.

Once you get your project narrowed down enough to show it, please file a bug report using the link at the top of the page.

Thanks

Rob

Hi again Rob, I think this problem with transitions is related to this:

http://forums.coronalabs.com/topic/43558-storyboard-firing-enterscene-event-twice-when-using-fade-effect-new-composer-class/?p=226958

It seems, storyboard enterScene fires twice when using “fade” effect, we use enterScene to create transitions and fire other functions and events, so this is why the memory starts to duplicated until crashing the game.