Android App Woes

Sannyasin Brahmanathaswami brahma at hindu.org
Mon Aug 14 17:23:39 EDT 2017


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" <use-livecode-bounces at lists.runrev.com on behalf of use-livecode at lists.runrev.com> 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



More information about the Use-livecode mailing list