Jump to content




Out of Space error


  • You cannot reply to this topic
12 replies to this topic

#1 TYKUHN2

  • Members
  • 210 posts
  • LocationSomewhere in this dimension... I think.

Posted 09 August 2015 - 06:01 PM

I believe I am filling the write buffer using fs.writeLine(). However this would suggest doing an occasional flush would fix it, and yes it does if I use flush() sleep(1) but for some reason it errors if I limit the buffer to anything bigger than 1. So my question is:

What is the buffer size. It seems kinda small.

local downloaded = http.get("http://www.ccds.bugs3.com/"..filename..".html")
local downfile = fs.open("disk/files/"..filename, "w")
local nxtline = downloaded.readLine()
repeat

downfile.writeLine(nxtline)
count = count + 1
if count == 15 then //Errors after 1 pass if anything but 20 it appears
  downfile.flush()
  count = 0
end
nxtline = downloaded.readLine()

until nxtline == "<!-- www.serversfree.com Analytics Code -->"
downfile.close()

Edited by TYKUHN2, 09 August 2015 - 06:17 PM.


#2 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 09 August 2015 - 06:09 PM

Whats the exact error it gives you?

And is this the full code?
If not would you post the rest?

#3 TYKUHN2

  • Members
  • 210 posts
  • LocationSomewhere in this dimension... I think.

Posted 09 August 2015 - 06:17 PM

The exact error is "installer:197: Out of Space"
197 is downfile.writeLine(nxtline)

Also this is not all of the code. The program was recently downsized significantly to 275 lines. Further more it is downloading another full size file of 696 lines. Posting that would mean a lot of reading. The only related code I removed was an error checker incase a download failed, a version set to finish the download, the declaration of the function and variable
function download(filename)
local count = 0

Alright ignore the fact it only passes once unless on 20, it is incorrect. Turns out it hates lines 32 and 41 I believe. 32 is a single end. 41 is a mostly empty space. Point is ignore the fact I said it only passes once.

Edited by TYKUHN2, 09 August 2015 - 06:14 PM.


#4 SquidDev

    Frickin' laser beams | Resident Necromancer

  • Members
  • 1,427 posts
  • LocationDoes anyone put something serious here?

Posted 09 August 2015 - 06:17 PM

From memory the only time you should get an Out of Space error is when saving to a file and the drive is full. It looks like your saving to a disk, and they have smaller storage capacity than computers.

If you look in your config there is an I:floppySpaceLimit option. If you add a couple of zeros on the end then you should have plenty of space. (Adding zeros on the end is the solution to anything :)).

Edited by SquidDev, 09 August 2015 - 06:18 PM.


#5 TYKUHN2

  • Members
  • 210 posts
  • LocationSomewhere in this dimension... I think.

Posted 09 August 2015 - 06:21 PM

Seems incorrect because it is writing a variable number of lines. But for debug sakes I will run a quick test.

Result: fs.getFreeSpace("disk") prints out 286 every single time it runs. Seems problematic. Also note it seems to write a maximum of 40 lines before erroring. It must have more space?

Edit: I forgot to mention if I remove the custom buffer of 15 lines I think I put in the code posted here and replace it with a flush by itself it won't error at all.

Edited by TYKUHN2, 09 August 2015 - 06:23 PM.


#6 TYKUHN2

  • Members
  • 210 posts
  • LocationSomewhere in this dimension... I think.

Posted 09 August 2015 - 06:29 PM

I would just do a flush everytime I read a line but people would yell at me that I am writting too often to disk.
Also I cannot just write the whole thing. I use a free web host who appends code to the end of the html request. It would crash the program.
I would also give you guys the full URL (including filename) but I have known issues with the host not working for everyone.

Edited by TYKUHN2, 09 August 2015 - 06:30 PM.


#7 TYKUHN2

  • Members
  • 210 posts
  • LocationSomewhere in this dimension... I think.

Posted 09 August 2015 - 06:54 PM

I checked the config file because I can. I should have say 122 KB? I am using 7 for the installer and the file I downloaded is at maximum 1kb (I forget the minimum size ComputerCraft assumes it is) so I am not filling the disk up. That would be insane. Even the 696 file isn't that big.

#8 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 09 August 2015 - 07:36 PM

If the problem persists, delete a file and see if it happens again.

#9 TYKUHN2

  • Members
  • 210 posts
  • LocationSomewhere in this dimension... I think.

Posted 09 August 2015 - 07:58 PM

There are 2 files. The downloader/file writer and the file being written to. It is overwritten everytime it writes.

#10 HPWebcamAble

  • Members
  • 933 posts
  • LocationWeb Development

Posted 09 August 2015 - 08:03 PM

Maybe just for fun, copy and paste your CC config onto pastebin, and put a link here, so we can see it.

#11 TYKUHN2

  • Members
  • 210 posts
  • LocationSomewhere in this dimension... I think.

Posted 09 August 2015 - 08:11 PM

I'm wondering what the chances of a glitch are.

http://pastebin.com/0x3pdBPp

#12 flaghacker

  • Members
  • 655 posts

Posted 09 August 2015 - 08:47 PM

Those values are off by a lot, you seem to have missed this part

Quote

in bytes

Your computer space is currently ~1Mb and your disk space is ~0.1Mb. You should add a couple of 0's at the end to fix it. If you're usure about the exact numbers you need, you can do a google search like this:
10 megabytes in bytes
and it will tell you the exact numbers you need.

#13 TYKUHN2

  • Members
  • 210 posts
  • LocationSomewhere in this dimension... I think.

Posted 09 August 2015 - 08:56 PM

That would suggest I have 100 KB. Again my files are no larger than 8 KBs in size together

Edited by TYKUHN2, 09 August 2015 - 08:59 PM.






3 user(s) are reading this topic

0 members, 3 guests, 0 anonymous users