Watch face crashes when updating with new Resource files

I noticed that when I push an update to the Connect IQ store with new resource files like fonts etc. The currently running watch face crashes. When you open some menu on the watch and then go back the new update version starts and runs fine.

But yeah for people who the watch face automatically updates in the background they think the watch face just randomly crashes as their not aware that an update was being done. I add a note to my new version release notes every time I update resource files, but yeah half of the people don't read it and then I get feedback like yeah watch face randomly crashes and such. 

Is there any way to prevent this from happening?

This bug is reproducible and happens every time consistently. 

  • What do you see in the ciq_log.yml/.bak file on the watch?  Which device?

  • All devices and there's no log because its basically the current running version that crashes. Basically it's like when the ConnectIQ app it pushes the new version to the watch, but the watch doesn't start it up, but because resource files are changed the current version crashes. You have to go into some watch menu and back to actually make the newly installed version start up. 

    Just give it a try you will see it happens. 

    Just create some basic watch face publish it on the store, then update this version with some new resource files etc and publish that through the store. Then update your watch face with the connectIQ app and you will see IQ crash logo on your watch. Then go to some menu and back and the new version runs. 

  • I have a number of watch faces in the store and a few different actual devices, but I typically don't change resources files that often.  There is nothing in garmin/apps/logs/ciq_log.yml?

    Are you using a CIQ 4 device where the graphics pool is involved?

  • My data field just started crashing, after I added a new User Setting in the Properties.xml.

    It works fine in the simulator. EDGE 1030.

    It crashes and throws an "Unhandled Exception" when I use: Properties.getValue("HYD_CHUNK");

    This has never happened before today. I've triple-checked everything. Something changed.

    "Property values must be defined in the application settings xml. If a key that is not present in application settings is passed to getValue(), an exception will be thrown."

    But HYD_CHUNK is defined in my properites.xml file as I've always done.

    <setting propertyKey="@Properties.HYD_CHUNK" title="@Strings.HYD_CHUNK_title"> <settingConfig type="numeric" min="4" max="1500" errorMessage="@Strings.HYD_CHUNK_error" /> </setting>

    ...

    <property id="HYD_CHUNK" type="number">6</property>

  • Yeah as long as I don't touch the resources updates go fine. It really happens when for example I replace the font of a text and then push the update. Then when I update through the Connect IQ app, the watch goes to IQ crash screen. When I open up some menu and go back to the watch face the new updated one boots up and all is fine again. The log file is always empty, because it's the log file from the new updated watch face. But it's the previous version that crashes. Garmin should implement something that the new watch face also starts up right after updating. The previous version probably  goes into crash because it suddenly cannot find a resource it's expecting anymore. 

  • Do you have the Properies.getValue() call in a try/catch?

  • Yeah, but I don't think its properties/settings

    It really happens when I change resources like fonts. 

  • It's the old bug, the solution can be: read resources only in initialize (view/app).

  • Ah ty!

    I will try that. I now load them in the OnLayout section as that is where the start code basically said I should. 

  • You probably have problems with the newest devices like f7/epix - they are not unloaded from memory when user  e.g. goes to widgets or settings and only onShow is called and sometimes onLayout.