storyboard.gotoScene bug

I have one show stopping bug in storyboard.
Bug was introduced somewhere after build 768.

How to trigger bug? Just don’t purge scenes.
For example in sample code Storyboard (SampleCode/Interface/Storyboard) in all scene files (from scene1.lua to scene4.luad) remove the line

storyboard.purgeScene('sceneX')

where X is scene number.

What will happen? Well, when you return to scene1 again, it will be black.
(createScene was not called, and all displayObject created in createScene are gone)
Bug reproduced on mac simulator and iPhone device. [import]uid: 123747 topic_id: 25408 reply_id: 325408[/import]

Pretty sure you’re referring to the same bug I submitted earlier. Ansca response:
"this bug has been resolved and should appear in the daily builds sometime within the upcoming week.

As a workaround, in the scene1 “enterScene” listener, you can do this:

self.view.x, self.view.y = 0, 0

And that should solve the problem. Once the bug fix is pushed in, you’ll no longer have to do that (though it won’t hurt anything if you left it in there)." [import]uid: 44647 topic_id: 25408 reply_id: 102782[/import]

That didn’t solve the problem.
When I set self.view.x, self.view.y = 0, 0, scene4 is only partially visible.
To display scene4 correctly I have to set

self.view.x, self.view.y = display.contentCenterX, display.contentCenterY

But, there are problems still, transitions are broken and when you change from scene3 to scene4 you have transition to black screen, and when transition is over then content is displayed.

This is not good.

I really hope that Ansca staff will finaly fix this storyboard problems once and for all, because this becomes a real problem.
They fix one problem and introduce another. More tests before pushing new build will be great. [import]uid: 123747 topic_id: 25408 reply_id: 102853[/import]

i found a same problems with it, gotoScene(‘scr_main’), then the last scene object bring to scr_main! it’s crazy! [import]uid: 22631 topic_id: 25408 reply_id: 102854[/import]

Ah, well, which coordinates you use is just fine-tuning a workaround. See how it behaves when the next daily build(s) drop.

The lesson I’ve learned is not to use transitions. At all. Ever. If you want transitions that work, use Director.

I design screens that are universal (i.e., 720x960 Retina that look good on iPad) and on iPhone since part of the objects are offscreen, the transitions that do work look horrible. C’est la vie. [import]uid: 44647 topic_id: 25408 reply_id: 102894[/import]

Ahh…
Looks like build 790 is working like it should.

Finaly!!!
[import]uid: 123747 topic_id: 25408 reply_id: 103037[/import]

Transitions should be working fine in the latest build, and a ton of other bugs have been fixed as well during this bug fix cycle.

You may want to wait until the next daily build though (2012.797), because it will have “scene pop-up” (called overlays) functionality included :slight_smile: [import]uid: 52430 topic_id: 25408 reply_id: 103417[/import]

Well, my app is in Release Candidate status, so no more new features or effects.
But thanks for info. :slight_smile: [import]uid: 123747 topic_id: 25408 reply_id: 103461[/import]

I have build 797 and now my scenes do not reload. They worked fine until now. I’ve tried using both reloadScene() and gotoScene() and neither work. Argh. [import]uid: 35706 topic_id: 25408 reply_id: 103802[/import]

I’m on build 811 and I think I’m hitting this issue.

When I return back to one scene i have for the 2nd time it’s black. If I force a purge of the scene before going to it however it works fine. That is this works:

Storyboard.purgeScene("myScene")  
Storyboard.gotoScene( "myScene")  

This does NOT work

Storyboard.purgeScene("myScene")  

Any update re whether I’m seeing a known bug - can’t see anything wrong with my code otherwise (but perhaps I’m overlooking something)

PS. Any advice re what I could do to fault find in case of some issue in my code (which I don’t think there is, but you never know). That is at the moment all I see is a black page and no error message…nothing that helps indicate if it’s my error, or debug info for AnscaMobile…

[import]uid: 140210 topic_id: 25408 reply_id: 105969[/import]

Update - I found in the case I had that what triggered the gotoScene not to work beyond the first time was when I did not pass in the optional parameters. So:

– This is where I got a black screen when coming back to the scene the 2nd time
Storyboard.gotoScene( “myScene”)

– This fixed this issue (i.e. could go back & forward to scene ok)
Storyboard.gotoScene( “myScene”, “fade”, 400)

[import]uid: 140210 topic_id: 25408 reply_id: 105986[/import]

@greg886: Using build 2012.811, I opened up the Interface/Storyboard sample and modified to scenes to remove any additional parameters, as well as any calls to storyboard.purgeScene() and was unable to reproduce the issue you describe. All scenes loaded fine after cycling through them several times.

I’m not ruling out a bug though—you shouldn’t have to purge a scene for it to show up later on. I suggest you wrap your problem in a small test case that reproduces the issue, and file a bug so we can verify the issue and take care of it right away:

http://developer.anscamobile.com/content/bug-submission [import]uid: 52430 topic_id: 25408 reply_id: 106035[/import]

@greg886, thanks that helped.
This issue set me back two whole days, and now with messier code.
I love beeing a developer! [import]uid: 128197 topic_id: 25408 reply_id: 139437[/import]

@greg886, thanks that helped.
This issue set me back two whole days, and now with messier code.
I love beeing a developer! [import]uid: 128197 topic_id: 25408 reply_id: 139437[/import]

I also had the same problem as greg886.

  1. Start in scene1
  2. call gotoScene(“scene2”, options)
  3. call gotoScene(getPrevious(), options)
    => everything works as expected
  4. call gotoScene(“scene2”, options)
  5. call gotoScene(getPrevious(), options)
    => black screen

I was waiting for the touch event, ended phase to trigger a call to gotoScene. For me, it looked like the touch (ended) event was firing twice after the first return to scene1, so I created a global variable to track the state of the scene and prevented multiple calls to gotoScene as well as prevented multiple entries into enterScene and exitScene. This solved the problem for me. I was unable to reproduce the behavior using the storyboard sample. [import]uid: 16566 topic_id: 25408 reply_id: 140262[/import]

I also had the same problem as greg886.

  1. Start in scene1
  2. call gotoScene(“scene2”, options)
  3. call gotoScene(getPrevious(), options)
    => everything works as expected
  4. call gotoScene(“scene2”, options)
  5. call gotoScene(getPrevious(), options)
    => black screen

I was waiting for the touch event, ended phase to trigger a call to gotoScene. For me, it looked like the touch (ended) event was firing twice after the first return to scene1, so I created a global variable to track the state of the scene and prevented multiple calls to gotoScene as well as prevented multiple entries into enterScene and exitScene. This solved the problem for me. I was unable to reproduce the behavior using the storyboard sample. [import]uid: 16566 topic_id: 25408 reply_id: 140262[/import]