Acknowledged
CIQQA-3091

bug: Expected Method, given null

Error: Unhandled Exception Exception: UnexpectedType
Exception: Expected Method, given null


I get the above error in a point of the code (always there) where it makes no sense. The same code (+/- 10 lines both directions) haven't changed. Something else has changed in a totally different file.

The line with the error:

averagePaceOrSpeedUnitsLabel = "/" + WatchUi.loadResource(showSpeedInsteadOfPace ? Rez.Strings.h : (deviceSettings.paceUnits == System.UNIT_METRIC ? Rez.Strings.km : Rez.Strings.mi));

When I change the code in another place, then it either happens or not:

const ALL_SPORT_TYPES = true;
function addItem(menu as Menu2, label as ResourceId, id as Object) as Void {
    menu.addItem(new WatchUi.MenuItem(label, null, id, null));
}
The following code => crash:
if (ALL_SPORT_TYPES || Activity has :SUB_SPORT_SPEED_WALKING) { // CIQ 4.1.6
  addItem(settings, Rez.Strings.activityTypeSpeedWalk, 11031);
}
The following code => OK:
if (Activity has :SUB_SPORT_SPEED_WALKING) {
  addItem(settings, Rez.Strings.activityTypeSpeedWalk, 11031);
}
if (Activity has :SUB_SPORT_SPEED_WALKING) {
  addItem(settings, Rez.Strings.activityTypeSpeedWalk, 11031);
}
addItem(settings, Rez.Strings.activityTypeSpeedWalk, 11031);
It's so strange it can't be reproduced without my full project, so I sent it to garmin, I hope they'll be able to fix it. I just post it here so it's recorded (maybe someone else sees something similar in the future)
SDK 8.1.0, fr55, fr955 in the simulator
Parents
  • I get the following error again:

    Error: Unhandled Exception
    Exception: UnexpectedTypeException: Expected Method, given null

    In a different place of the code, again where it makes no sense. This "Expected Method, given null" seems to be thrown by the system (at least in the simulator) in some not so rare cases.

Comment
  • I get the following error again:

    Error: Unhandled Exception
    Exception: UnexpectedTypeException: Expected Method, given null

    In a different place of the code, again where it makes no sense. This "Expected Method, given null" seems to be thrown by the system (at least in the simulator) in some not so rare cases.

Children
No Data