Variables in Screen1

Doesn't matter the order in the variables, in the block Inizialitze Screen1.... the block execute the first and the other variable block doesn't

So what's the problem?

Show us.

Hello David

If there is too much going on in the Screen Initialise, variables etc may not be primed. Think about it - the App is initialising the GUI in Android at that time, allocating memory etc.

The solution is to start a Clock Timer in Screen Initialise, and in the Clock Timer Block prime all your variables etc.

All global variable initialize blocks run before the Initialize event by design.

So why does a 'large' Screen Initialize fail, but is OK if the vars are removed and initialised later in a Clock Timer? Has the original Screen Initialize Block design been compromised by something?

There could be a lot of reasons for that. If you can provide actual examples we can analyze them to learn more but generally this shouldn't be a problem.

I have an app where a large number of lists, variables and dynamic components are initialized in an initialization block. I didn't notice any problems with variables, except that api is long unavailable for the user :wink: .
I suspect there is a different type of problem here, and we need to see the blocks.

It has been an issue for several Users. There might be a common denominator (something those Users have in the Init Block that others do not) but moving to a Timer always fixes the problem.

Android does have a limit on how long it will let an app take to start before killing it for non-responsiveness. If the apps in question have many images for example, loading those takes time and make take more time than Android allows. By moving some initialization to a later point, the app isn't killed by Android.