Vivoactive HR crash on startup via ConnectIQ.openApplication

Hi,

VAHR specific, I'm getting crashes 100% of the time when starting the watch app from Android phone.

This is what I'm doing on Android:

connectIQ.openApplication(getDevice(), getApp(), new IQOpenApplicationListener() {
@Override
public void onOpenApplicationResponse(IQDevice iqDevice, IQApp iqApp, IQOpenApplicationStatus iqOpenApplicationStatus) {
}
});


VAHR displays prompt and then immediately crashes to IQ! screen. The crash generates no logs in CIQ_LOG.TXT and no ERR_LOG.TXT.
The app crashes before initialize() method of my main app method (tried to log in initialize and in onStart and nothing).

Compiled with SDK 2.2.4., VAHR is FW v3.40.

With the same app, it does not happen on any other CIQ device (VA, Fenix3 and Fenix3hr tried).
  • Hey,

    Thanks for the report. I've got a ticket to investigate, but I think we might have a root cause. Do you have an emptyMailbox() call to clear the mailbox on startup? There is a bug in one of our older VMs that would cause the app to crash if you tried to empty the mailbox and it was already empty. As of the current software version on the VAHR they still haven't integrated the latest VM and it could be causing the issue. Please reply back with some more info if possible. Also, in the future, please see theBug Reports Forum Rules when post a report. Consistent reports help us a lot when trying to work through the issues that are found. Thank you again!

    -Coleman
  • Thanks for looking into it and sorry for not abiding entirely the bug report forum rules.

    Actually I do not do emptyMailbox() on startup, so it has to be something else.

    The relevant code to prove it would be:

    function initialize() {
    AppBase.initialize();

    phoneCommMethod = method(:onMsg);
    mailCommMethod = method(:onMail);
    if(Comm has :registerForPhoneAppMessages) {
    Comm.registerForPhoneAppMessages(phoneCommMethod);
    } else {
    Comm.setMailboxListener(mailCommMethod);
    }
    }

    function onMail(mailIter) {
    var mail;
    do {
    mail = mailIter.next();
    if (mail != null) {
    log("onMail:" + mail.toString());
    mail = mail.toString();
    handleIncomingMessage(mail);
    }
    }
    while ( mail != null );

    Comm.emptyMailbox();
    }


    I was doing this on VAHR FW3.40 and that should not use the Mailbox API at all.


    The app crashes only when starting the watch app from phone, and never when starting directly from the watch.