Help crash app problem

hello .....
i have problem crash app after build to apk .
When i open level1 and i press in some point (Balls) inside the canvas to pass level1 and goes to level2 and do same for other levels .
The crash happened when open levels and back and do it randomly for many time after that suddenly exit from app and i still not finish the others levels its happen specially with old mobile Samsung grand .
Please can you check the code and find if there is any errors occurred .
Check.aia (3.4 MB)

I see a few problems, not all of them probably ...

TinyDb3
Your TinyDB3 points to the same namespace as TinyDB1.
Why bother?


You have a delay procedure, a common mistake in interactive environments.
See FAQ Section: Waiting and Timing

Also, your screen switching is problematic.
You must close screens as often as you open them, or they will pile up in RAM.
You also must finish all sounds and timers before trying to switch screens

1 Like

Thanks for reply
First i will change the name TinyDB .
Second about delay procedure rearrange again or what can i do for it ?
Third i already put close screen and your suggestion just close sounds and timers ?
Is just this the problems that made the crash or there is another errors .

I suggest you read about namespaces at

You have to read the article about delay procedures in the Waiting and Timing FAQ.
The short answer is to use well named Clock Timers for different delay contexts.

From what I saw in Level1, your close screen technique is inconsistent in different if/then branches. I personally prefer to work only in 1 screen, to avoid screen switching problems.

I have barely looked at your app.
I notice in Level1 you have 3 Canvases, each with 10 Balls.
That tells me that you are not reusing the components, leading to bloated memory use.
Learn to use lists of components and how to represent your game levels in a file.
Sample apps:

http://ai2.appinventor.mit.edu/?galleryId=5858910198693888

1 Like