Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

StoryBoard Issues Thread : Please post any
Started by Danny Mar 30 2012 05:13 AM

- - - - -
108 replies to this topic
[TOPIC CONTROLS]
Page 3 of 5 1 2 3 4 5
This topic has been archived. This means that you cannot reply to this topic.
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#51

toby2

[GLOBAL: userInfoPane.html]
toby2
  • Contributor

  • 166 posts
  • Corona SDK

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?
uid: 44647 topic_id: 24131 reply_id: 102293


[TOPIC: post.html]
#52

toby2

[GLOBAL: userInfoPane.html]
toby2
  • Contributor

  • 166 posts
  • Corona SDK

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


[TOPIC: post.html]
#53

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

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.
uid: 41884 topic_id: 24131 reply_id: 102431


[TOPIC: post.html]
#54

optionniko

[GLOBAL: userInfoPane.html]
optionniko
  • Enthusiast

  • 46 posts
  • Corona SDK

Hey richard9!

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

Nick
uid: 77183 topic_id: 24131 reply_id: 102435


[TOPIC: post.html]
#55

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

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. ;)
uid: 41884 topic_id: 24131 reply_id: 102436


[TOPIC: post.html]
#56

martin.edmaier

[GLOBAL: userInfoPane.html]
martin.edmaier
  • Contributor

  • 206 posts
  • Corona SDK

@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;)
uid: 86417 topic_id: 24131 reply_id: 102437


[TOPIC: post.html]
#57

optionniko

[GLOBAL: userInfoPane.html]
optionniko
  • Enthusiast

  • 46 posts
  • Corona SDK

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
uid: 77183 topic_id: 24131 reply_id: 102442


[TOPIC: post.html]
#58

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

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. ;)

Thanks to both you guys. Our community is awesome! :)
uid: 41884 topic_id: 24131 reply_id: 102444


[TOPIC: post.html]
#59

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

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.
uid: 41884 topic_id: 24131 reply_id: 102462


[TOPIC: post.html]
#60

jonathanbeebe

[GLOBAL: userInfoPane.html]
jonathanbeebe
  • Contributor

  • 654 posts
  • Alumni

@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!

uid: 52430 topic_id: 24131 reply_id: 102479


[TOPIC: post.html]
#61

jonathanbeebe

[GLOBAL: userInfoPane.html]
jonathanbeebe
  • Contributor

  • 654 posts
  • Alumni

For anyone interested, the storyboard.gotoScene() documentation has been updated to include information on how to use the new "parameter passing" feature that was included with build 2012.785. The storyboard.loadScene() documentation has been updated as well.
uid: 52430 topic_id: 24131 reply_id: 102480


[TOPIC: post.html]
#62

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

Uh...well as we say in french, "de rien". It's nothing. Really. Try not to remember my dunce moment too hard. ;) Any idea why getting the scene name returns nil in that situation I mentioned, btw?

(dives into info passing doc)
uid: 41884 topic_id: 24131 reply_id: 102481


[TOPIC: post.html]
#63

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

Alright, a transition bug. 100% reproduceable in 3 steps with 3 scenes:
-- Assuming you're already on scene 1...
--1
storyboard.gotoScene("scene3", "flip") -- works
--2
storyboard.gotoScene("scene2", "slideRight") -- works
--3
storyboard.gotoScene("scene1", "slideLeft") -- uh oh

On sliding back to Scene one, it slides from some form of display.CenterReferencePoint, meaning you only see the right half of the scene.

Is #13718 related to this?
uid: 41884 topic_id: 24131 reply_id: 102542


[TOPIC: post.html]
#64

jonathanbeebe

[GLOBAL: userInfoPane.html]
jonathanbeebe
  • Contributor

  • 654 posts
  • Alumni

@richard9: You're absolutely right, there is a problem when transitioning scenes in the order you mentioned above.

I was able to go in and correct the issue, as well as several other issues related to effects. There should *hopefully* be no more transition effect-related problems once all current changes are pushed into the daily builds.

And regarding the strange 'nil' issue, I'm not sure why that's happening. I'll have to see a test case (also, I'm not sure how safe requiring the target scene is — I'll want to see a test case and investigate that as well).

Thanks again!
uid: 52430 topic_id: 24131 reply_id: 102579


[TOPIC: post.html]
#65

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

If you really need me to cook up test cases and file bugs, let me know, but it's pretty simple:

--scene1.lua
local scene2 = require("scene2") -- [1] Require the target scene

-- goto the new scene
storyboard.gotoScene("scene2", "flip")

-- scene2.lua
local sceneName = storyboard.getCurrentSceneName() -- nil (until you remove the include)

Generally speaking one should never need to include the target scene ahead of time but as you've probably seen me saying it's a fast way to check if a scene is broken and not being returned, but still get the error lines (otherwise you just get the "warning" message about there being no scene.) I'm not really sure of another way to debug scenes otherwise?

uid: 41884 topic_id: 24131 reply_id: 102583


[TOPIC: post.html]
#66

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

One more issue. Whether it's a bug or just weird implementation, not sure.

