• Ok, I'm just running this code (writing to multiple files, 100 times a second) on an MDBT42Q with firmware 2v09 and we'll see if it breaks:

    function log(){"ram"
      var f = "log"+Math.floor(Math.random()*8)+".txt"­;
       if (require("Storage").read(f) == "undefined") {
        require("Storage").write(f,'1');
      }else{
        var n=parseInt(require("Storage").read(f))+1­;
        n=n.toString();
        require("Storage").write(f,n);
      }
    }
    
    require("Storage").write("A","Hello World");
    setInterval(log, 10);
    require("Storage").write("B","Yet another bit of data for us to store");
    setInterval('print(require("Storage").ge­tFree(), require("Storage").list())', 2000);
    

    However it did get me thinking - are you using a watchdog timer? While we should kick the watchdog often enough, I guess if you used a small timeout then it's possible that the device would reboot itself during the compaction phase.

About

Avatar for Gordon @Gordon started