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
  • 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.


    Hello Ken,
    thanks for answering.

    I just checked again...
    - with first start of the simulator (after new build), a .SET (upper case!) file is created in directory %Temp%\Garmin\Apps\SETTINGS (In my case in Windows its C:\Users\Ronny\AppData\Local\Temp\Garmin\Apps\SETTINGS).
    - after opening the settings editor, alls default settings are displayed with default values (from resouce) in correct order.
    - after sending settings to simulator, the .SET file is deleted.
    Then in most cases I can't see any file.
    In some cases (1 of 10 or 20 times) I see a .set file (lower case file suffix!) for just 1/4 second and then it is deleted.
    Is there something wrong with the file suffix? Must it be upper case?

    Can I provide further information for you to investigate if it's a bug? Or can I do some tests to check if it depends on the local environment?
    Is there a log I can check or a trace I can activate?

    Additionally some infos about the environment:
    Windows 7 64bit
    Eclipse Mars 32bit
    Java 8 Update 77 32bit
    Connect IQ IDE 1.2.6
    Connect IQ SDK Manager 1.2.6
    Used SDK for build: 1.2.6 (but same situation with 1.2.4 or 1.2.5)
    same situation with Eclipse/Jave in 64bit version.

    Thanks for your help.
    Ronny

    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.

    I meant the order of the data inside the SET file. In settings dialog alls is correct. If I open the SET file in editor (e.g. notepad++) I see the setting-descriptions in a other sorting tha defined in ressource file. But the first created file looks same, so it seems to be normal.
  • Former Member
    Former Member over 9 years ago
    I just checked again...
    - with first start of the simulator (after new build), a .SET (upper case!) file is created in directory %Temp%\Garmin\Apps\SETTINGS (In my case in Windows its C:\Users\Ronny\AppData\Local\Temp\Garmin\Apps\SETTINGS).
    - after opening the settings editor, alls default settings are displayed with default values (from resouce) in correct order.
    - after sending settings to simulator, the .SET file is deleted.
    Then in most cases I can't see any file.
    In some cases (1 of 10 or 20 times) I see a .set file (lower case file suffix!) for just 1/4 second and then it is deleted.
    Is there something wrong with the file suffix? Must it be upper case?

    Can I provide further information for you to investigate if it's a bug? Or can I do some tests to check if it depends on the local environment?
    Is there a log I can check or a trace I can activate?

    This sounds like an issue with the simulator as the App Settings Editor never reaches as far as the %TEMP%\Garmin\Apps\Settings directory. I don't believe the case matters here but I'm not terribly familiar with how that portion of the simulator code works. I'm going to see if another developer on the team has a better idea of what might be happening. You could try closing the simulator, deleting the %TEMP%\Garmin\Apps folder and retrying everything. If the simulator is indeed in a bad state this should clear it out.

    We do appreciate the feedback/information.

    I meant the order of the data inside the SET file. In settings dialog alls is correct. If I open the SET file in editor (e.g. notepad++) I see the setting-descriptions in a other sorting tha defined in ressource file. But the first created file looks same, so it seems to be normal.

    This is to be expected.
  • Former Member
    Former Member over 9 years ago
    I think we're going to have to investigate this further internally. Can you send the project files to [email][email protected][/email] along with a link to this thread so we can make sure the files get attached to the correct Jira.
  • Hello Ken,

    Clearing the directory %TEMP%\Garmin\APPS didn't help.
    I just sent the project to the ConnectIQ email address.

    Thanks and Bye
    Ronny
  • I'm not sure that this will help or not, but I've tested this app a few times and was unable to reproduce the problem.
  • Hello Garmin,

    I didn't got a answer or email from Garmin after sending my project to the given mail address...

    The problem ist still present.
    I tried everything depending on firewall/defence/sandbox (Comodo Securíty). Nothing helped.
    The settings file ist every time created and then deleted (in a part of a second).

    Has someone anotheridea how to fix it?
    Is the Java-version relevant (latest update is installed)?

    The only thing that helpes is reducing the number of settings in resource file. But with less settings in resource the error appears sometimes.

    The only big change I could remember ist:
    - switching from HDD to SSD-drive
    - updating SDK and Java
    But I had stopped development for some weeks, so I can't remember all things...
    Should the SSD be the reason? Could that cause problems eith reading/writing the file from the simulator? I can't believe...

    Bye
    Ronny
  • Ronny,

    Do you have this problem with all projects you create? With the ObjectStore sample? What is the absolute path to your project file? Do you have spaces in the absolute path to this file?

    Travis
  • Hi Ronny,

    I have your email here--I'll take a look at it today and see if I can reproduce the issue.

    I don't believe the SSD is the issue. It almost sounds like there's something on your particular system that's removing the file (e.g. Comodo security software, etc.). Have your tried this on another computer to see if you encounter the same issue?
  • Hello,

    @Travis:
    I have problems with my own project (the one I sent to you).
    The path has no blank. It's short (I moved it again to check this): D:\Daten\ConnectIQ\DataField\HRZones
    I checked the ObjectStore Example. It worked. I also included my ressource elements (settings) there and it worked again. But it's a app and no datafield.

    @Brandon:
    Thank you for testing the project.
    I have deactivated all serurity programs (Comodo, Windows firewall) many times. No changes.
    Another computer I didn't test yet. I can check it next days.

    Cold there be a memory/space problem? In the ObjectStore App all worked fine. But it has 64kB memory.
    My datafield uses 14,2/16KB (with F3-simulator). And in this case it has loaded the settings. So if settings are updated, it should not go over 16KB. But the amount of setting seems to be a reason.
    If I comment some huge setting out then it works. Sometimes I get the error again but not so often. If I take the setting again into ressource file the error is back again. Sometimes the SET file is saved correctly (ans keeps present). But it' only in one of 20 or 30 times. That's confusing because I don't know what I can still check or change...
  • Hello,

    My datafield uses 14,2/16KB (with F3-simulator). And in this case it has loaded the settings. So if settings are updated, it should not go over 16KB. But the amount of setting seems to be a reason.
    If I comment some huge setting out then it works.


    One think to note is when you see the memory usage in the simulator, that's when things are idle. When it's actually executing, it will use more, and that would be the case when you are reading settings, etc.

    You can use System.Stats.usedMemory in the simulator to see what's being used in compute(), etc.