Page 1 of 1
intermittent native field widget visiblity
Posted: Mon Jul 01, 2019 12:29 pm
by slowmaker
I'm curious if anyone else has seen this behavior:
simple stack with android native field widget on it
push to android device
native field is not visible at first, then becomes visible after successive pushes to the android device, but even then sometimes only after another app (any) has been run (!)
By 'push' I mean using the 'Test' menu item in the IDE, with actual android device attached via USB as the selected test target.
The sequence is highly repeatable; I only call it intermittent because it does sometimes take more than one loop to make it visible. Making it go *IN*visible does seem to require closing all apps on the device, running some other app, closing the other app, then pushing to android via Test again.
Full sequence that reproduces it for me:
- connect my android device via usb - samsung galaxy j3
open stack in clean IDE (no other projects open, LC v9.5 dp1)
select Development > Test
stack builds, launches in Android Device
native field is not visible; just featureless gray on screen
close app on android device
try above again; sometimes it will come up with the native field visible in a few tries, sometimes have to carry on as below:
- close ap on android device
open another app
NOW select Development > Test
odds much higher the field will show
The intermittent nature of this means that the last little test branch above may be useless; it may be that it just takes those few extra iterations in those cases...
So, anybody else seen this? If not, can anybody reproduce on their device/emulator?
Stack is attached, assuming the board will allow me to do so...
edit: made title a little more specific
Re: intermittent native field widget visiblity
Posted: Wed Jul 10, 2019 1:54 pm
by sphere
Yes, i've seen this.
And i added it to my Datagrid bug report. Which has also strange visual artifacts.
It is with LC950DP1, but not with LC905Rc1
check this
https://quality.livecode.com/show_bug.cgi?id=22231
But you could also create a separate bug report for it.
Re: intermittent native field widget visiblity
Posted: Sat Jul 13, 2019 6:37 pm
by slowmaker
Glad it wasn't just me; I was starting to wonder if I had some really specific screw-up on my part going on...
In the process of digging into the widget code and trying to spot the issue, I found yet another bug, a wrong-type error on the scrollingEnabled getter.
I'll file a bug report on it later today when I have time, along with a separate report on the peek-a-boo aspect.
Re: intermittent native field widget visiblity
Posted: Sat Jul 20, 2019 4:59 pm
by slowmaker
I filed the bug reports,
https://quality.livecode.com/show_bug.cgi?id=22240 and
https://quality.livecode.com/show_bug.cgi?id=22241.
I've also been trying some debugging on that native field widget. I made a copy and changed the identifiers to avoid conflict, then kept chopping pieces out and rebuilding until I got a minimum widget that still gives me this peekaboo effect.
I would greatly appreciate it if some of you guys could try building the widget from this lcb file, putting it in a stack and trying to push it to an android device to see if you get the same peekaboo result across multiple tests.
The repro file is quite short; here is the total current source, for those who might be curious but don't want to fool with a download/build/test cycle:
Code: Select all
widget com.livecode.widget.native.android.fielddebug
use com.livecode.widget
use com.livecode.canvas
use com.livecode.engine
metadata version is "1.0.0"
metadata author is "LiveCodeModdedForDebugBySlowmaker"
metadata title is "Android Native Field DEBUG"
metadata os is "android"
private handler IsAndroid() returns Boolean
-- comment out this routine, the effect goes away! huh? it's not even called!
return the operating system is "android"
end handler
public handler OnPaint()
-- make it clear whether the thing is 'live' or not;
-- when peekaboo effect is in play, you will not see the pink circle.
variable tCirclePath as Path
put circle path centered at point [my width / 2, my height / 2] with radius (my width/4) into tCirclePath
set the paint of this canvas to solid paint with color [1, 0, 1]
fill tCirclePath on this canvas
end handler
end widget
Also, it feels like it seems more likely to switch states on a test push immediately after a widget rebuild. Or perhaps just a re-saving of the standalone settings (even if none changed). Not sure yet.
Re: intermittent native field widget visiblity
Posted: Mon Jul 22, 2019 9:29 pm
by sphere
when i don't forget i will see if i can try this week.
Did not so much yet with lcb except for the few lessons.
By the way i also had an DG on the card.
and Panos suggested to:
Code: Select all
set the showborder of group "datagrid" of card "actual" of me to true
set the showborder of group "datagrid" of card "actual" of me to false
This seems to help for the DG, but i also noticed the Native Fields come up.
(but if you do something with background color hen the solution seem not to work anymore)
But it seems related to when "only when the acceleratedRendering of the stack is true"
Re: intermittent native field widget visiblity
Posted: Sun Jul 28, 2019 9:30 pm
by slowmaker
Additional info:
Have confirmed that it is it intermittent corrupt-apk creation, not intermittent performance of a given apk.
I created 25 standalones in a row, no changes to source or settings, just hitting File > Save as standalone application over and over and over...
The file sizes vary. I will attempt to attach them to the bug report; the larger files work, the smaller ones don't. You can reproduce it for yourself pretty easily, though; just build a bunch of apk's in a row with 9.5 dp-1. The larger ones will work, the smaller ones won't.
I've gotten it to occur on both linux and windows 10.
Observed it to happen in only 9.5 dp-1 (don't have 9.0.5, but 9.0.4 gives same size output every time).
NOTE!: it appears to be fixed in 9.5 rc1, just tried 25 standalone creations in a row without changes to source or settings. The output still varies in size a little, but not to the same order of magnitude; the field is visible and works (brings up keyboard) on all 25 APKs.
That file size variation is disturbing; I suspect something is still amiss there, but can't say what, other than that I would count that as a bug, even if the effects are uncertain at the moment. Same input should = same output, always.
EDIT: the multiple builds were way too big as a set, I was not able to attach them to the bug report. I attached the source instead.
Re: intermittent native field widget visiblity
Posted: Thu Aug 01, 2019 5:07 pm
by slowmaker
Appears to be fixed in 9.5 final.
Re: intermittent native field widget visiblity
Posted: Thu Aug 01, 2019 6:10 pm
by sphere
Ok that's great.
Did not have time to play with that LCB yet.
BUt if it is fixed it's ok.