Acknowledged

OLED: font resources seem to be forgotten while sleeping which leads to a crash onExitSleep

It seems that OLED watches now release fonts when sleeping and onExitSleep is called before initialize, so the app crashes when it uses fonts in the onExitSleep to update the layout. 

I get null exception while a resource is expected on this line that is called from onExitSleep.

"UnexpectedTypeException: Expected Number/Resource, given null…"

I got thousands of failure reports on this line from a variety of OLED devices. 

I do not release fonts anywhere in the code and the same line is called via initialize without problems. 

I hotfixed it by catching the exception and calling the initialize instead, but that is a huge wasting of resources and probably a battery. 

I am not aware of any documentation that the Monkey might release any resources on its own and even if it does, I'd expect it would call initialize before onExitSleep. 

Some of devices where the error occurred: 

  • Venu® 3: 8.25
  • vívoactive® 5: 8.27, 4.14
  • Forerunner® 265s: 17.26

EDIT: added an exception text

EDIT2: added devices 

Parents
  • I was able to cause a crash with the given app by quickly pressing the backlight button on an oled device.

    Error: Unhandled Exception
    Time: 2024-02-26T17:27:35Z
    Part-Number: 006-B4315-00
    Firmware-Version: '18.15'
    Language-Code: eng
    ConnectIQ-Version: 4.2.4
    Store-Id: e767e34d-7b85-4c44-bf4f-19afeb71a5db
    Store-Version: 60
    Filename: D71188D
    Appname: 'simply late! weather calendar'
    Stack: 
      - pc: 0x100060a9
      - pc: 0x10005961 

Comment
  • I was able to cause a crash with the given app by quickly pressing the backlight button on an oled device.

    Error: Unhandled Exception
    Time: 2024-02-26T17:27:35Z
    Part-Number: 006-B4315-00
    Firmware-Version: '18.15'
    Language-Code: eng
    ConnectIQ-Version: 4.2.4
    Store-Id: e767e34d-7b85-4c44-bf4f-19afeb71a5db
    Store-Version: 60
    Filename: D71188D
    Appname: 'simply late! weather calendar'
    Stack: 
      - pc: 0x100060a9
      - pc: 0x10005961 

Children