Problems on VA3 with transferred code

Hi,

my widget code works pretty well on the FR935, F5/5S and 5X but as soon as I open up the scope to the VA3 some strange things happens (but only on some physical devices). The simulator shows zero problems on the VA3 and I borrowed one from a friend - this unit did also not show any problems. But some users complain about e. g. that the descending floors are not shown as a graph, but only the descending floors. The ascending floors are shown quiet normal although the only difference is the qualifier. Here is the code snippet:
function createHistArray(aHistArr, current, label) {
var arr = new [8];
arr = [0, 0, 0, 0, 0, 0, 0, 0];
arr[0] = current;
if (null != aHistArr && aHistArr.size() > 0) {
for (var i = 0; i < aHistArr.size() && i < 7; ++i) {
if (null != aHistArr&& null != aHistArr[label]) {
arr[i+1] = aHistArr[label];
}
}
}
return arr;
}

[/CODE]

The calls are pretty much the same:
floorsClimbedArr = createHistArray(hist, Amo.getInfo().floorsClimbed, :floorsClimbed);
floorsDescendedArr = createHistArray(hist, Amo.getInfo().floorsDescended, :floorsDescended);


I wrote some debug code for those users where the descending floors are not shown and the array is neither [0, 0, ...] not [null, null, ...] but nothing is printed on the physical device.

Furthermore some other strange things happens on some VA3 devices. E. g. a back command to the latest screen let crash the widget. But only some back commands not all.

Do you have any ideas how to debug this?
  • In my case, I am using BehaviorDelegate and in furthermore in every single function a return statement is available. Saying this, on some watches there is no problem at all with the back behavior, on some the VA3 crashes, but not on all back behavior. And I am wondering what's different? One user told me that he has deleted some languages. That could be a difference but to be honest I don't beleive that this could be the reason. Typicalle the users who experience problems are on the newest firmware.
  • Former Member
    Former Member
    I wrote some debug code for those users where the descending floors are not shown and the array is neither [0, 0, ...] not [null, null, ...] but nothing is printed on the physical device.


    This almost sounds like the array itself isn't being created. Are you getting the array to print on the device that you tried? What about a device that isn't seeing the problem? Does it print on one of the working devices that you have available (i.e. 935 - not sure what you have)?

    ...E. g. a back command to the latest screen let crash the widget. But only some back commands not all.


    This sounds distinctly like a firmware bug on the device. I would love to get some more info over to the device team on this if you have any more distinct reproduction steps.

    One user told me that he has deleted some languages. That could be a difference but to be honest I don't beleive that this could be the reason. Typicalle the users who experience problems are on the newest firmware.


    Noting the languages, I'm wondering what version of hardware this user has. There are times where the World Wide (Most Countries) and the Asia Pacific (APAC) device firmwares are slightly out of sync. Typically the APAC devices receive the updated firmware on a delayed schedule. I'll need to do some investigation to see if that is the case.

    What I could use from you is some more info on my question in this response so I can dig a little deeper into what is going on.

    Thanks,
    -Coleman
  • I've had widgets/apps for the va3 in the store for quite some time now without any reported issues related to this. For people having problems with their apps, the most common cause I've seen by far is not doing the proper return in delegates. The va3 is much picker with this than other devices.

    In general, I return true, with an exception being in onBack if I want to terminate the app. And in things like onKey, I always have a fall-thru case that returns true. Same with onSwipe, etc.

    Without the proper return, I'm thinking that some things may be a bit random, based on what the caller sees as the return value.
  • This almost sounds like the array itself isn't being created. Are you getting the array to print on the device that you tried? What about a device that isn't seeing the problem? Does it print on one of the working devices that you have available (i.e. 935 - not sure what you have)?


    For sure, if I enable that debug switch on my 935, the array is created and shown on the display.

    This sounds distinctly like a firmware bug on the device. I would love to get some more info over to the device team on this if you have any more distinct reproduction steps.


    What I could try is creating a new widget and isolating this piece of code. Nevertheless, this would last a fair amout of time to code it, to release it on the website and it would require to have a VA3 user who can confirm the problems. Sounds complicated.

    Noting the languages, I'm wondering what version of hardware this user has. There are times where the World Wide (Most Countries) and the Asia Pacific (APAC) device firmwares are slightly out of sync. Typically the APAC devices receive the updated firmware on a delayed schedule. I'll need to do some investigation to see if that is the case.

    What I could use from you is some more info on my question in this response so I can dig a little deeper into what is going on.

    Thanks,
    -Coleman


    One user who complaint was from canada and I assume he owns the most typical device. He told me that he has deleted the languages from his watch to save space. But I don't think that this causes the problems.


    Another problem is that one page of the widget crashes at once (also only on some VA3 units). I have a delegate in place which utilizes both, behaviour and input delegates. May this causes problems?

    class summaryDelegate extends Ui.BehaviorDelegate {

    function onKey(evt) {
    var key = evt.getKey();
    if (Ui.KEY_ENTER == key) {
    enter();
    }
    return true;
    }

    function onSelect() {
    enter();
    return true;
    }

    function enter() {
    Ui.pushView(new summaryMaxView(), new summaryMaxDelegate(), Ui.SLIDE_LEFT);
    }