session.getGeometry() and Fenix 3 reboots?

Former Member
Former Member
Hi,


Bumped into a weird problem today.
I wrote a very simple App that starts a session, when I push a button it calls getGeometry() and writes on the screen how many points are recorded.
This works without any issues. It runs for hours and my free memory stays around 45K without decreasing.

Now I add to my App a whole bunch of classes without changing anything to the actual code that is executed. So I just copy/paste some .mc files into my source folder. I do not instantiate or use any of those classes. They are just there to fill up the memory with code. Now I have 8 K free.
The second scenario runs for a few minutes. Then it crashes the device. I get the Garmin logo, it reboots, and brings me to the screen to save/discard the session that was running before it crashed.

It does not crash at the point that it calls getGeometry(). My App isn't doing "anything" at the point that it reboots the device. It is just waiting for a button to be pushed.
This is on Fenix3 v4.60. getGeometry() does not work on the simulator so I cannot test it there.
The result I get from getGeometry is not persistent. The handling is with local variables that are gone when onUpdate() is done.

I've been adding and removing code to try different scenario's. In the end it comes down to the getGeometry() call. If I call it with 8K free the device crashes a bit later.

Anybody seen this before? I wanted to use getGeometry in my program but if it crashes the device I won't.

Kind Regards,

WG
  • I've never used getGeometry, but in the 1.1.4 documentation, has a line striking it out and it says:

    Deprecated. The GeometryIterator class will be dropped in Connect IQ 2.
  • Former Member
    Former Member over 9 years ago
    I was assuming/hoping that this means that in version 2 there will be a better way to read information from the session.
    And not that it is broken :)
  • Former Member
    Former Member over 9 years ago
    As pointed out by Jim, this API is deprecated and will be removed with the 2.0.0 release in the future. We do not expect to have a replacement API immediately. We discovered several issues with this API, which can cause the crashes you have seen, and also prevent it from providing it's intended functionality.

    If you want to continue using the API, the best information I can provide is that you will need to have a significant amount of memory free in your app when utilizing the API. One of the issues that has turned up with this API is that it consumes a large amount of memory that is not trackable in the ConnectIQ pool. This is the primary cause of the crash you are experiencing.
  • Former Member
    Former Member over 9 years ago
    Hi Brian,

    thanks for the information.
    I'll use my own storage then for historical info.

    Kind Regards,

    WG