Struggling with simulator Errors after SDK installation: Out Of Memory Error

Hello together,

I installed the newest SDK version today (Connect IQ 4.0.5), afterwards lots of Garmin devices showed errors in the simulator (I use Eclipse).

Then, I switched back to the SDK version Conncet IQ 4.0.4. Now some of the devices are working fine and some don't work (which worked before the installation).

Settings:

- In the manifest editor, the minimum supported APK version ist 2.4.x

- In the simulator (run configurations) the target SDK version is 3.2.x and can not be changed.

The errors are similar, but not always the same, e.g.:

Error: Out Of Memory Error
Details: Failed invoking <symbol>
Stack:
  - getBackground() at C:\Users...\source\view.mc:206 0x10002821
  - initialize() at C:\Users...\source\view.mc:24 0x10001f04
  - getInitialView() at C:\Users...\source\app.mc:45 0x100000cd

My idea: The Stack-infomation look a bit like there could be a problem with loading a bitmap for the background. But only for some devices?

Has anybody an idea how to find a solution?

  • Which devices work and which don't? Not all devices have the same max memory.  What do you see as far as peak memory for those that do when you use "view memory" in the sim?  Sounds to me that you were very close to the max before.

  • You are right Jim. I have been close to the max before and after adding some functions I crossed the border :-D. Can you tell me where to find the max memory of the different devices?

    e.g. for the Forerunner 245 the simulator shows 21.4/92.0kB (and this device doesn't work).

  • The easiest place is just add a target and run an app of the correct app type it in the sim and look at the bottom line.  You'll also see it in the compiler.json for a given device.  Here's the fr55 for example.  Note, the vm uses 4k of this, so for example where you see 32k, you only get 28k.

        "appTypes": [
            {
                "memoryLimit": 32768,
                "type": "background"
            },
            {
                "memoryLimit": 32768,
                "type": "datafield"
            },
            {
                "memoryLimit": 32768,
                "type": "glance"
            },
            {
                "memoryLimit": 131072,
                "type": "watchApp"
            },
            {
                "memoryLimit": 98304,
                "type": "watchFace"
            },
            {
                "memoryLimit": 65536,
                "type": "widget"
            }
        ],