App chrashes after a while, with "Failed invokings symbol. System Error"

I have an app that displays some position and distance data, but after running for a while in the simulator (some 30-seconds), it fails with the error text:

Failed invoking symbol. System Error

The app uses the onPosition event to update the screen, and is started with the enableLocationEvents command:

It then updates the position exactly 16 times, and then fails. It happens after 16 occurances every time I run it in the simulator.
If I transfer the app to my watch (Fenix3), it runs for a couple of minutes, and then goes to the Garmin startup screen and freezes up.

The console in the simulator tells me that the failing line is this:

Mark1 = Position.parse(string, Position.GEO_DM)

But it performs fine the first 15 times it is executed.

Can anyone explain this ?
  • Which version of the SDK? Also, post a bit more code such as how you setting up "string". I'd suspect something odd with it.
  • Here are a bit more code. I have to attach it, since the editor will not accept some character.

    It is part of the onUpdate function for the view.

    The SDK version is 2.3.1.

  • The issue is signalled by "System Error". To quote Brian.ConnectIQ in my post https://forums.garmin.com/forum/deve...ect-iq/160191-
    System Errors do not indicate an error with the code at the backtrace, they indicate an error with the underlying VM execution, so you should not try to evaluate errors with the code in question. We need to investigate "under the hood" to figure out what is triggering these errors. More information about the code at the point it is triggering can be helpful to that investigation, but the context of that code is less relevant.


    My problem is that my crash is not reproducible, if yours is, then I think it's really important that Garmin gets onto it straight away. FWIW, I think the problem is in the firmware handling myApp.setProperty, but who knows?

    Although this looks wrong:
    var app = App.getApp();
    var Waypoints = app.getApp().getProperty("Positioner");

    you're calling getApp (to retrieve the appBase) on app, but app is already the appBase from the call app = App,getApp().
  • I still cant post code sequences, so I will have to attach 2 files with the code.

    Now I have cut away all unnecessary stuff, and I am no longer using the object store - but still gets the same system error.

    The error occurs in the line with Sys.println command.

    The println command will print to the console 15 times, and then it crashes at the 16. time.

    If I declare the Bojer3 variable inside the onUpdate function, then everything is OK.

    Can anyone explain what is wrong ?


  • Like I said in my earlier post, it's a bug in the firmware. Please send the details to Garmin as a bug report through the "Contact Us" link below. My GPS enabled app suffers from the same issue, but not so regularly, your case will help to isolate the issue.
  • I have just posted a bug report to Garmin.

    Do you by any chance have a workaround for the issue ?

  • No, that's the enormity of the issue, I have no work-around! My situation is worse in that the crashes appear quite random.
    You seem to be able to influence the frequency by adding code, but a word or caution: don't rely on that as a work-around, it will probably turn out to push the crash somewhere else.

  • Have you checked for null here?

    var curPos = posnInfo.position;


    The API documentation specifies that any of the fields in the Position Info object might be null and should be checked for. Although this might not be the issue you might want to check for safety anyways.
  • Former Member
    Former Member
    We have reproduced the test case provided by nbech.dk. There are no guarantees that this System Error is caused by the same issue as any others, but we will definitely be able to track this one down with this easily reproducible case.