ai2.appinventor.mit.edu says: An internal error has occurred. Report a Bug.

1,162 views
Skip to first unread message

Diane Marsh

unread,
Apr 2, 2018, 1:03:31 PM4/2/18
to MIT App Inventor Forum

I get this error message every time I try to connect with the AI Companion. Is it an MIT issue or internal issue? Thanks. 

SteveJG

unread,
Apr 2, 2018, 1:39:08 PM4/2/18
to MIT App Inventor Forum
There is a problem with your code blocks most likely.  What happens if you load a different Project?    I expect that other Project will load just fine.  


You did not post an image of your blocks so we can only guess.  The error message helps but the Forum needs more information to provide specific advice.

Here is Taifun's advice for when a Project won't compile ...Without any real information about your app, the guess is  something discussed  in item #4, depending on how it fails.  

  1. Use different screens wisely
    Before starting to create another screen, first you should think about is it really necessary? See also Building apps with many screens and SteveJG's post about advantages/disadvantagesbecause in only one screen you also can use vertical arrangements to simulate different screens, just set the arrangements to visible = true/false as needed... See also Martyn_HK's example about how to use Tabs in App Inventor and another example from Cyd

    If you decided to use different screens, then you should switch them correctly, else you will run out of memory after a while...      
    The recommended method of switching screens in App Inventor

  2. App Inventor works best if you use images whose size matches the size you want them to appear on your screen. If you import larger images into your app, your app may run out of system memory. Using Images with App Inventor

    by Italo: First, you need to understand that the file size of an image is not the amount of memory it uses when it's being displayed. The file size is the compressed size, much like a zip or rar file. When viewed, the image needs to be decompressed.
    For example, if your image says its file size is 100 kb, and its dimensions are 1024 x 768, 32 bit color, then that image uses over 3 mb of RAM (not 100 kb!) when you show it on the screen. ((1024 * 768 ) * 32) / 8 = 3,145,728 kb (3 mb)
    Now, this is a mistake most people make when using arrangements as "virtual screens": They set different image components with their images loaded but hidden, instead of having only one image component and changing the picture according to the user's selection or app events, not knowing that apparently the hidden image components are also using the ram, (yes, even though they are invisible!).

  3. Avoid redundancy
    Probably it helps to read chapter 19 - 21 in Dave's book http://www.appinventor.org/book2 to get an idea how to do DRY programming with App Inventor - Don't repeat yourself 

  4. See SteveJG's monster list of tips and tricks

  5. How to overcome the App Inventor project limit of 10 MB

  6. Backup your project frequently



Regards,
Steve

Chris Ward

unread,
Apr 4, 2018, 10:39:27 AM4/4/18
to MIT App Inventor Forum
Hello Diane

It is possible that your project is too heavy for the AI Companion - are you using the Companion on a phone? Try compiling the app -Build, App (save .apk to my computer). With your phone/device in Developer-Debug mode you can install the APK and see how your app runs with no restrictions.

On the other hand, could it be that the Companion is out of date compared to AI? Latest AI is nb166, which requires Companion version 2.46 (you can verify versions via the AI Help menu).

Finally, if you are not using FireFox, try it (v59.0.2). At the moment FF seems to be by far the best browser to use for AI.
Reply all
Reply to author
Forward
0 new messages