App crashing as screen changes

do you use the same method of switching screens in all screens?
Taifun


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

Its a new thing I have been trying to see if leaving the screens open, like I used to do, was the cause of the problem

always use the same method in all screens

The recommended method of switching screens in App Inventor

Tribblehunter's Multiple Screen Method

Taifun

I am. I started trying this new method about4 hours ago and it didnt change anything I am sorry to say.

Tribblehunter is one method, and there are several others that are also ok.
However the problem started before I used this procedure process to move to new screens so respectfully, I dont think this is the issue.

important is to use the same method for switching screens...
another thing could be large images...
see also tip 2 here

Taifun

Hello Robert

Make sure there are no typos in the Screen Names you call (The text string you send to Procedure 'SwitchScreen').

You might like to consider using Virtual Screens instead. The Virtual Screen method delivers a slightly faster App and does away with the need to pass data from one to the other. What are Virtual Screens? Screen1 is the ‘real’ Screen and device-sized Vertical Arrangements on it are displayed/hidden as required - they are the Virtual screens.

For me that method does not works all time.
This works perfectly for me:

1 Like

Thanks guys. I will check the screen names for typos. I'll post the aia file so you can take a look as i dont really think the screen name thing is it but will follow your advice and check. The app crashes when I click submit on screen register2. so it could be register2 that is at fault or it could be the start of my home screen that is the issue. I include here the first set of blocks for screenhome for your information. As I have said previosly, I dont think the method of screen closing is the issue as the crashes started 4 days ago and i only started closing screens like this yesterday. I'll make the procedure change suggested by vknow360 and report back though just to be sure.

Checked all spelling on screen names and all seems ok. I think the problem is with ScreenHome loading as when I change the screenregister2 next page to another one (ScreenWhereTo) then the next page loads fine. When I change the next page to ScreenHome then the app crashes so I think the issue must be with ScreenHome and perhaps the initialisation of that screen. What do you guys think?

Post the aia (or a test aia).

Taxi4U_copy (1).aia (546.5 KB)

Here you go. Aia file posted. Is there a limit to the number of webviewers I can have on a page? I have two on ScreenHome.

The reason is the Navigation component.
Check the Properties (in Designer) ...

See also here:

I dont see anything wrong with the properties for the navigation componenet. I sent the start and end details in the code. Should I set it to initially disabled and then set the start and endn detasils and then enable it. Do you think that would work?

looks like I am not the only one with this issue. I need to use the nav component. Any ideas?

Anke, Ive checked the properties in designer. It has my app key and the other details are blank as they are set in the code blocks. What are you suggesting is wrong please.

I have never used the Navigation component.
See here and check / try the test aia.

Thanks Anke, I will do as you suggest. You have been a massive help. Thank you.

Robert

Hi guys. I am still having this problem. If I remove the navigation component from my app then screenhome loads and works without issue but also without the functionality I want. As soon as I add the navigation component, even if I dont add any blocks and just set the api key, the screen crashes as soon as it is accessed. Is there a known issue with the navigation component and anything else I might be using? The blocks without the nav piece is attached here. If you just add the component and run it you will see it crashes straight away. Does anyone have any ideas on this?Taxi4U.aia (544.8 KB)

Yes, you need to add a Map in the Designer on the screen where you want to use the Navigation component. Otherwise the screen is closed immediately (I don't think this is a crash).

Maybe @ewpatton can clarify and why that happens.
As I said, I've never used this component before. But now I'm curious.

Try this one: Taxi4U2.aia (545.0 KB)