Complete
over 2 years ago

bug: System Error in calling GenericChannel.getDeviceConfig()

Error Name: System Error
Occurrences: 1
First Occurrence: 2022-11-18
Last Occurrence: 2022-11-18
Devices:
Edge® 530: 9.50
App Versions: 2.1.0
Languages: ita
Backtrace:
ExtHRMSensor.paired:146 var deviceCfg = GenericChannel.getDeviceConfig();
ExtHRMSensor.onMessage:92


Parents
  • So I am looking at my code and trying to think what scenario could reproduce it. Is it possible that onMessage is called with MSG_ID_BROADCAST_DATA, then "immediately" after that (from inside onMessage) I call GenericChannel.getDeviceConfig() but in some very rare cases between the time onMessage was called and the time I call getDeviceConfig some state of the channel changed (I don't know, let's say it disconnected) and that's wy getDeviceConfig generates the error?

    the documentation of GenericChannel.getDeviceConfig() doesn't seem to mention any possible issues, so if I am in my class that extends GenericChannel, and I am inside onMessage, should there even be anything I need to check before I call getDeviceConfig()? And even if yes, then would something like:

    if (checkWHatBrandonSays()) {
      GenericChannel.getDeviceConfig();
    }
    

    work? Or can still the state be changed between my call to checkWhatBrandonSays to the call of getDeviceConfig?

Comment
  • So I am looking at my code and trying to think what scenario could reproduce it. Is it possible that onMessage is called with MSG_ID_BROADCAST_DATA, then "immediately" after that (from inside onMessage) I call GenericChannel.getDeviceConfig() but in some very rare cases between the time onMessage was called and the time I call getDeviceConfig some state of the channel changed (I don't know, let's say it disconnected) and that's wy getDeviceConfig generates the error?

    the documentation of GenericChannel.getDeviceConfig() doesn't seem to mention any possible issues, so if I am in my class that extends GenericChannel, and I am inside onMessage, should there even be anything I need to check before I call getDeviceConfig()? And even if yes, then would something like:

    if (checkWHatBrandonSays()) {
      GenericChannel.getDeviceConfig();
    }
    

    work? Or can still the state be changed between my call to checkWhatBrandonSays to the call of getDeviceConfig?

Children
No Data