Error code Out of Memory

I think you should stop developing and rethink your design. 35 screens are way to much. What is your project about and why do you need so many screens?

I guess this can be done with a lot less screens and a lot less blocks.

Show the blocks you are using.

Maybe post your aia.

1 Like

No matter what language you program your App with, 35+ screens is too great from both a technical and a User perspective. I suspect that you don't really need so many Screens nor so many Blocks, it is down to the way you have designed the Project. It is most likely possible to reduce the number of Screens and Blocks with a different coding technique, as I previously suggested in post #7.

  1. Make a backup of your Project
  2. Post the Project (.aia) here for us to take a look at it - let's see if we can rescue your idea without the bloat.
1 Like

I am having a similar problem, 23 screens, each 1,000-3,000 blocks. Are you interested in my aia file? I have tried all the tricks with different browsers, clearing cache, no big images, no other open tabs, etc. I have 64G RAM and it still crashes. This is a relative new problem.

Hi Daniel,

Are all those screens different or do they look the same? Always wondering why someone would need more than 10 screens. Most of the time I stick with 1 or max. 3. I only made more than 10 when I first started using App Inventor.

Each screen calculates growth parameters (height percent, weight percent, etc.) for different groups of kids, healthy and those with medical conditions. For each group there are different kinds of normal references and different age ranges and intervals, so the calculations are to a degree unique for each group (and therefore each screen). There are some similarities, and it would really help if we had a way to reference global procedures common to many screens without having to put them on every screen. I could probably consolidate some screens to be truthful, as the appearance of many screens is similar, but at this point those screens would get more complicated since every one would basically have to contain much of the code from the screens I've consolidated. So fewer screens, but only a small reduction in the number of total blocks.

Sharing procedure(s) across multiple screens are not possible. But, still you can experiment, taking benifit from this topic

1 Like

Thanks, interesting, I'll take a closer look. I guess maybe another way to do this would be to build an extension that does the procedures I need.

Yes, that would be possible in principle, but if almost the same procedures are required / executed on all your (real) 23 screens, virtual screens are definitely the best solution.

1 Like

May we see an example (the blocks) of one of these procedures?

This sounds like a table-driven lookup problem.

Do you load lookup tables from your Media folder at app startup?

1 Like

Yes, I have a separate lookup table for almost each screen. That works fine. The one problem is that the 20 tables are all formatted differently, in that they contain slightly different information (height, weight, etc.) and that the time intervals between rows is unique to each table (and sometime varies within a given table). These are all references from the medical literature, all from different research groups.

Here's one such procedure. There are 2 or three more like this on most every screen.

Yes, thanks, looks like I need to study virtual screens much more closely to see if that will work for me.

I looked at your sample procedure, hoping it could be consolidated and parametrized into some kind of standard form, like the way polynomials can be categorized purely by their coefficients.

Unfortunately, the 1/L exponent won't fit as a polynomial, and I haven't seen the other formulae to gather them into a universal parametrized format.

If the block count becomes a problem, you could shovel some of the complexity under the JavaScript rug.

JavaScript functions for your various formulae can be loaded dynamically at run time from the Media folder by Web component blocks, and can be fed through JSON objects (AI2 dictionaries).

1 Like

I have a fairly old test server at http://memopt.ai2-ewpatton-temp.appspot.com that has some experimental performance improvements to the App Inventor UI. It might be worth trying to load your project there if it doesn't use any recently added components to see if the enhancements at least temporarily address your problem so you can simplify the code a bit.

To get a FIND facility and fine grained procedure and Event downloaded backups, see the browser extensions in

As you consolidate screens, you will need them.

Thanks for your efforts. I think I will try to avoid the JavaScript angle, as I feel that might just be a bit too complicated for me. These formulae are very specific to this topic and are not used probably another areas of science. They're all relatively simple math, it's just that I have the same four or five procedures on nearly every single screen. It would be great of course if there was a way to have global procedures.

Thanks! I will try that out when I get a chance this weekend.

There is - Virtual Screens, as already suggested by ABG

When we define virtual screens, we use one 'real' App Inventor Screen (most often Screen1). Screen-sized Vertical Arrangements on it are displayed/hidden as required - they are the Virtual Screens. This is generally a better approach for multi-screen Apps, they share data without having to "pass" it between screens and it also reduces code duplication, making the App more efficient and the code easier to follow if you have to return to it at a later date.
So, instead of separate "houses", virtual screens are "rooms" of the same "house".

Hi there, tried your test server. Lots of messages that my .aia was created in a newer version, then hung at 86%.