Complete

Simulator not changing setting, but keeps new settings as tmp file in TEMP folder

I am facing following behavior in the sim, any idea what can be causing this please ?

1.) Watchface starts OK in sim-> set files is created using default values from properties (Memory reports 74kB Memory peak and 380 objects peaks)
2.) Modifying settings using Connect IQ - App Settings editor in Eclipse
3.) Clicking Send Settings
4.) After some time new settings processing finishes, NO changes are reflected on watchface (Simulator reports Peak Memory 82.6kB and 569 peak objects)

In the file system TEMP directory where sim is pointed i can see new file  "temp_appsettings<multiple_random_digits>.tmp" has been created on same level as GARMIN folder, but set file has not been replaced with new data.
In rare occurrence new set file is created but has 0bytes size. Working SET file has 3.98kB

  • I see this has been marked as complete. Is there any outcome you can share with me please ?

  • Hi guys, i would like to check whether you were able to get to some conclusion in this case.

  • Thank you looking into this Travis. I have sent source files and related behavior log together with steps sequence taken.

    I ve tried to put logging to various places and behavior changes based on how many getSystemStats and Sys.println logging i have in the code. There are two main scenarios (attached in email) background free memory either alternates and setting file is deleted/restored to default each even/odd step (this is with less logging) or background free memory remains high and set file is all the time deleted from the file system (this is with more logging). Main app available memory seems to be always same in various app points.

    Background reads data from Storage and saves response to the Storage in onBackgroundData. No saving to the Properties as far as i am aware anywhere in app, should be read only. Reading settings is performed each watchface refresh for most of them at the moment (current version has removed caching to save memory).
    I dont see onSettingsChanged called when background runs/finishes.

  • It sounds like you've been able to round this down to something that we might be able to reproduce. It sounds like the issue you are reporting is that when WeatherServiceDelegate.onTemporalEvent() is invoked you have less memory than expected, and this happens on every other temporal event.

    Have you tried putting the logging code in your AppBase.initialize() or AppBase.getServiceDelegate() methods (before the system allocates any memory on your behalf). Also, have you tried adding logging to AppBase.onSettingsChanged(). That shouldn't be getting called in this case, but it would be useful to know if it is.

    Are you sending settings data to the app between every run of the background event? It might be helpful if you provided some pseudo-instructions so that I don't waste a bunch of time trying to guess what you're doing. If you are willing to share source code to reproduce the problem, please send it to [email protected] and include a link to this post.

  • I am officially desperate. After many iterations of testing and code changes i made full circle. Every time background process triggers SET file is reset to default value. It happens on the simulator and real watch as well. If background is not triggered every settings change is stable. Based on simulator output (if correct) i am 28kB far from memory limit.  Test code does not have setValue used. Would someone, perhaps from Garmin, be willing to take a look and help to track it down please ? I am Ok to share all files.