After updating Fenix 3 to 8.50 (and Fenix3HR to 4.50) my app crashed when exiting Menu. With long sound and rebooting (crashing) watch.
But in simulator everything ok.
https://apps.garmin.com/ru-RU/apps/afab51cb-1ff5-47cb-a074-6e4e70aee77e#0
I simplified app to minimum - just only one menu function - and it works great in simulator and crashes in live.
Just start this app, press menu button and press "start" or "back" button - and watch going to reboot.
ZIP archive of project : http://dropmefiles.com/ek1dp
using Toybox.Application as App;
using Toybox.WatchUi as Ui;
using Toybox.Graphics as Gfx;
using Toybox.System as Sys;
class ArcheryApp extends App.AppBase
{
var mainView;
var mainDelegate;
function initialize()
{
AppBase.initialize();
}
function onStart(state)
{
}
function onStop(state)
{
}
function getInitialView()
{
mainView = new ArcheryView();
mainDelegate = new ArcheryDelegate();
return [mainView, mainDelegate];
}
}
class ArcheryView extends Ui.View
{
function initialize()
{
View.initialize();
}
function onLayout(dc)
{
setLayout(Rez.Layouts.MainLayout(dc));
}
function onShow()
{
}
function onHide()
{
}
function onTimer()
{
}
function onUpdate(dc)
{
View.onUpdate(dc);
dc.setColor(Gfx.COLOR_BLACK, Gfx.COLOR_WHITE);
dc.fillRectangle(0, 0, dc.getWidth(), dc.getHeight());
}
function onEnterSleep()
{
}
}
class ArcheryDelegate extends Ui.BehaviorDelegate {
function initialize() //commented
{
BehaviorDelegate.initialize();
}
function onMenu()
{
Ui.pushView(new Rez.Menus.MainMenu(), new ArcheryMenuDelegate(), Ui.SLIDE_UP);
return true;
}
}
class ArcheryMenuDelegate extends Ui.MenuInputDelegate {
function initialize() {
MenuInputDelegate.initialize();
}
function onMenuItem(item)
{
if (item == :item_1)
{
//Ui.requestUpdate();
}
else if (item == :item_2)
{
//Sys.println("return");
}
else if (item == :item_3)
{
//Sys.println("score on");
}
}
function onBack() {
Ui.popView(Ui.SLIDE_DOWN);
}
}
Something similar was here:
https://forums.garmin.com/forum/developers/connect-iq/90246-appropriate-way-to-handling-exiting-onback-in-an-app