Archive: Files fail to write?


Files fail to write?
This link explains the problem:
http://worldwind.arc.nasa.gov/forums...topic=1225&hl=

Question is.. is this a problem on the user end (IE out of hard drive space / not able to write?) Or could this be a corrupt file in the installer?

If anyone has any suggestions / fixes I'd be much obliged.


That error is shown if WriteFile fails. WriteFile should rarely fail. Is the file it fails for empty after it fails or does it contain some content? Can you please attach the NSIS script (can't get from CVS, SF is having problems at the moment)?


http://wiki.worldwindcentral.com/World_Wind_Eta_Full_b1

Hit edit to see the script formatted normally.

Feel free to make changes. Also be aware that changes will be made over the next few days, we are releasing a new version next week hopefully :)


Nothing special in the script. What about the file that fails to extract?


I think the problem is the number of files. The program installs > 4000 files.

I had thought maybe it simply tries to write them too fast.

The file itself is a .dds image file. There are ~ 3000 such files.


Do the files that failed extracting contain some content or are they empty?


Hmm.. some of the .wwp files might be empty. However the .dds files 'should' all be 128kb in size.

Is there a way I can catch the error and try again / recover?


I mean on the user's computer, after it fails. For example, if the error shows: "Extract: error writing to file 0024_0066.dds", is the file named 0024_0066.dds empty for the user who got this error or does it contain some data?


That I don't know. It has never happened to me or the devs :(

It looks like this is a 1 in a 1000 error. However we've released 600,000 copies :)


Would you be able to find any WriteFile calls in fileform.c, add GetLastError in their fail check code and print its return value? That should provide enough details to explain what happens here. Let me know if you can't and I'll create a special version with these changes on the weekend.


If you could create a special version of NSIS that does this it would be helpful. If you could make it so that the error was nice and pretty for users.. I could include this special installer with the next release.. and hopefully we can catch it.

Our release date for the next one is the 21st.. so we are in a big rush right now :)


http://stashbox.org/uploads/11086691...ct_err_dbg.zip

Built using the latest CVS version. See the change log for changes made since 2.05. A patch with the change made to add the logging is in the zip and is also attached.

Use DebugView while installing to see the error message.