InfiniTimeOrg / InfiniTime

Firmware for Pinetime smartwatch written in C++ and based on FreeRTOS
GNU General Public License v3.0
2.75k stars 941 forks source link

1.11 Watch face data corruption #1376

Open danielrparks opened 2 years ago

danielrparks commented 2 years ago

Verification

What happened?

After playing with different watch faces, the Casio 7-segment font was corrupted

What should happen instead?

The font should continue to work no matter how I interact with the watch

Reproduction steps

Not sure if it will be possible to reproduce this one.

I:

More details?

This is a sealed watch, unfortunately, so I don't have swd access.

Version

v1.11.0

Companion app

Gadgetbridge 0.70.0, itd r199.1e072a3

danielrparks commented 2 years ago

_20221017_121709

danielrparks commented 2 years ago

I reset the watch and the face loaded correctly, so the corruption was in-memory and not in the files themselves.

JF002 commented 2 years ago

@danielrparks Thanks for the report! This is something I've seen a few time during development. The cause was the the memory allocated to LVGL (the UI library that handles all the drawing and fonts) was full or fragmented, and LVGL couldn't allocate a buffer big enough to load the font into. Switching to another app then coming back to the watch face can potentially work around the issue. Resetting the watch is another work around.

The fix is not easy, though... I have a few options to optimize memory usage and reduce a bit of overhead in memory. This would allow to allocate more memory for the UI and hopefully reduce the chances of triggering this issue.

coledeck commented 2 years ago

As mentioned in another comment of #1377 , I also see nothing in terms of visible external assets (like the photo in https://github.com/InfiniTimeOrg/InfiniTime/issues/1377#issuecomment-1287387076) on the casio watchface specifically when it wakes for chime every hour. That might be a separate issue because it seems to only happen during chime wakeup. Going to another app and back fixes it.