Simulator crashes when using :period in options of SensorHistory getXXHistory methods

Environment:

  • Mac Sierra 10.12.2
  • Eclipse Neon.2 (4.6.2)
  • ConnectIQ SDK 2.2.4 -- Plugins 2.2.3

Detailed Description:

Trying to use :period in the options argument to the SensorHistory methods getXXHistory (with the exception of getHeartRateHistory), causes the simulator to crash.
The only error output in the console is:

Failed invoking <symbol>
Socket Error in packet header 0


This happens with
  • getElevationHistory
  • getTemperatureHistory
  • getPressureHistory

but NOT with getHeartRateHistory

If I don't specify any options, then the simulator works.

Steps to reproduce:

  • Create a watch face project
  • Copy and paste the code snippet below into the onUpdate() method
  • Run
  • Observe the simulator crashing

Code sample:
function onUpdate(dc) {
var iterator = SensorHistory.getElevationHistory({:period=>1});
var sample = iterator.next();
var lbl = View.findDrawableById("TimeLabel");
lbl.setText(sample.data.toString());
View.onUpdate(dc);
}