App-Settings-Problem (SET file deleted after send settings to simulator)

Hello,

I have a problem with changing app settings in simulator (Eclipse Mars on Windows7, ConnectIQ-SDK 1.2.5, latest simulator and SDK versions installed).

In resource file there are defined several settings (boolean, numbers, lists). With the latest app version all worked fine (using some booleans, numbers and 2 lists). In the new version I added 6 new lists for colors selection.
Now after changing the settings in simulator (using the app settings editor in eclipse), the settings are stored in SET file only one time (first change). After changing them a second time, the SET file gets deleted. The onSettingsChanged method tries to read the values but only gets "null" for every option.

What is going wrong? Is there a limit for app settings (or size of SET file)? It seems that happens only using lists.
Could anyone give me a hint how to fix this error? Is it only a simulator problem and it will work on the real device? ...but I can't check this because I have to publish a public version and can't test with sideloading :(

Thanks
Ronny
  • What version of the eclipse plugin are you using? In Eclipse, go to help>Installation Details.
  • The following versions are listet there:
    - ConnectIQ IDE 1.2.6
    - ConnectIQ SDK Manager 1.2.6
    - ConnectIQ App Settings Editor 1.2.6
  • There is a documented limit on the size of the properties file of 8KB. If you go over that, you will likely see a message from the simulator and then you'll start having problems reading/writing the properties file.

    If you're not running into this limit, it might be best if you post a test case (the resource the defines your properties is likely to be enough) so someone can debug it.

    Travis
  • Is it just the one .set file, or is it all the .set files, or possibly all the stuff in apps in the temp directory?
  • This was always a per-app limitation.
  • Hello Travis,

    the SET file has only 1KB. It's created with the first start of the simulator.
    Some times I can change the settings one time. Most times the error occures directly after the first change of the settings in ConnectIQ settings editor.

    Here is the SET file (as ZIP for Upload):


    Here ist the ressource (It's to long for inserting as text):
    The strings are defined again in two different languages (eng, deu) in two separate files. But that should not make a difference.


    I tested if there are differences using IDs or color-values. But the error occurs in both variants.

    Btw...is there a way to only define the color list <settingConfig type="list"> once and reuse it in the 5 list-settings?

    Bye
    Ronny
  • I plugged your properties resource into one of my projects and I don't have any problem with it. I can load up the App Settings Editor, change settings, save, close the app, re-open the app, see the saved settings, change them again, ... It all just works. Is there anything wonky about your configuration, maybe a space in the project folder path or anything like that?

    As for your second question, I don't believe there is any way to re-cycle the setting definition for multiple properties. Given that you must define which property the setting applies to, at least that much must be duplicated. Beyond that there doesn't appear to be anything to allow referencing another settingConfig. For most settings this isn't really useful, but when you're dealing with the listEntry stuff, it seems it would be useful.

    Travis
  • Hello Travis,
    thanks for testing.

    There are no blanks in the project path and no blanks in TEMP path.

    I testet again (after Windows restarted). Same situation. This time I could change settings once. The second change the SET file got deleted again.
    Very strange...I have no idea what could be the reason.
  • Hello again,

    I installed Java-updates (32/64bit), installed eclipse new (32/64bit). Cleared workspace, installes IQ-plugin.
    I disabled firewalls, sanboxing, defense+ (from Comodo), disabled windows firewall. Just to check if the file would be isolated by defender or antivirus. But this had no effect.
    I tried to use several SDK versions.
    Now I use the 32bit eclipse version with SDK 1.2.6.
    But still same situation with deleting SET-file...

    What I see (leaving windows-explorer open sto see the directory) was:
    While sending the settings to simulator, the SET file was created (showing in windows explorer for a part of a second) and then it disappeared. As if simulator creates and the directly deletes the file.

    Can someone explain how the changed settings are stored using the eclipse app settings editor?
    - are the settings sent over tcp from editor to the simularor?
    - does the simulator write the SET file?
    - are there further dependencies?

    What I've seen in SET file (after build/start of simulator) was that the ordering of settings was not the same as in the resource file. Is this normal behavior?
  • Former Member
    Former Member over 9 years ago
    What I see (leaving windows-explorer open sto see the directory) was:
    While sending the settings to simulator, the SET file was created (showing in windows explorer for a part of a second) and then it disappeared. As if simulator creates and the directly deletes the file.

    To clarify what you're saying here, you have Windows Explorer opened to %TEMP%/Garmin/Apps/Settings and are seeing a .SET file created then deleted within that directory? The App Setting Editor creates a temporary .SET file, pushes it to the simulator and then deletes the temporary file. The simulator should be copying the temporary file to the App/Settings directory. If a file is being created then delete immediately at %TEMP%/Garmin/Apps/Settings then that's a bug.

    Can someone explain how the changed settings are stored using the eclipse app settings editor?
    - are the settings sent over tcp from editor to the simularor?
    - does the simulator write the SET file?
    - are there further dependencies?

    1) The settings file is pushed to the simulator via TCP.
    2) The simulator copies (and overwrittes) the settings file that the App Settings Editor creates.
    3) If you have the latest SDK and plug-in you shouldn't need anything else.

    What I've seen in SET file (after build/start of simulator) was that the ordering of settings was not the same as in the resource file. Is this normal behavior?

    The settings should appear in the App Settings Editor in the same order they are compiled (the order they are defined in XML). The order could get weird if you have the settings definition split between files. If you think you're seeing a bug with how they are displayed in the App Settings Editor please send the relevant project files to [email][email protected][/email] with a link to this thread.