This issue has been reported by various Approach S60 owners using my Crystal watch face:
https://apps.garmin.com/en-US/apps/9...7-17cfa0f0081b
The latest report was on an S60 running firmware 4.0.0, using a sideloaded version of the watch face, compiled using Eclipse 4.7.3a for Mac, with SDK 2.4.5.
I use a resource string for language detection, specifically, to detect Chinese languages , so that a different custom font can be loaded. Rez.Strings.DATE_FONT_OVERRIDE is an empty string for most languages, but "ZHS" for Chinese (Simplified), and "ZHT" for Chinese (Traditional).
This method works on all real watches, as far as I know, except for the S60. This method also works on S60 in the simulator.
A typical log for a crash is:
ERROR: Invalid Value
DETAILS: Failed invoking <symbol>
STORE_ID: 00000000000000000000000000000000
CALLSTACK:
/Users/vince/Documents/Projects/connect-iq/crystal-face/./source/DateLine.mc (initialize:48)
Rez (WatchFace:109)
/Users/vince/Documents/Projects/connect-iq/crystal-face/./source/CrystalView.mc (onLayout:83)
This points to the following line in the code:
var dateFontOverride = Ui.loadResource(Rez.Strings.DATE_FONT_OVERRIDE);
I have been able to deduce the following, some with the help of an S60 owner:
- Other strings load successfully, earlier on in the same function, using exactly the same pattern UI.loadResource(Rez.Strings.<string_id>), so there is not a general string loading problem.
- Renaming the string ID e.g. to "DateFont" does not solve the issue.
- Making the string non-empty e.g. "DEFAULT" does not solve the issue.
- Loading a different string at the same location in code (instead of the problematic one) works successfully.
- Removing the comment in the strings.xml file above the definition for the DATE_FONT_OVERRIDE string does not solve the issue. There are no unusual hidden characters in the base strings.xml file.
- S60 has some resource overrides (i.e. theres' a resources-approachs60 directory). This does not contain a strings.xml, but placing a copy of the "base" strings.xml in the appropriate sub-directory does not solve the issue.
- The problematic string was originally loaded before setLayout() was called. It's now called during the creation of a drawable within the layout, but that has not solved the issue.
The code is available on GitHub (link is to the specific hotfix branch with various fixes attempted and reverted):
https://github.com/warmsound/crystal...e/hotfix/%2320
The issue itself is tracked here:
https://github.com/warmsound/crystal-face/issues/20
Hopefully I'm not missing something obvious here! Any clues about how to proceed would be much appreciated.
Thanks,
Vince.