Page 1 of 1

App crashes on closeStack

Posted: Tue Mar 03, 2015 8:29 pm
by Jellobus
Hi, 8)

My testApp working fine most of time. It does not crashes during using it but 1 out of 10 whenever I close app, it crashes at the point of closing. android platform answers "Unfortunately, testApp has stopped."

1. open the testApp with android mobile
2. In the app, I save data into stack tDataStackPath in specialFolderPath("documents") (set the cText of stack tDataStackPath to field "saved" then save stack tDataStackPath.)
3. I press backKey to close app
4. the android platform answers "Unfortunately, testApp has stopped."<--happens 1~2 out 10 times of closing
5. closed

testApp consist of
1.main stack ( it works as if splash screen and it directs one of substacks.)
2.two substacks
3.one separate stack tDataStackPath created by main stack in document file path. ( it's about little less than 300KB, stack tdataStackPath is not the part of the standalone.)

Here is the code for closing testApp

Code: Select all

-----the handler placed in the one of substacks---
on backKey
     send "closeAllStacks" to stack "main"
end backKey

----the handler placed in the main stack---
on closeAllStacks
     close stack "one"
     close stack "two"
     close stack tDataStackPath
     close this stack
end closeAllStacks    
I tried with quit or delete command instead close. also I reduce image file size as much as I could. I put empty into filename of unused images whenever the card is closed. but still "Unfortunately, testApp has stopped." answer kept shows up.

Anyone has clue with this problem?

Cheers,

Louis

Re: App crashes on closeStack

Posted: Thu Mar 05, 2015 5:53 pm
by Jellobus
Hi All, :lol:

After I tried many things, I believe that I found simple solution. set the destroystack of stack tDataStackPath to true solved problem.

Cheers,

Louis