• Glad you found the problem! I guess maybe there was some logging to Storage inside your setScan handler?

    I just had a quick go at reproducing this and it seems I can actually do it pretty easily (even on desktop) with:

    const Storage = require('Storage');
    Storage.eraseAll();
    Storage.write('a', new Uint8Array(500)); //<--- this is what causes the problem
    Storage.write('code', 'function hello() { print("Hello1"); }');
    Storage.write('code', 'function hello() { print("Hello2"); }');
    Storage.write('code', 'function hello() { print("Hello"); }');
    eval(Storage.read('code'));
    trace(hello);
    hello();
    Storage.compact();
    hello();
    trace(hello);
    

    I have just committed a fix for this so there should be a build ready in the next few minutes.

    It may actually be that this is the cause of the vast majority of your issues (if code that was stored in flash is no longer being executed correctly)

  • I guess maybe there was some logging to Storage inside your setScan handler?

    I store the result of setScan in an array, but inside the http handler write the log. I log not only the errors but also the exceptions. I'm trying the fix, which is interesting! I attach the memory usage graph.

About

Avatar for Gordon @Gordon started