Android App Woes

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Android App Woes

J. Landman Gay via use-livecode
I have built my android app with LC 8.1.5.   It runs fine on the device. You then hit the home button to return to the OS.  Tap the app icon again and you get “Unfortunatly, [appName] has stopped.”.  Tap the icon again and it does a complete reboot of the app.   Apps made in LC 7 did not have this issue, they stayed running in the background – like an app should.   Is there a trick to getting an Android app from LC 8.1.5 to behave like it should?

I can’t deliver an app to my client that (a) doesn’t stay alive in the background, and (b) crashes every other launch.

Anyone have any insight on this??

-Dan

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android App Woes

J. Landman Gay via use-livecode
Probably related :

http://quality.livecode.com/show_bug.cgi?id=19420

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On August 13, 2017 10:47:27 AM Dan Friedman via use-livecode
<[hidden email]> wrote:

> I have built my android app with LC 8.1.5.   It runs fine on the device.
> You then hit the home button to return to the OS.  Tap the app icon again
> and you get “Unfortunatly, [appName] has stopped.”.  Tap the icon again and
> it does a complete reboot of the app.   Apps made in LC 7 did not have this
> issue, they stayed running in the background – like an app should.   Is
> there a trick to getting an Android app from LC 8.1.5 to behave like it should?
>
> I can’t deliver an app to my client that (a) doesn’t stay alive in the
> background, and (b) crashes every other launch.
>
> Anyone have any insight on this??
>
> -Dan
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: Android App Woes

J. Landman Gay via use-livecode
The LC team does a good job at triaging the bug reports but a repeatable 3 line stack that crashes should be near if not in the front of the queue.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]


-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of J. Landman Gay via use-livecode
Sent: Sunday, August 13, 2017 12:21 PM
To: How to use LiveCode
Cc: J. Landman Gay
Subject: Re: Android App Woes

Probably related :

http://quality.livecode.com/show_bug.cgi?id=19420

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On August 13, 2017 10:47:27 AM Dan Friedman via use-livecode <[hidden email]> wrote:

> I have built my android app with LC 8.1.5.   It runs fine on the device.
> You then hit the home button to return to the OS.  Tap the app icon
> again and you get “Unfortunatly, [appName] has stopped.”.  Tap the icon again and
> it does a complete reboot of the app.   Apps made in LC 7 did not have this
> issue, they stayed running in the background – like an app should.   Is
> there a trick to getting an Android app from LC 8.1.5 to behave like it should?
>
> I can’t deliver an app to my client that (a) doesn’t stay alive in the
> background, and (b) crashes every other launch.
>
> Anyone have any insight on this??
>
> -Dan
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: Android App Woes

J. Landman Gay via use-livecode
There's more to it than just the script. I thought the problem was just in
issuing the quit command but Dan can reproduce it using the Home key (and I
bet the Recents key would do the same.)

It looks like the engine is unloading libraries in all these cases and not
restoring them on resume. I didn't test it but front and backscripts might
behave the same way.

--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com



On August 13, 2017 12:00:23 PM Ralph DiMola via use-livecode
<[hidden email]> wrote:

> The LC team does a good job at triaging the bug reports but a repeatable 3
> line stack that crashes should be near if not in the front of the queue.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> [hidden email]
>
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On Behalf
> Of J. Landman Gay via use-livecode
> Sent: Sunday, August 13, 2017 12:21 PM
> To: How to use LiveCode
> Cc: J. Landman Gay
> Subject: Re: Android App Woes
>
> Probably related :
>
> http://quality.livecode.com/show_bug.cgi?id=19420
>
> --
> Jacqueline Landman Gay         |     [hidden email]
> HyperActive Software           |     http://www.hyperactivesw.com
>
>
>
> On August 13, 2017 10:47:27 AM Dan Friedman via use-livecode
> <[hidden email]> wrote:
>
>> I have built my android app with LC 8.1.5.   It runs fine on the device.
>> You then hit the home button to return to the OS.  Tap the app icon
>> again and you get “Unfortunatly, [appName] has stopped.”.  Tap the icon
>> again and
>> it does a complete reboot of the app.   Apps made in LC 7 did not have this
>> issue, they stayed running in the background – like an app should.   Is
>> there a trick to getting an Android app from LC 8.1.5 to behave like it should?
>>
>> I can’t deliver an app to my client that (a) doesn’t stay alive in the
>> background, and (b) crashes every other launch.
>>
>> Anyone have any insight on this??
>>
>> -Dan
>>
>> _______________________________________________
>> use-livecode mailing list
>> [hidden email]
>> Please visit this url to subscribe, unsubscribe and manage your
>> subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android App Woes

