Good job on Director 1.2!

Just wanted to post and say that I have started using the new 1.2 version of Director and thanks for fixing the issues that I reported in other threads. The new class works much better than the previous with regards to memory and stability.

Also thanks for putting in the proper support for calling CleanUp methods.

Thanks MPotter!

Your help was really important to make version 1.2!

Hmm, well, it works fine in the Simulator now, but I just build my app for the first time on Android and it has all sorts of problems. It often hangs when making the Director scene transitions. I'll try building on iOS to see if it is any different. At this point I don't know if it's a Director problem or a Corona problem.

Looks like I really need to find a completely different solution for my screen transitions.

In my app I have a main screen that is fairly graphics heavy. I was using the Director class to transition to side screens of various stats (simple screens with just text). The app was hanging when I would exit my simple screen to go back to the main screen.

If I remove the main background image of the main screen (which uses the most resources), then I don't have any problems with the app hanging. But simply adding this:

1
2
local back = ui.newImage( "background.jpg")
group:insert(back)

Well, it's not the JPG files. In fact even if I just switch between two simple screens with text I can eventually get my DroidX to hang.

Removing the collectgarbage calls in Director seems to help, but only seems to delay the inevitable.

Is *anybody* actually using Director in a REAL Android app? I really don't see anything that Director is doing wrong, so maybe this is yet another issue with Corona on Android somehow.

Going to try iOS now

Crashes on iPhone as well. Again, removing the collectgarbage calls in Director helps, but it will still eventually hang or exit the app. I'll try the actual Director demo app now.

Edited: Director demo app seems to work. Switching between simple text screens seems to work. But my main app screen that loads images and stuff doesn't work. So maybe the problem is still on my end. I'll continue to look.

Sorry to report that the problem IS with something that you changed in v1.2. If I use my modified 1.1 Director code, then I don't get the hang/crash on the actual phone. But using 1.2 I do.

I've been spending the afternoon trying to track down the problem. I have 4 changes that seem to help:

1) First, in my modified code, I am saving each timer.performWithDelay result and then testing that in director:changeScene. You are just checking the "isChangingScene" variable instead and returning.

This means the user cannot interrupt a transition in progress. I do not believe this is good behavior. If the user taps the screen before the previous transition is complete, you shouldn't just ignore them. You should cancel the previous effect and execute the new transition. So instead of your code:

1
2
3
4
5
        if isChangingScene then
                return true
        else
                isChangingScene = true
        end
views:1487 update:2011/10/13 9:25:17
corona forums © 2003-2011