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

Parents
  • After other set of test, problem starts as soon as i will add following code to register for temporal event.
    if (Toybox.System has :ServiceDelegate) {
        	Toybox.Background.registerForTemporalEvent(new Time.Duration( 5 * 60));
    }
    Till i add it all works as a charm. Background starts to run, but no settings are processed anymore. Therefore I though it may be due to the code which is inside of the background therefore i stripped it to following:
    (:background)
    class WeatherServiceDelegate extends Sys.ServiceDelegate {
    	
    	function initialize() {
    		Sys.ServiceDelegate.initialize();
    	}
    	
    	
        function onTemporalEvent() {
        	Sys.println("Entering onTemporalEvent");
        	var systemStats = System.getSystemStats();
        	var output = "d";
        	Sys.println("Memory (total/used/free):" + systemStats.totalMemory + "/"+ systemStats.usedMemory + "/" + systemStats.freeMemory);
        	Sys.println("Exiting onTemporalEvent");
    		Background.exit(output);		
    	}
    Background runs fine, problem still persist. As soon as i will comment out registerForTemporalEvent, all works again. Any idea ?
Comment
  • After other set of test, problem starts as soon as i will add following code to register for temporal event.
    if (Toybox.System has :ServiceDelegate) {
        	Toybox.Background.registerForTemporalEvent(new Time.Duration( 5 * 60));
    }
    Till i add it all works as a charm. Background starts to run, but no settings are processed anymore. Therefore I though it may be due to the code which is inside of the background therefore i stripped it to following:
    (:background)
    class WeatherServiceDelegate extends Sys.ServiceDelegate {
    	
    	function initialize() {
    		Sys.ServiceDelegate.initialize();
    	}
    	
    	
        function onTemporalEvent() {
        	Sys.println("Entering onTemporalEvent");
        	var systemStats = System.getSystemStats();
        	var output = "d";
        	Sys.println("Memory (total/used/free):" + systemStats.totalMemory + "/"+ systemStats.usedMemory + "/" + systemStats.freeMemory);
        	Sys.println("Exiting onTemporalEvent");
    		Background.exit(output);		
    	}
    Background runs fine, problem still persist. As soon as i will comment out registerForTemporalEvent, all works again. Any idea ?
Children
No Data