1. Why is one just "getPrevious" and the other "getCurrentSceneName"? They both fetch names.
2. They seem to function differently. Differently enough that I can't use getPrevious as it is, but here's how it works:

-- We've just arrived at scene2.lua from scene1.lua.

-- scene2.lua
local doSomething = codebase.doThis()

--codebase.lua
local function doThis()
   local thisScene = storyboard.getCurrentSceneName()
   print("thisScene", thisScene) -- "scene2"
   local prevScene = storyboard.getPrevious()
   print("prevScene", prevScene) -- "scene2"
end

Basically, because it's pulling the function from a different file, the current scene also becomes the previous scene. Or so it looks. (785/786 OSX)

EDIT: ugh, also just spent a half hour debugging a problem that just turned out to be that "credits" is a protected name. (or at least protected from use as a scene!) -_-;;;
uid: 41884 topic_id: 24131 reply_id: 102606


[TOPIC: post.html]
#67

optionniko

[GLOBAL: userInfoPane.html]
optionniko
  • Enthusiast

  • 46 posts
  • Corona SDK

I have a small issue with transitions.

When i'm transitioning from a scene that's quite heavy, that scene somethimes turns blank while transitioning. I'm only using 'slideRight' and 'slideLeft'.

My understanding is that when transitioning away from a heavy scene, that scene gets completely wipedout just before transition starts to freeup the memory. I'm i right?

And i would also like to add that i've noticed this behaviour started to appear in around build 782 (not exactly sure if 782 or somewhere near 782).

Thanks!
Nick
uid: 77183 topic_id: 24131 reply_id: 102718


[TOPIC: post.html]
#68

jonathanbeebe

[GLOBAL: userInfoPane.html]
jonathanbeebe
  • Contributor

  • 654 posts
  • Alumni

@richard9: If you're requiring the scene only to catch the "return scene" mistake, then once the current changes are pushed into the daily builds, you won't need to do that anymore because you'll get a warning in the terminal to help you out if you happen to make that mistake.
uid: 52430 topic_id: 24131 reply_id: 102781


[TOPIC: post.html]
#69

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

@jonathanbeebe It depends on what you mean by "return scene" mistake.

Anyone who uses the templates will never forget to "return scene", as in type the command, in the lua files.

Corona itself, however, will not "return scene" no matter what you write if there is a bug existing in the scene.

ex:

local scene = storyboard.newScene()
local x = -- oops, forgot to fill this in!

-- Corona doesn't give an error, it just prints out that the scene either doesn't exist or was not returned, etc
[/code]

Since Corona isn't giving out the error line I would then require in this particular scene in order to find out. :)
uid: 41884 topic_id: 24131 reply_id: 102785


[TOPIC: post.html]
#70

Omnigeek Media

[GLOBAL: userInfoPane.html]
Omnigeek Media
  • Corona Geek

  • 2,975 posts
  • Corona SDK

Well I just had an app rejected by Apple because of a transition issue.

Here's the screen shot:



They say it happens on a new iPad. I can't reproduce it on my new iPad. I've asked for more information.

uid: 19626 topic_id: 24131 reply_id: 102794


[TOPIC: post.html]
#71

optionniko

[GLOBAL: userInfoPane.html]
optionniko
  • Enthusiast

  • 46 posts
  • Corona SDK

I think this issues is same as mine.?

Nick
uid: 77183 topic_id: 24131 reply_id: 102798


[TOPIC: post.html]
#72

richard9

[GLOBAL: userInfoPane.html]
richard9
  • Corona Geek

  • 1,118 posts
  • Enterprise

Looks like the offcenter transitioning issue jonathan and I were talking about
uid: 41884 topic_id: 24131 reply_id: 102806


[TOPIC: post.html]
#73

Shizapp

[GLOBAL: userInfoPane.html]
Shizapp
  • Enthusiast

  • 72 posts
  • Corona SDK

Anyone know if transitions are fixed? It seems like with every build something else is broken while something else is added. Transitions don't work period for me on any device using the latest build. The current scene just disappears while the next scene fades in, slides in, or whatever I choose. Also previously on iPads the current scene will change locations. I'm assuming this is because my background image is scaled up to fit larger screens and overlaps but it should still work regardless of if my images are off screen.

Thanks in advance.
uid: 63800 topic_id: 24131 reply_id: 102827


[TOPIC: post.html]
#74

jonathanbeebe

[GLOBAL: userInfoPane.html]
jonathanbeebe
  • Contributor

  • 654 posts
  • Alumni

Quick update: All current changes and fixes have been pushed in, and should appear in the next daily build (you'll see the Storyboard bullet in the release notes).

Thanks for all your help in identifying these issues!

EDIT: And that build has just posted, it's 2012.790.
uid: 52430 topic_id: 24131 reply_id: 102957


[TOPIC: post.html]
#75

Omnigeek Media

[GLOBAL: userInfoPane.html]
Omnigeek Media
  • Corona Geek

  • 2,975 posts
  • Corona SDK

Thank you Jonathan and team!
uid: 19626 topic_id: 24131 reply_id: 102992



[topic_controls]
Page 3 of 5 1 2 3 4 5
 
[/topic_controls]