J. Landman Gay via use-livecode
I also getting reports from from one Beta tester of Siva Siva app of the app stopping after hitting the home key. and also the square key  (what is that on Android, some app switcher?)

this is a but unclear… I need to talk to her.. but these are all related symptoms on Android:

" I just tried opening the app again and it worked fine first time.

I then went into listening, [BR: this is a stack dedicated to play audio]  Gurudeva's 1970 course, and exited with "circle" back to my home screen. From my home screen I select the app page, then Siva Siva app and I get the stop message.

The, going to "Listen" [stack], hit  "square", do this email, square, select Siva sheet, stopped, then come back to it and it opens to pg where listening is a choice.

It works to do this if I am at listening option pg vs actually listening to something.
[BR: What this means is she is on a playlist screen, but has not actually tapped and no mobile player is yet created… so the above the app is crashing, in the above scenarios, when a mobile audio player is "up"

Then later she writes'

"I have been opening the Siva Siva app from my app collection. When I do this  it doesn't open and it repeatedly tells me it has stopped but if I click ok on the message and then on the app again it opens just fine."

Not being and android user I only just today try the "square" button and yup. the app crashes (stops)


I will be pushing the latest to nightly tonite, and then asking HQ to look at it… but this is not a 3 line stack!  But this all feels like it's in the same wheelhouse.

BR



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

RE: Android App Woes

J. Landman Gay via use-livecode
I think Dan's onto something with the accelerated rendering.
I've done some testing and it's not conclusive yet. I think if you have accelerated rendering on AND you are on a card with a scrolling control(dynamic maybe?) That is when you can't resume without a crash. I will look closer when I get back to the office.

Ralph DiMola
IT Director
Evergreen Information Services
[hidden email]

-----Original Message-----
From: use-livecode [mailto:[hidden email]] On Behalf Of Sannyasin Brahmanathaswami via use-livecode
Sent: Sunday, August 13, 2017 4:33 PM
To: How to use LiveCode
Cc: Sannyasin Brahmanathaswami
Subject: Re: Android App Woes

I also getting reports from from one Beta tester of Siva Siva app of the app stopping after hitting the home key. and also the square key  (what is that on Android, some app switcher?)

this is a but unclear… I need to talk to her.. but these are all related symptoms on Android:

" I just tried opening the app again and it worked fine first time.

I then went into listening, [BR: this is a stack dedicated to play audio]  Gurudeva's 1970 course, and exited with "circle" back to my home screen. From my home screen I select the app page, then Siva Siva app and I get the stop message.

The, going to "Listen" [stack], hit  "square", do this email, square, select Siva sheet, stopped, then come back to it and it opens to pg where listening is a choice.

It works to do this if I am at listening option pg vs actually listening to something.
[BR: What this means is she is on a playlist screen, but has not actually tapped and no mobile player is yet created… so the above the app is crashing, in the above scenarios, when a mobile audio player is "up"

Then later she writes'

"I have been opening the Siva Siva app from my app collection. When I do this  it doesn't open and it repeatedly tells me it has stopped but if I click ok on the message and then on the app again it opens just fine."

Not being and android user I only just today try the "square" button and yup. the app crashes (stops)


I will be pushing the latest to nightly tonite, and then asking HQ to look at it… but this is not a 3 line stack!  But this all feels like it's in the same wheelhouse.

BR



_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android App Woes

J. Landman Gay via use-livecode
It might be accelerated rendering, but it could also be the bug where
libraries are unloaded and not restored. That's the bug I linked to.
There's no good workaround for it. Since the Siva app uses libraries
almost exclusively, it would certainly be affected.

BR: the "cicle" is the Home key and the "square" is the "recent apps"
key (the app switcher.) Neither of these provide any messages, so you
can't trap for them. Only the backKey sends a message.

This is a problem we can't fix in scripts. The only solution is not to
use libraries (or acceleratedRendering, apparently.)

On 8/13/17 5:08 PM, Ralph DiMola via use-livecode wrote:

> I think Dan's onto something with the accelerated rendering.
> I've done some testing and it's not conclusive yet. I think if you have accelerated rendering on AND you are on a card with a scrolling control(dynamic maybe?) That is when you can't resume without a crash. I will look closer when I get back to the office.
>
> Ralph DiMola
> IT Director
> Evergreen Information Services
> [hidden email]
>
> -----Original Message-----
> From: use-livecode [mailto:[hidden email]] On Behalf Of Sannyasin Brahmanathaswami via use-livecode
> Sent: Sunday, August 13, 2017 4:33 PM
> To: How to use LiveCode
> Cc: Sannyasin Brahmanathaswami
> Subject: Re: Android App Woes
>
> I also getting reports from from one Beta tester of Siva Siva app of the app stopping after hitting the home key. and also the square key  (what is that on Android, some app switcher?)
>
> this is a but unclear… I need to talk to her.. but these are all related symptoms on Android:
>
> " I just tried opening the app again and it worked fine first time.
>
> I then went into listening, [BR: this is a stack dedicated to play audio]  Gurudeva's 1970 course, and exited with "circle" back to my home screen. From my home screen I select the app page, then Siva Siva app and I get the stop message.
>
> The, going to "Listen" [stack], hit  "square", do this email, square, select Siva sheet, stopped, then come back to it and it opens to pg where listening is a choice.
>
> It works to do this if I am at listening option pg vs actually listening to something.
> [BR: What this means is she is on a playlist screen, but has not actually tapped and no mobile player is yet created… so the above the app is crashing, in the above scenarios, when a mobile audio player is "up"
>
> Then later she writes'
>
> "I have been opening the Siva Siva app from my app collection. When I do this  it doesn't open and it repeatedly tells me it has stopped but if I click ok on the message and then on the app again it opens just fine."
>
> Not being and android user I only just today try the "square" button and yup. the app crashes (stops)
>
>
> I will be pushing the latest to nightly tonite, and then asking HQ to look at it… but this is not a 3 line stack!  But this all feels like it's in the same wheelhouse.
>
> BR
>
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>


--
Jacqueline Landman Gay         |     [hidden email]
HyperActive Software           |     http://www.hyperactivesw.com


_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android App Woes

J. Landman Gay via use-livecode

    This is a problem we can't fix in scripts. The only solution is not to
    use libraries (or acceleratedRendering, apparently.)


Ouch… seriously?  Clearly "unacceptable" in a product that makes the deployment claims that LC does.


Hopefully HQ will put this on the top priority. I'm going to the  iOS app story this week, already getting "rave reviews" from our iOS beta testers.  

And the rest of the world (which is huge) will be clamoring for  the Android version, so we have to hold off promotion until this is all working.

Brahmanathaswami





_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android App Woes

J. Landman Gay via use-livecode
In reply to this post by J. Landman Gay via use-livecode
For the moment, is it sufficient to move turning on accelerated rendering to the end of the startup routine?

Sent from my iPhone

> On Aug 14, 2017, at 12:54 AM, Dan Friedman via use-livecode <[hidden email]> wrote:
>
> Jacque,
>
> I don’t think I can make a bug report yet.  I don’t have it isolated outside my project; which LC will surely tell me to do!   I’ll work on trying to isolate the issue.
>
> What I know is this:
> (1) My project runs perfectly with acceleratedRendering enabled – except when the app is suspended, it crashes when brought to the foreground again.
> (2) I put a button in my app with one line, it simply disables acceleratedRendering.  When I tap this button, the app no longer crashes when brought to the foreground after being suspended.
>
> I am not really sure where to go to try to isolate the issue.   There is something definitely up with acceleratedRendering on Android.  On iOS, I enable acceleratedRendering at the beginning of my startup routine.  Works great.  On Android, this makes the app hang.  But, if I move the enabling of acceleratedRendering to the end of the startup routine, it works fine.  I had a related issue with setting the textFont of the mainStack at startup (we’re using an external font).  When I set the textFont of the stack after setting the acceleratedRendering, the app crashed.  But, setting the textFont of the stack before setting the acceleratedRendering was fine.
>
> This is kind of a high-profile client and I’ve got about 1 week to get this resolved before I have to deliver the final app.  This must get resolved this week!
>
> -Dan
>
>
>
>> Please enter a bug report about this, it's a different issue than the one I wrote up.
>>
>> --
>> Jacqueline Landman
>
>
> On August 13, 2017 1:07:12 PM Dan Friedman via use-livecode
> <use-livecode at lists.runrev.com<http://lists.runrev.com/mailman/listinfo/use-livecode>> wrote:
>
>> I took Ralph’s advice and made a 0 line stack to try to recreate the issue.
>> To my astonishment, the app didn’t have the same problem!   So, I went
>> back to my project and started to trace what I have in my app that might be
>> causing the problem.   After a while, I discovered that if I do not enable
>> acceleratedRendering, the app does not bail on suspend and stays in memory.
>> Problem solved!   Except that I can’t leave acceleratedRendering off.  All
>> the scrollers stutter horribly!
>>
>> I went back the test app and enabled acceleratedRendering.  But, it doesn’t
>> have the same problem.  I am most puzzled.
>>
>> Help!
>>
>> -Dan
>>
>>
>>
>>> I have built my android app with LC 8.1.5.   It runs fine on the device.
>>> You then hit the home button to return to the OS.  Tap the app icon
>>> again and you get “Unfortunatly, [appName] has stopped.”.  Tap the icon
>>> again and
>>> it does a complete reboot of the app.   Apps made in LC 7 did not have this
>>> issue, they stayed running in the background – like an app should.   Is
>>> there a trick to getting an Android app from LC 8.1.5 to behave like it should?
>>>
>>> I can’t deliver an app to my client that (a) doesn’t stay alive in the
>>> background, and (b) crashes every other launch.
>>>
>>> Anyone have any insight on this??
>>>
>>> -Dan
>
> _______________________________________________
> use-livecode mailing list
> [hidden email]
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode
Reply | Threaded
Open this post in threaded view
|

Re: Android App Woes

J. Landman Gay via use-livecode
Dan, I can confirm here that, yes, it does seem to be an issue on Android with the "state of accelerated Rendering"  

in our app, we need to keep the loader stack open all the time. This has a card with a background color and a PNG on top… called from assets/img/global-icons/SVG-Lingam.png

Let's call this BKGND STACK A

the app immediately opens a kind of index/TOC stack..

STACK B  -- Navigation UI

When you click on a row on the card.. this will trigger other "Modules" to open

STACK C - Some ebook
STACK D - Playlists for audio
STACK E - Puzzle Game

etc.

Our earlier experiment we had Android "crashing" all over the place. unless we turned off accelerated rendering in stack C before going back to stack B (navigation UI)

HQ suggested adding a small wait
so after we added this to the behaviors attached to all these stacks:

on preopenstack
   # may be fixed in recent versions Android crashed on stack swaps
   # this little wait helped
   wait 100 milliseconds with messages
   set the fullscreenmode of this stack to "showAll"
   mobile_SetAllowedOrientation "portrait"
   set the acceleratedRendering of this stack to "true"
end preopenstack

then things started working.

So that would confirm your solution (perhaps)

But now I have an interesting twist to this.

If I set the accelerated rendering the STACKA  background stack that  never closes then the rendering of STACKS B,C,D,E Starts to break… so I had to turn that off on the background stack that stays open all the time…

After turn that off again… so that  accelerated rendering on "spins up and down" for every other stack…

OK then things started working again..

I can go to any stack  B, C E and click the HOME button or the App swither square button and the app does not die. so far so good. Even one of these is quite complex: the puzzle screen ask the users to turn her phone sideways.. even then we can click the home button or app switcher and the app holds up … no problem….

but when I go to stack " D "  stack "Listen" and click home button or app switcher, the app stops/crash.

this stack also has the same start up script (as above)   so something else is going on.

I have yet to determine why, just when in this one this stack? There are two mobile controls

1) one mobile scroller (field)
b) one mobile audio player (hidden)

But thanks to this thread.. .I think I am closer… at least have narrowed it down to this one stack/card

I have a business license and HQ will look into this also.









In earlier bug reports with HQ we discovered that we need to very carefully

On 8/14/17, 6:47 AM, "use-livecode on behalf of Dan Friedman via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    Ok… I found something!   When my app launches, it opens a second stack.  It’s this second stack that I enable acceleratedRendering.  If this stack’s acceleratedRendering = true, then we crash on re-entry.   On a whim, I thought, “maybe there’s a problem in LC if there are multiple stacks open and their acceleratedRendering settings are not the same?”.  So, as a test, when I set the acceleratedRendering of stack B, I also set stack A to the same setting.  BAM!   It’s stopped crashing when the app is resumed.
   
    Can anyone confirm this behavior?  If so, we’ll get it listed as a bug.   And we’ll have a work-around until it’s fixed.
   
    -Dan

_______________________________________________
use-livecode mailing list
[hidden email]
Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode