Artifacts on screen from closed stacks on Android

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

Artifacts on screen from closed stacks on Android

Matthias Rebbe via use-livecode
We are getting reports (and screen shot and screen videos) from some Android users that show artifacts from a previously opened Stack A, when opening Stack B

where

Stack A is explicitly closed and has both destroyStack and destroyWindow set to true.

In the absence of being able to reproduce these residual closed-destroyed stack artifacts issues on my Pixel (and HQ can't either) I am wondering if there is some hack, that will not affect performance too much, to forcibly clear out the pixels of the previously opened stack?  Details below:

There is bug report on this already

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

You can see screen shots there from a Galaxy A7 (2017) running Nougat… this is not an underpowered phone..

but it's hanging  under "Pending Followup" --  this was a mid-holiday report… so perhaps now that we are all "back at it" we ca work on this.

Two examples are

1) least offensive scenario:

Stack A may have a background image set 1028 X 1028… a lo-res image, centered so that regardless of the device width or height, using fullScreenMode, this background will fill..

Then we open a stack that has no such background and is constrained to 414 wide… if the device screen ration is a bit off then this will be pillar boxed… some stripes, left and right… and these are filled with the image of the previous stack A. Even Though Stack A, and it's window is destroyed.

2) worst case scenario

Entire image map of Stack B is not fully rendered.. even get some bizarre tiles or squares with odd colors or image data from Stack A, and only one area of Stack B is rendered like some weird inlay or overlay on top of the pixel map of Stack A.

Again, all stacks have their stack and window set to destroy and are explicitly closed after Stack B is opened. You must have a stack open and visible on Mobile or the app will crash, so that's why we leave Stack A open and only close it *after* Stack B is opened.

I have no recipe for this, and so HQ is at a loss. we also don't see this on our Pixel. Though I think I did occasionally see #1 above, but never #2.

I have yet to issue an update using "go in window" which Mark W. has recommended. But apparently we still need to explicitly close Stack A even if we "go  "Stack B" in window "Stack A"  and rather than issue this update, only to find it doesn't help.. I was fishing for a "clean up the video display ram" solution…

And side question:

What is the difference between destroyStack and destroyWindow. From the dictionary definitions, they appear to do the same thing, but we have them as separate props in the PI, so I presume they are not synonyms but have separate functions. Mute, because I set both to true for all stacks.. but still wondering the difference?

BR







Svasti Astu, Be Well
Brahmanathaswami
www.himalayanacademy.com<http://www.himalayanacademy.com> Get SivaSiva App Today--It's Free!

iOS: https://itunes.apple.com/us/app/sivasiva/id1271260502?mt=8
Android: https://play.google.com/store/apps/details?id=com.himalayanacademy.sivasiva
_______________________________________________
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: Artifacts on screen from closed stacks on Android

Matthias Rebbe via use-livecode
Have you tried a blank background image on stack B to explicitly overwrite
the buffer for areas outside of the stack? That may help problem 1 but
probably won’t help problem 2.
On Sun, Jan 28, 2018 at 2:05 PM Sannyasin Brahmanathaswami via use-livecode
<[hidden email]> wrote:

> We are getting reports (and screen shot and screen videos) from some
> Android users that show artifacts from a previously opened Stack A, when
> opening Stack B
>
> where
>
> Stack A is explicitly closed and has both destroyStack and destroyWindow
> set to true.
>
> In the absence of being able to reproduce these residual closed-destroyed
> stack artifacts issues on my Pixel (and HQ can't either) I am wondering if
> there is some hack, that will not affect performance too much, to forcibly
> clear out the pixels of the previously opened stack?  Details below:
>
> There is bug report on this already
>
> http://quality.livecode.com/show_bug.cgi?id=20810
>
> You can see screen shots there from a Galaxy A7 (2017) running Nougat…
> this is not an underpowered phone..
>
> but it's hanging  under "Pending Followup" --  this was a mid-holiday
> report… so perhaps now that we are all "back at it" we ca work on this.
>
> Two examples are
>
> 1) least offensive scenario:
>
> Stack A may have a background image set 1028 X 1028… a lo-res image,
> centered so that regardless of the device width or height, using
> fullScreenMode, this background will fill..
>
> Then we open a stack that has no such background and is constrained to 414
> wide… if the device screen ration is a bit off then this will be pillar
> boxed… some stripes, left and right… and these are filled with the image of
> the previous stack A. Even Though Stack A, and it's window is destroyed.
>
> 2) worst case scenario
>
> Entire image map of Stack B is not fully rendered.. even get some bizarre
> tiles or squares with odd colors or image data from Stack A, and only one
> area of Stack B is rendered like some weird inlay or overlay on top of the
> pixel map of Stack A.
>
> Again, all stacks have their stack and window set to destroy and are
> explicitly closed after Stack B is opened. You must have a stack open and
> visible on Mobile or the app will crash, so that's why we leave Stack A
> open and only close it *after* Stack B is opened.
>
> I have no recipe for this, and so HQ is at a loss. we also don't see this
> on our Pixel. Though I think I did occasionally see #1 above, but never #2.
>
> I have yet to issue an update using "go in window" which Mark W. has
> recommended. But apparently we still need to explicitly close Stack A even
> if we "go  "Stack B" in window "Stack A"  and rather than issue this
> update, only to find it doesn't help.. I was fishing for a "clean up the
> video display ram" solution…
>
> And side question:
>
> What is the difference between destroyStack and destroyWindow. From the
> dictionary definitions, they appear to do the same thing, but we have them
> as separate props in the PI, so I presume they are not synonyms but have
> separate functions. Mute, because I set both to true for all stacks.. but
> still wondering the difference?
>
> BR
>
>
>
>
>
>
>
> Svasti Astu, Be Well
> Brahmanathaswami
> www.himalayanacademy.com<http://www.himalayanacademy.com> Get SivaSiva
> App Today--It's Free!
>
> iOS: https://itunes.apple.com/us/app/sivasiva/id1271260502?mt=8
> Android:
> https://play.google.com/store/apps/details?id=com.himalayanacademy.sivasiva
> _______________________________________________
> 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: Artifacts on screen from closed stacks on Android

Matthias Rebbe via use-livecode
In reply to this post by Matthias Rebbe via use-livecode
On 1/28/18 2:04 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
> Entire image map of Stack B is not fully rendered.. even get some bizarre tiles or squares with odd colors or image data from Stack A, and only one area of Stack B is rendered like some weird inlay or overlay on top of the pixel map of Stack A.
>
> Again, all stacks have their stack and window set to destroy and are explicitly closed after Stack B is opened. You must have a stack open and visible on Mobile or the app will crash, so that's why we leave Stack A open and only close it*after*  Stack B is opened.
>
> I have no recipe for this, and so HQ is at a loss.

This issue has been around a very long time, and the simplest way to
reproduce it is to open the stack on any device that has a different
screen ratio than the one set during development. For example, in your
app which was set to accomodate iPhone 6 Plus, I see the problem when I
open the app on a Nexus 7 tablet.

To save processing time and power, LC only redraws the area inside the
card rectangle. It does not redraw any part of objects that lie outside
that area. We really do need a "redraw card" command, but for now you
can force a redraw by either hiding and then showing the offending
object, or by resetting it. Since your object is an image, you can reset
it with: set the imagdata of img x to the imagedata of img x. Or, if
it's a referenced image, just set its filepath again.

I have a header group in another app that extends far beyond the width
of the original card in order to accomodate any screen ratio. For this,
I hide the header group on closecard and re-show it on preOpenCard for
those cards that use the header.

We shouldn't need to do this, but I understand why LC doesn't deal with
areas that lie outside the card boundaries. Maybe we need a property
that instructs LC whether or not to redraw everything regardless of
object positioning.

I suppose another way to avoid the problem would be to just make every
stack square and let fullscreenMode noBorder clip the edges.

--
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: Artifacts on screen from closed stacks on Android

Matthias Rebbe via use-livecode
In reply to this post by Matthias Rebbe via use-livecode
On 1/28/18 2:04 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
> 2) worst case scenario
>
> Entire image map of Stack B is not fully rendered.. even get some bizarre tiles or squares with odd colors or image data from Stack A, and only one area of Stack B is rendered like some weird inlay or overlay on top of the pixel map of Stack A.

BTW, I see this when I've changed cards multiple times and the remnants
of the previous card edges are drawn over other remnants from even
earlier cards. With enough card or stack changes, the overlapping effect
begins to look like modern art.

--
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: Artifacts on screen from closed stacks on Android

Matthias Rebbe via use-livecode
In reply to this post by Matthias Rebbe via use-livecode
J. Landman Gay wrote:

    We really do need a "redraw card" command, but for now you
    can force a redraw by either hiding and then showing the offending
    object, or by resetting it.


BR: But we are talking about entire stacks… and the offending object wants to disappear completely across the entire screen, not be redrawn

This works on desktop, but there's a serious performance it..

   lock screen
   hide stack oStackName
   go to cardOrStackObject in window oStackName
   close stack oStackName
   show the topstack
   unlock screen

vs this which is relatively fast ( but leaves artifacts on android)

   go  cardOrStackObject  # e.g   go "gems" (or this string)  go card 3 of "gems"  
   wait 100 milliseconds with messages  
   close stack oStackName  
   wait 100 milliseconds with messages  

This is also very fast on desktop

   go to cardOrStackObject in window oStackName
           # would this possibly eliminate artifacts?
           # downside is user might see a "scary Picasso" briefly
   hide stack oStackName  # hopeful the amazing abstract will go away?
   close stack oStackName

If it does not crash my pixel (because there are no waits) I'll do a beta test for Aravind to test on his Galaxy..

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: Artifacts on screen from closed stacks on Android

Matthias Rebbe via use-livecode
On 1/28/18 8:25 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
> BR: But we are talking about entire stacks… and the offending object wants to disappear completely across the entire screen, not be redrawn

I think the problem in SivaSiva is the background image in most cases,
the one that extends beyond the card width. So I'd try hiding that image
on closestack and showing it on preopenstack.

--
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: Artifacts on screen from closed stacks on Android

Matthias Rebbe via use-livecode
I hide background images and then set the background fill of the card to that image id. Not sure if that would help.

Bob S


> On Jan 28, 2018, at 19:06 , J. Landman Gay via use-livecode <[hidden email]> wrote:
>
> On 1/28/18 8:25 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
>> BR: But we are talking about entire stacks… and the offending object wants to disappear completely across the entire screen, not be redrawn
>
> I think the problem in SivaSiva is the background image in most cases, the one that extends beyond the card width. So I'd try hiding that image on closestack and showing it on preopenstack.
>
> --
> Jacqueline Landman Gay         |     [hidden email]

_______________________________________________
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: Artifacts on screen from closed stacks on Android

Matthias Rebbe via use-livecode
Unfortunately, it is worse than that… see these screenshots from the Galaxy A7 running Nougat

http://wiki.hindu.org/uploads/20171227_104835.jpg


The entire "portal" stack remains rendered in the background, in this case, on card "home" even though

a) it was closed

b) destroyStack/destroyWindow (what's the difference?) are set to true

c) Stack "surprise" opens to card 3 which has a background texture with an image overlayed… only the image object from what is now the "topstack"  is rendered. The rest of the card is not.

similar case here where stack "gems" was closed and stack "Surprise" is opened but only the image object on the card renders while the entirely of the card of the close stack remains on screen in the background.

http://wiki.hindu.org/uploads/20171227_095851.jpg


 

On 1/29/18, 5:54 AM, "use-livecode on behalf of Bob Sneidar via use-livecode" <[hidden email] on behalf of [hidden email]> wrote:

    I hide background images and then set the background fill of the card to that image id. Not sure if that would help.
   
    Bob S
   
   
    >On Jan 28, 2018, at 19:06 , J. Landman Gay via use-livecode <[hidden email]> wrote:
    >On 1/28/18 8:25 PM, Sannyasin Brahmanathaswami via use-livecode wrote:
    >>BR: But we are talking about entire stacks… and the offending object wants to disappear completely across the entire screen, not be redrawn
    >I think the problem in SivaSiva is the background image in most cases, the one that extends beyond the card width. So I'd try hiding that image on closestack and showing it on preopenstack.

_______________________________________________
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