App always crashing when i open screen second time


#1

App crash when Opening screen2 for the second time (No problem with screens)!
Dear valued, please help me with this issue I am having

My app crashes when I open screen2 for the second time, It opens fine for the first time I open it. But if I go back to Home screen (screen1) and reopen the screen; the app crashes. Even though, I use close screen when going back to home screen.

I have no problem when I open any other screen back and forth. Only when I try to open screen2 for the second time, it will crash.

Your help is much appreciated, I ran out of ideas on how to fix this issue.


#2

You say you don’t have problems with screens but your app crashes when you open a screen, so… guess what? You have a problem with screens! :grin:

Anyways, it would be better if we can see the blocks instead of guessing what’s wrong with your code. Please post a screenshot.


#3

The recommended method of switching screens in App Inventor

see also tip 1 here

to find out more about the Runtime Error, you can use Logcat

I normally use Eclipse and Logcat there, but if you have installed the App Inventor Software (see also http://appinventor.mit.edu/explore/ai2/setup-emulator.html), you already have everything you need to use logcat…

How to use Logcat

  1. connect your device using USB with your computer

  2. in File Manager go to the App Inventor directory, which is C:\Program Files\App Inventor or similar

  3. press Shift and right mouse click the subdirectory commands-for-Appinventor to get the context menu

  4. select “open command window here” and you will get a command window of that subdirectory

  5. enter *adb logcat :E and the logcat will start running and log all errors

  6. start your app to elicit the error

  7. copy the log (see below)

To copy your log, right click, click “select all” and enter to copy the complete log into the clipboard, then open Notepad and paste it using ctrl-v.

Taifun


I need your help please. My app keep closing
Google developer console app crash
#4

Try read, he don’t have problem if he open screen first time - he have problem when he open screen second time. I think its memory problem


#5

Try not being rude. Memory problems happens most of the times when they don’t switch screens correctly. By what he described, it’s very likely this is the case here.


#7

Have you posted your relevant blocks?
Have you followed @Taifun’s instructions?


#8

i have same problem - when i start app sceen1(home) open than click on button 1 to go screen2 , screen 2 open and work well then i close screen2 and go to home screen(1) now if i click on button 2 for opening screen 3 app close automatically (crash) . if i open app and click on button 2 for going screen 3 it open now . what should i do . block image is given please solve anyone .


#9

How about you read this post?


#10

where is Instructions please give link if you can .


#11

I think you need to show us your block, @Pavan_choudhary


#12

@Ronin here is my all blocks plz check in this link