Complete
over 1 year ago

What's wrong with the Forerunner 165 series ?

Hello all,

there seems to be a problem with both the Forerunner 165 and 165 Music models. The SDK used is the latest version 7.1.1 in Visual Studio. The Forerunner 165 model has a screen resolution of 390x390 pixels, and shares the same sub-project as all other models with screen resolutions ranging from 360x360 to 454x454. When I run one of my applications in the simulator with the Fr165 model, the simulator crashes at the output of a menu for entering numerical values (numerical picker) and, randomly, at other places in the program (navigation through the application's various menus). But the annoying thing here is that this problem also occurs on the physical model, following feedback from a user owning this watch, displaying the IQ symbol on the screen. And when I test the same application with another model (either of the same or a different resolution) sharing the same sub-project, everything goes smoothly, with no crashes or application crashes.
I then tested with three other different applications, and the same problem occurs every time, under the same circumstances. I've also tried with SDK version 7.1.0, but the result is the same: it crashes all the time.

I then tested with three other different applications, and the same problem occurs every time, more or less under the same circumstances. I've also tried with SDK version 7.1.0, but the result is the same: it always crashes.

Finally, I carried out a final test with my Relax HR application, whose project is structured in the same way (all models from resolution 218x218 to 454x454 all share the same sub-project). When I launch a model other than the FR165 with the same screen resolution (EPIX Pro 42 mm), I get a screen with all the design (lines, text, etc), which is expected and normal, but when I launch the FR165, here's the result in the simulator: no label, no text displayed, but only the lines and objects! Even though it's the same source code and the same used resource files!

I could not add some pictures here to show and illustrate this strange result, due to file quota restrictions.

So there seems to be a specific problem with these two models only, which possibly don't handle certain instructions properly. Am I missing something here, or is this a problem that others have already encountered or may reproduce?

-- Edit, after other several tests, 3 hours after my first post:

I investigated further and discovered that the problem occurred after loading and displaying an image in PNG format, stored in the resource file. Every time an image is loaded and displayed on the screen, the application either crashes within seconds of being displayed, or behaves very strangely like the Relax HR application (no text displayed on screen, for example). When I deactivate the loading and display of images, everything seems to work correctly, with no subsequent crashes when using the application's functions / menus.

So yes, I'm going to disable image loading and display for these 2 models, for the application currently concerned for this user, but I'd like to avoid having to do this for all my applications, which all use loading and display of at least one image.

-- End edit

Therefore, please Garmin team, could you investigate this somewhat penalizing problem for users who own this model?

Thanks in advance.

  • I'm going to resolve this thread since this isn't with regard to a bug in the Connect IQ system, but troubleshooting a bug in an app. In the future, please request help troubleshooting/debugging such issues in the discussion forums. Take a look at https://forums.garmin.com/developer/connect-iq/w/wiki/5/bug-reports-faq for guidelines on how to use this bug reporting tool.

  • Of course, the image loading check is performed upstream, so I haven't included all the relevant code. However, I'll try your suggestion bitmap.get(). Thanks again for your help, it's been great!

  • You have mentioned you have 2 errors...

    Strange you load bitmaps in two ways once, using yours function loadWelcomeImage second Ui.loadResource...

    You also don't check if bitmap before drawing (can be null if loading fails) ... snippets I have to guess....

    fr166 is device with graphic pool so try:

    bitmap = loading(...);

    if(bitmap != null) { bitmap = bitmap.get();}//only for device with graphic pool

    if(bitmap != null){ dc.drawBitmap... }

  • Thanks _psx_ for your suggestion.

    But, the first code snippet displays a gender-dependent image, but the second does not. And, the first code to be read will always be the second snippet (at least, the first time the application is used), and the application still crashes after switching to this second snippet so checking the validity of the gender variable won't change anything. And as mentioned, if there really was a problem with the gender (null or not), it should also crash for the other models, which is not the case. Another application (the Relax HR) uses and displays an image when the application starts up, the same image regardless of gender. This variable is not used in this application, and we find the same symptom: the application crashes with the FR165/Music and not with the other models.

  • First check if gender isn't null...