Resource overrides for properties not working consistently in simulator

o A Descriptive Title (i.e. “Simulator Freezes Launching App in Eclipse”)
Resource overrides for properties not working consistently in simulator

o The Environment:
Windows 10
Eclipse Neon.1 (4.6.1)

o A detailed description of the issue
According to the documentation for App Settings [1], I should be able to override properties like any other resource by using resource qualifiers [2]. When running under the simulator, it appears that resource qualifiers are not consistently being applied to properties.

o Steps to reproduce the issue
Import the project (see link below) into Eclipse, and execute the following steps to reproduce the problem.

  • Execute the test program using fenix3 as the target device.
    • verify you see the likeness of a fenix3 device.
    • verify you see 'default' displayed on the simulated device screen.
    • click ConnectIQ > App Settings Editor in Eclipse.
    • select 'Properties' from the 'Project' dropdown, and wait
    • verify you see 'default' displayed under the 'Resource Folder' setting.

  • Kill the app in the simulator (CTRL+K)
  • Execute the test program using fr735xt as the target device.
    • verify you see the likeness of a fr735xt device.
    • verify you see 'fr735xt' displayed on the simulated device screen, indicating the override of TestString worked as expected.
    • click ConnectIQ > App Settings Editor in Eclipse.
    • select 'Properties' from the 'Project' dropdown, and wait
    • you should see 'fr735xt' displayed under the 'Resource Folder' setting, but you will find 'default' instead. This indicates that the 'TestProperty' override did not work as expected.



At this point, we've reproduced the problem. If we go further, we can get some insight as to where the issue lies.

  • Kill the app in the simulator (CTRL+K)
  • Exit the simulator (CTRL+Q)
  • Exit Eclipse (ALT+F4)
  • Delete the %TEMP%\Garmin folder (rmdir /s /q %TEMP%\Garmin)
  • Start Eclipse
  • Execute the test program using fr735xt as the target device.
    • verify you see the likeness of a fr735xt device.
    • verify you see 'fr735xt' displayed on the simulated device screen, indicating the override of TestString worked as expected.
    • click ConnectIQ > App Settings Editor in Eclipse.
    • select 'Properties' from the 'Project' dropdown, and wait
    • verify you see 'fr735xt' displayed under the 'Resource Folder' setting.

  • Kill the app in the simulator (CTRL+K)
  • Execute the test program using fenix3 as the target device.
    • verify you see the likeness of a fenix3 device.
    • verify you see 'default' displayed on the simulated device screen.
    • click ConnectIQ > App Settings Editor in Eclipse.
    • select 'Properties' from the 'Project' dropdown, and wait
    • you should see 'default' displayed under the 'Resource Folder' setting, but you will find 'fr735xt' instead. This indicates that the 'TestProperty' override did not work as expected.



This indicates to me that the resource system is working as intended (the correct override is used the first time after wiping out the %TEMP% folder), but there is some property caching that is preventing the correct properties from being loaded in some cases.

o Any applicable additional information
N/A

