My app keeps crashing whenever I switch screens

this is the relevant code

first open the new screen, then close the current screen, see also Tribblehunter's Multiple Screen Method
however what about using The recommended method of switching screens in App Inventor?

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

also this

What means "also this"?

@Taifun I actually tried that method before and it caused more than one screen to cause crashes. Also, I forgot to tell you, this only happens for Screen1 to Screen2

I meant this code is also relevant.

Post a simple test aia to reproduce this issue.
Your blocks should work.

Sorry, I'm not quite sure how to get a test aia


Please export your project and post it here.

Open a new project and copy some blocks from backpack (of your crashing aia) to this new aia, export it to your PC and post it.

Healthy_Study_App (7).aia here it is

I actually looked at it with somebody with more experience than me and it's solved.

please reveal the solution to your issues, so others can learn from this in future
thank you

Taifun

1 Like

Fine, but as @Taifun said, tell us what you have changed.

Note:
You have 8 timers on Screen2, all of which are initially enabled. I disabled all of these at first, as this is not required at Screen2.Initialize. There is also a Clock2 for which there is no Clock2 event (i.e. delete it). Furthermore, the images for the play (resume), pause and stop buttons are much too large (resolution). These should basically have the size / dimension that is actually used in the app.
After changing this, Screen1 and Screen2 are switching properly.

@Taifun The app was working, it just got slowed down by the companion app

1 Like

No, Compainion crashed when switching Screen1 / 2 , but shouldn't.

It worked well as an apk

A post was split to a new topic: Problems with Tribblehunter's method