StoryBoard Issues Thread : Please post any

@ckausik: I think you’ll have to submit a test case that isolates the issue, because I’m not able to reproduce your transition problems with the storyboard sample. I’m using the same transitions as you are, on the same scenes, and everything seems to work fine when going from scene2 to scene1 with no effect.

EDIT: In response to your update #2, storyboard.loadScene() is not meant to actually display the scene. In fact, starting with 2012.782 the scene will not be visible even after calling loadScene().

If you want to show the scene and make it the currently active scene, use storyboard.gotoScene(), and if you want it to show instantly, use storyboard.gotoScene() without an effect. [import]uid: 52430 topic_id: 24131 reply_id: 99949[/import]

@ jonathanbeebe: I’ll come up with a test case.

Regarding update #2: I am calling loadScene to do some processing to get the data (business app) and then calling gotoScene once the data is available for display.

If I directly call gotoScene (as I was doing until the nifty loadScene was available), I see a blank screen for while when the data for the scene is being read. Using loadScene allows me to show the current scene with a wait message on top until the data is available for display. [import]uid: 19297 topic_id: 24131 reply_id: 99951[/import]

@jonathanbeebe: I think the placement of gotoScene call is causing this problem. I am calling loadScene first. loadScene calls a function. The last line of that function calls gotoScene. Is this wrong way to call gotoScene?
[import]uid: 19297 topic_id: 24131 reply_id: 99961[/import]

I just finished converting our latest app from director and our heavily modified original coronaui to storyboard/widget libs.

Conversion was easy BUT…

Our app has gone from being rock solid to a flaky mess.

We are using build 777 right now as it appears to be the most stable. Memory issues are now worse! when running we are using ~60MB of texture instead of the previous ~38MB loading the EXACT SAME assets! Strange to say the least. All of the assets are not being freed either even though using Cider I have confirmed that there are no references to the assets at all.

We are getting errors in the createScene event calling factory functions like display.newText().
Like a HARD CODED 160 for the x value blowing up because the system says it’s a STRING!
Or a hard coded “-” for the text string blowing up because the system says it’s a NIL!

We also get bus memory errors like illegal access of location $07 and table access errors saying the var is not pointing to a table when in fact is was just pointed to one and accessed in the previous instruction.

These errors happen randomly, the code may work fine through dozens if iterations then boom it blows up or it might blow up on the first pass. I have not been able to produce a repeatable error so I have not created a bug report. With 35 years of experience programming and being a certified software tester I know if I can’t repeat it, they can’t fix it.

At this point we have gone back to the original code, waiting for a stable system to build on. I have tried 775 thru 782 and it appears 777 is the most stable. We are not using any transitions except fade in a couple places, using fade on all transitions is much more unstable. I haven’t tried any of the other transitions due to problem reports with them and objects off screen. We do have one group in one scene that is larger than the screen so I stayed away from transitions when it is involved.

Is anyone else seeing these kind of problems?

The most stable version used the following:
Corona.777
LevelHelper R2 (I think it’s R2, its the original 14 file version, I tried R3 and R8 too)
(using R8 and the latest builds broke our continous parallax as well)
No transitions at all
Runs for seconds to maybe an hour tops between crashes.

Releasing new version using corona.777 and director with our button and text libs - Rock Solid!
No leaks, but it won’t free loaded assets. Oh well, maybe next version.

[import]uid: 26049 topic_id: 24131 reply_id: 100435[/import]

– [import]uid: 73951 topic_id: 24131 reply_id: 99814[/import]

@Hotaman: Can you use the storyboard sample to reproduce any of your issues? If not, the problem could be in the structure of your storyboard events, what you’re doing (or not doing) during “exitScene” and/or “destroyScene” and several other factors.

If you can reproduce the issues using the storyboard sample, your issues are likely a direct result of a storyboard bug. In that case, I recommend you submit a test case via a bug report.

It could be that we need a “Director to Storyboard” porting guide of some sort. Have you read the following blog post:

http://blog.anscamobile.com/2012/03/storyboard-scene-events-explained/

If not, that might help you weed out some problems. [import]uid: 52430 topic_id: 24131 reply_id: 100444[/import]

Transitions are flawless with 782. Great great job guys! I may or may not have a couple of issues to report. I will post back here if it turns out I do. Thanks again! These are super. [import]uid: 42417 topic_id: 24131 reply_id: 100495[/import]

Ok, I am seeing what I believe to be an issue. I am using a native.showWebPopup on a couple of my scenes and then calling native.cancelWebPopup() on exitScene. It’s not cancelling the webpopup and seems to get stuck as the next scene transitions in and ends up laying over top of the new scene it should be showing.

Long story short, something wrong with webpopups. (Was working fine in 773). [import]uid: 42417 topic_id: 24131 reply_id: 100499[/import]

@jonathan

Yep read all that before the conversion, put only creation stuff in create, put add/remover listeners and stuff in enter and exit. everything gets cleaned up correctly. No lingering refs anywhere.

I’ve been watching your progress with the storyboard lib since you started it waiting for it to get fleshed out and stable. I love how it works, major improvement over director! I do have some ideas I can try to see if it helps. I just ran out of time on this version but I wanted to pass on what I ran into because it seems very odd to me.

We are submitting today so I will take some time this afternoon to see if I can get the sample to do what I’m seeing. I’ll put a couple of my scenes in the sample and see what happens. Maybe I can get you something simple that has the issues I’m seeing.

[import]uid: 26049 topic_id: 24131 reply_id: 100561[/import]

Build 783