o A code sample that can reproduce the issue (in email only if preferred)
https://1drv.ms/u/s!Ak71bikqehCh1il-2k3L1FlXp8ab
  • Former Member
    Former Member
    o A Descriptive Title (i.e. “Simulator Freezes Launching App in Eclipse”)
    Resource overrides for properties not working consistently in simulator

    o The Environment:
    Windows 10
    Eclipse Neon.1 (4.6.1)

    o A detailed description of the issue
    According to the documentation for App Settings [1], I should be able to override properties like any other resource by using resource qualifiers [2]. When running under the simulator, it appears that resource qualifiers are not consistently being applied to properties.

    o Steps to reproduce the issue
    Import the project (see link below) into Eclipse, and execute the following steps to reproduce the problem.

    • Execute the test program using fenix3 as the target device.
      • verify you see the likeness of a fenix3 device.
      • verify you see 'default' displayed on the simulated device screen.
      • click ConnectIQ > App Settings Editor in Eclipse.
      • select 'Properties' from the 'Project' dropdown, and wait
      • verify you see 'default' displayed under the 'Resource Folder' setting.

    • Kill the app in the simulator (CTRL+K)
    • Execute the test program using fr735xt as the target device.
      • verify you see the likeness of a fr735xt device.
      • verify you see 'fr735xt' displayed on the simulated device screen, indicating the override of TestString worked as expected.
      • click ConnectIQ > App Settings Editor in Eclipse.
      • select 'Properties' from the 'Project' dropdown, and wait
      • you should see 'fr735xt' displayed under the 'Resource Folder' setting, but you will find 'default' instead. This indicates that the 'TestProperty' override did not work as expected.



    At this point, we've reproduced the problem. If we go further, we can get some insight as to where the issue lies.

    • Kill the app in the simulator (CTRL+K)
    • Exit the simulator (CTRL+Q)
    • Exit Eclipse (ALT+F4)
    • Delete the %TEMP%\Garmin folder (rmdir /s /q %TEMP%\Garmin)
    • Start Eclipse
    • Execute the test program using fr735xt as the target device.
      • verify you see the likeness of a fr735xt device.
      • verify you see 'fr735xt' displayed on the simulated device screen, indicating the override of TestString worked as expected.
      • click ConnectIQ > App Settings Editor in Eclipse.
      • select 'Properties' from the 'Project' dropdown, and wait
      • verify you see 'fr735xt' displayed under the 'Resource Folder' setting.

    • Kill the app in the simulator (CTRL+K)
    • Execute the test program using fenix3 as the target device.
      • verify you see the likeness of a fenix3 device.
      • verify you see 'default' displayed on the simulated device screen.
      • click ConnectIQ > App Settings Editor in Eclipse.
      • select 'Properties' from the 'Project' dropdown, and wait
      • you should see 'default' displayed under the 'Resource Folder' setting, but you will find 'fr735xt' instead. This indicates that the 'TestProperty' override did not work as expected.



    This indicates to me that the resource system is working as intended (the correct override is used the first time after wiping out the %TEMP% folder), but there is some property caching that is preventing the correct properties from being loaded in some cases.

    o Any applicable additional information
    N/A

    o A code sample that can reproduce the issue (in email only if preferred)
    https://1drv.ms/u/s!Ak71bikqehCh1il-2k3L1FlXp8ab


    I've opened up a ticket and we will likely be looking at it soon. Thanks as always.

    -Coleman
  • I am also affected by this bug and would appreciate a soon fix.

    @Travis: Thanks for the bug report. Saved me some time :-).

    Best regards,
    Florian
  • Thanks a lot for reporting this. 6 years and it is still not fixed. Only clearing the %temp% will load the correct resources in the emulator.

  • have you tried the strings sample in the SDK?  It uses overrirdes for devices or languages.  Which SDK are you using?  VS Code or Eclipse?

    I also use jungles to handle things like app settings, where for most devices they are the same, but different for the Instinct2 devices (no color settings as they are B&W)

  • VS Code, I always need to delete folder %temp%\com.garmin.connectiq to reload the correct app if I recompile to a different device for testing.

  • I am using Connect IQ SDK 4.1.4 - Release Date Jun 8, 2022

  • mac or windows?  Do you see the picture of the device change in the sim when you switch devices?  What version of the extension are you using and which SDK?

  • Windows 10, Garmin Monkey C extension v1.0.5, Connect IQ SDK 4.1.4 

    Yes, the device picture changes in the simulator correctly.

  • Thanks for the support Jim, really appreciate it.

  • What version of java?  Here's what I use:

    java -version
    openjdk version "17.0.2" 2022-01-18
    OpenJDK Runtime Environment (build 17.0.2+8-86)
    OpenJDK 64-Bit Server VM (build 17.0.2+8-86, mixed mode, sharing)