App crash on repetitive launches.[Solved]

The place to discuss anything and everything about running your LiveCode on Android

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

App crash on repetitive launches.[Solved]

Post by Jellobus » Wed May 18, 2016 1:45 am

hi all,

I have a test app for Android platform. its working great as I expected until the app crahes after repetitive launch, close, launch x 14 times.

1. launch the app on the android phone (the app starts with sounds, images, text)
2. close the app
3. repeat 1,2 x 14 times continuously.
4. app crahes on the launch. android pop up saying "unfortunately the app shutdown~"
( the app crashes on 14th of continuos launching always. )

interestingly, I noticed that app isn't crashed if i refresh the memory of the phone in the middle of this repetitive test.

Is there anyone have idea to prevent this app crash?

thank you for your time!

Louis
Last edited by Jellobus on Sun May 22, 2016 7:18 am, edited 1 time in total.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7393
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: App crash on repetitive launches.

Post by jacque » Wed May 18, 2016 5:44 pm

How are you closing the app? If you are just using the back key, Android won't always clear it from memory. Android keeps apps in RAM until it needs the memory, and if the app is recreating large resources every time it opens, it may run out of memory and crash.

You can try adding a "quit" command to a backKey handler, which will shut down the app completely.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Jellobus
Posts: 317
Joined: Tue Dec 10, 2013 2:53 pm

Re: App crash on repetitive launches.

Post by Jellobus » Sun May 22, 2016 7:17 am

Solved! Thanks for your advice.

Cheers,

Louis

Post Reply