Acknowledged

additional view.onShow()

eclipse: Version: 2022-06 (4.24.0) Build id: 20220609-1112
plugin: 4.1.2
SDK: 4.1.5
Windows 10 21H1

- run WF in sim  2022-8-15 21:57:18

- sim [settings] [low power mode] 2022-8-15 21:57:25

- sim [settings] [force onHide] 2022-8-15 21:57:30

effect:

2022-8-15 21:57:18 >view.initialize< ---- start
2022-8-15 21:57:18 >view.onShow< ---- start
2022-8-15 21:58:00 >view.onShow< ---- additional onShow no initialse

question: is it the bug on sim or the same is on device

I have strange error in low power mode:

Error Name: Unexpected Type Error
Occurrences: 4

    VenuTm: 6.90
    epixTm (Gen 2) / quatix® 7 Sapphire: 8.37, 9.22

function draw(dc)
{
    var 
	i = 0,
	v = mI_L,				//! class member, never null, array
	t = $.GLB;				//! global, settings, never null 
		
	dc.setClip(0, 0, t.screenWidth, t.screenHeight);
	do
	{
			if(v.size() == 3) /// <----------- here error from ERA
			{
			    draw_item(dc, v[0], t);
			    draw_item(dc, v[1], t);
			    draw_item(dc, v[2], t);
			}...
			
			...
			
			v = mI_R;       //! class member, never null, array
			i++;
	}while (i < 2);
}

  • After discover second onShow() I've rewritten app and no ERA error.

    So anybody who assumes flow like in documentation can meet very strange error like in my example (it's look like v/mI_L is null but it is array created in initialise and should exist always).

    Of course for app can be onHide() than second onShow() but not for WF - or there is the bug in doc.

  • I'm not clear about what your concern is here. It would help if your were more concise about what the problem is. Are you concerned about the second onShow call, or the error in your draw method? The purpose of this bug reporting tool is not to request assistance to debug issues in your code, but to report suspected bugs, preferably with reproduction steps. Can you demonstrate that 'v' in your if statement on line 11 is the correct type (I realize you infer it's never null and an array, but I have no way to confirm that).

    It appears that you're inferring the second call to onShow does not initialize your variables and perhaps that's how you're obtaining the unexpected type error. I'm just not sure I'm interpreting this correctly.

  • The same code is called of course in high power and without the error.

    It looks like in low power system hides/deletes members - but why if every minutes system calls onUpdate even AOD is off.

    Or it happens just after/in onExitSleep - still on some device there is bug that in onExitSleep system doesn't allow to do everything like in high power.

  • I don't have onLayout but when I add it  log looks like:

    2022-8-15 22:25:03 >view.initialize<
    2022-8-15 22:25:03 >view.onLayout<
    2022-8-15 22:25:03 >view.onShow<
    2022-8-15 22:26:00 >view.onShow<