I have an issue with the accelerometer when moving away then back to a scene.

In createScene I display an object, in enter scene I have Runtime:addEventListener(“accelerometer”, moveObject)which moves the object left and right on the screen, then in exit scene I have Runtime:removeEventListener(“accelerometer”, moveObject).

When I move to scene 2 I run storyboard.removeScene(“scene1”) in enterScene of scene 2. I transition to two more scenes before making my way back to scene 1.

When I load scene 1 again everything works accept Runtime:addEventListener(“accelerometer”, moveObject), which no longer moves the object. I don’t get any errors in the simulator.

I find if i don’t call storyboard.removeScene(“scene1”) the accelerometer continues to work.

***Update*** I apologize, there was something wrong in my code. I had an if/elseif statement that kept the object on the screen inside the moveObject function. This worked fine on the first scene but not when the scene was reloaded. Instead, I’ve separated keeping the object on the screen with a different runtime listener and it’s works fine now.

[import]uid: 90818 topic_id: 24131 reply_id: 101201[/import]

Build 785 and probably prior

storyboard.getPrevious() has unexpected result when storyboard.loadScene() is used to preload a scene.

Example:

title.lua

loadScene(“game”)
Option to go to “settings” or “game” --> go to “settings”

settings.lua

“Back” button uses getPrevious() because it has multiple entry points
“Back” goes to “game” instead of title.

My expectation is that getPrevious() should return the last *entered* scene instead of the last created/loaded scene. Is that reasonable? [import]uid: 44647 topic_id: 24131 reply_id: 102293[/import]

Still at least one transition-related bug in build 785. It has been logged as case #13718. [import]uid: 44647 topic_id: 24131 reply_id: 102324[/import]

Really, really stumped now. I’m hoping this isn’t a storyboard bug but Corona is giving me basically no way to find the problem. (783/785 OSX)

What I did: I just made a button to go to the previous scene.

-- in news.lua, inside the touch event: local thisScene = storyboard.getCurrentSceneName() if thisScene == "news" then print ("yes, you're getting this far") -- sanity check print("thisScene", thisScene) -- news storyboard.gotoScene("weather", "slideLeft") end

Touching the button gives the usual vague and useless warning:

"WARNING: Cannot transition to a scene that does not exist. If you called storyboard.removeScene() on a scene that is NOT represented by a module, the scene must be recreated before transitioning back to it."

Considerations:

  1. main.lua loads weather.lua first, so I know it exists and I know it works.
  2. If I require “weather” into news.lua, no error is thrown.
  3. If I touch the button at all, all storyboard.gotoScene events no longer work across the app.
  4. Removing the transition or changing the transition does not affect the outcome.
  5. Removing all other buttons from the scene does not affect the outcome.
  6. I otherwise do have another button in the scene that does work if I point it at the same scene (!!)
  7. I wiped out the target scene so it has nothing but the storyboard code and a hello world statement. The other lua file still can’t find the scene.
  8. I tried preloading the scene using storyboard.loadScene(“weather”). No errors thrown but it still cannot find the scene. [import]uid: 41884 topic_id: 24131 reply_id: 102431[/import]

Hey richard9!

I usually get this error when i have a syntax error - bad code.

Nick [import]uid: 77183 topic_id: 24131 reply_id: 102435[/import]

Nick, thanks. After 2-2 and half hours of going mildly insane, I looked at the actual storyboard statement.

I was using this…

storyboard:gotoScene("overhere")

instead of this…

storyboard.gotoScene("overhere")

The really scary thing is that Corona SDK was readily accepting this. Maybe should get some kind of error handler for that. But I gladly put on the dunce cap and keep coding. :wink: [import]uid: 41884 topic_id: 24131 reply_id: 102436[/import]

@richard9

Same error on my play Button when i tried to remove the scene.
Seems to be a issue or a bug.

@optionniko

sry its not a syntax error! Sry to say that;) [import]uid: 86417 topic_id: 24131 reply_id: 102437[/import]

glad i could help.

I think since build 776, they removed error handler for some reason. I also get frustrated when a get that error and i know there’s a bad code somewhere, but don’t know where :S [import]uid: 77183 topic_id: 24131 reply_id: 102442[/import]

Well for most storyboard errors you can just require the target scene, since 90% of the time the target scene isn’t being returned and hence you get the warning message.

local sceneImgoingto = require("sceneImgoingto")

…which will immediately suss out bugs in the target. But this obviously doesn’t help if you have a syntax error in the originating scene. :wink:

Thanks to both you guys. Our community is awesome! :slight_smile: [import]uid: 41884 topic_id: 24131 reply_id: 102444[/import]

Hey, one other thing I found. Not sure if this is a bug or just a really weird result.

If you use the “require” workaround to check for scene bugs, storyboard.getCurrentSceneName() does not work. It will report nil. [import]uid: 41884 topic_id: 24131 reply_id: 102462[/import]

@richard9: I’m very sorry to hear that it took you so long to identify that bug because of a simple (and common) syntax mistake!

BUT, soon you shouldn’t have to worry about that happening ever again. I was going to have a warning print out to the terminal but decided it’s best to just have the function auto-correct itself. So in a daily build (sometime this coming week, not sure which one it will end up in), both storyboard.gotoScene() and storyboard:gotoScene() will be identical—so thanks for inspiring that change!

@toby2: The transition-related bug #13718 has also been resolved and the fix will be in that same build.

Monitor the daily build release notes to see which one it ends up in once it is ready.

@everyone: thanks for the feedback!

[import]uid: 52430 topic_id: 24131 reply_id: 102479[/import]