I got these errors in ERA:
Error Name: Out Of Memory Error
Occurrences: 4
First Occurrence: 2022-12-12
Last Occurrence: 2023-01-04
Devices:
fēnix® 6 Pro / 6 Sapphire / 6 Pro Solar / 6 Pro Dual Power / quatix® 6: 23.10
fēnix® 6X Pro / 6X Sapphire / 6X Pro Solar / tactix® Delta Sapphire / Delta Solar / Delta Solar - Ballistics Edition / quatix® 6X / 6X Solar / 6X Dual Power: 23.10
fēnix® 7X / tactix® 7 / quatix® 7X Solar / Enduro 2: 10.44
App Versions: 2.1.0
Languages: pol, slo, spa
Backtrace:
FitContributor.initialize:58
Field.initialize:602
MyApp.initialize:23
from the stacktrace I see that this is the very start of the app, when each object is created, but nothing more happens*, so in every device the same amount of memory should be allocated (no user input or preferences are read), and since I know that the app works on real fenix6 this makes no sense for fenix6pro, and even less for fenix7 that has 256K DF memory (as opposed to 32K for f6) to run out of memory at this point.
*) The only code that runs before this point that somehow could have different effect on different devices is this:
GenericChannel.initialize(method(:onMessage), new Ant.ChannelAssignment(Ant.CHANNEL_TYPE_RX_NOT_TX, Ant.NETWORK_PLUS));
What can cause this? Is it possible that the device starts the DF even though it has not enough memory to give it the amount "promised" by Garmin?
class MyApp extends Application.AppBase { var mSensor as Sensor; var mField as Field; function initialize() { var sensor = new Sensor(); mSensor = sensor; mField = new Field(sensor); } } class Sensor extends Ant.GenericChannel { const DEVICE_TYPE = 0x78; // Heart Rate Sensors - 120 // PERIODS: 4Hz: 8070, 2Hz: 16140, 1Hz: 32280 const PERIOD = 32280; public var deviceCfg as DeviceConfig; public var data as Data; public var searching as Number? = null; public function initialize() { try { GenericChannel.initialize(method(:onMessage), new Ant.ChannelAssignment( // removing "Ant." saves 4 bytes, but adds warning Ant.CHANNEL_TYPE_RX_NOT_TX, // Bidirectional Receive (Slave) Ant.NETWORK_PLUS) ); } catch(e instanceof Ant.UnableToAcquireChannelException) { logRelease(e.getErrorMessage() as String); searching = -1; } data = new Data(); // doesn't even have initialize(), just a few class variables // Set the configuration deviceCfg = new Ant.DeviceConfig( { :deviceNumber => -1, // Set to 0 to use wildcard search :deviceType => DEVICE_TYPE, // Heart Rate Sensors: 0x78 = 120 :transmissionType => 0, // Set to 0 to use wildcard search :messagePeriod => PERIOD, // 4Hz: 8070, 2Hz: 16140, 1Hz: 32280 :radioFrequency => 57, // Ant+ Frequency 2.457GHz :searchTimeoutLowPriority => 10, // Timeout in 25s :searchThreshold => 0} ); // Pair to all transmitting sensors } } class Field extends WatchUi.DataField { protected var mSensor as Sensor; public function initialize(sensor as Sensor) { mSensor = sensor; mFitContributor = new FitContributor(self); handleSettingUpdate(); } } class FitContributor { (:typecheck(false)) public function initialize(dataField as DataField) { var bpm = "bpm"; var heart_rate = "ANT_HR"; mCurrentHRField = dataField.createField(heart_rate, CURR_HR_FIELD_ID, Fit.DATA_TYPE_UINT8, { :mesgType=>Fit.MESG_TYPE_RECORD, :units=>bpm}); } }