• Honestly I'm a bit stuck. I've tested here and it works fine.

    All I have from you is 'it's not working' - and I can't even see a reference to any code you've got that is using .read?

    If you did call .read with a bigger length than you have free RAM then yes, it'd likely fail with an out of memory error though...

    Please could you see if you can produce a single JS file that you can upload that'll cause the problem? Maybe start from this and see what you have to do to get it to break.

    f = require('Storage').open("foobar","w");
    f.write("Hell");
    f.write("o World\n");
    f.write("Hello\n");
    f.write("World 2\n");
    
    var f = require('Storage').open('foobar', 'r');
    var line = '';
    while (line !== undefined) {
      line = f.readLine();
      print(line);
    }
    

    Just a note about your code - there's no need to do all those checks in the while loop. Just a single !==undefined will work just fine

About

Avatar for Gordon @Gordon started