Restarting app gives black screen

I am using the most recent stable build (505) on Windows Vista, testing on an ASUS Eee tablet with Android 3.0.

I have a simple game that consists of a menu (a background image, with a “play game” button) and the main game itself.

While playing on the device, if I suspend the game using the HOME button and then return to the game it continues from where the game left off. However, if I use the BACK button to exit the game and then return to the game all I see is a black/blank screen. This screen seems to be the game menu because if I tap where the “play game” button should be, then the game starts and plays without any problem.

I read in the forums that this bug may have been resolved in newer builds so I installed Build 564 and recompiled the game. With this build the game did not work at all, it simply exited back to the Android menu.

I went back to Build 505 and I have tried playing with the applicationResume event to try and redraw the menu screen but nothing seems to be working.

Has anyone encountered the same problem or more importantly found a solution? Thanks.

[import]uid: 73098 topic_id: 12159 reply_id: 312159[/import]

If anyone else has the same issue, adding a listener for system events and entering the following code seems to fix the problem:

[lua]if event.type == “applicationExit” then
os.exit()
end
[import]uid: 73098 topic_id: 12159 reply_id: 44999[/import]