Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » constant "Disk Write Error"

This thread is locked; no one can reply to it. rss feed Print
constant "Disk Write Error"
23yrold3yrold
Member #1,134
March 2001
avatar

I tried unzipping something with PowerArchiver earlier; doing so made the screen turn black for a minute and then I got a blue screen that said:
quote:
Disk Write Error
Unable to write to disk in drive C:
Data or files may be lost
Press any key to continue

Pushed the space bar and had a permanent black screen; I had to restart. Thinking it might have been a fluke, I tried again. Same result. Now I've tried zipping something to put on my site, but now I get the write error without the black screen; pushing any key brings me back no sweat. File opens and closes and everything, I just keep getting the error anyway. Now unzipping the file gives me a folder I can't access and starting IE just now caused the write error to come up 3 times in a row. Having no experience with viruses, I assume this is what I have. Whether it is or not, any suggestions how I can fix it?

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Bob
Free Market Evangelist
September 2000
avatar

It might just be file system corruption. Give "scandisk" a try (although that usually makes the problem worse). Norton's Disk Doctor can also help, but it's not free :(

I also suggest you get an anti-virus - or at least a demo version of one so you can scan your computer.

--
- Bob
[ -- All my signature links are 404 -- ]

23yrold3yrold
Member #1,134
March 2001
avatar

What's good anti-virus software? ALl I've ever heard of is Norton's and McAfee, and I've heard people bash both.

And if scandisk makes the problem worse, why would I want to try it? ???

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Matthew Leverton
Supreme Loser
January 1999
avatar

I doubt you have a virus, unless you opened up an e-mail attachment.

I'd recommending making a complete back up - especially of your documents, etc. Then run a scandisk on Windows. I personally have never had problems with scandisk, but I've never had a hard drive start to go bonkers like yours. After scanning, I'd then try a virus program. I prefer McAfee over Norton, primarily because Norton seems to install a bunch of useless programs that monitor stuff that doesn't need to be, etc. I'm sure you could 'customize' either one to fit your needs.

Bottom line is - get your important files backed up before it's too late. (Don't forget your e-mail, if that's something you save...)

23yrold3yrold
Member #1,134
March 2001
avatar

Quote:

Scandisk encountered a data error while writing to the root directory.

This error prevents Scandisk from fixing this drive.

So much for that.

I've already decided to back up my files; I'll do that tonight. Past that, I guess I could take it in for repairs; it's still under warranty. BTW, how do I back up my mail? I remember losing it way back when I needed to reinstall Windows.

[ February 04, 2002: Message edited by: 23yrold3yrold ]

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Matthew Leverton
Supreme Loser
January 1999
avatar

Well, if you use Outlook Express, just do a search for "*.dbx" on your hard drive. Make sure you can see your hidden folders.

Depending on your OS, it would be in something like \Documents and Settings\UserProfile\Local Settings\Application Data\Identities\{GUID}\Microsoft\Outlook Express .

All you have to do is copy those .dbx files to disk. (You'll have one .dbx file per OE folder.) To "re-import" them when you reload Windows (or whatever), you simply recreate your folder structure in OE, and then close out of it, and overwrite the .dbx files with your old ones.

I have found this much more reliable then exporting / importing, and it's very simple to do.

Any other mailer should have export/import or something similar.

Matthew Leverton
Supreme Loser
January 1999
avatar

I should add, depending on where you got your PC.....

You may want to do all the backup and restore yourself. Many times 'service' people (especially from local shops) just wipe out, replace the hardware, and reload. They don't do any real tests, etc.

So the best plan could be to simply back up your files, ask for a new hard drive (demonstrate the error), and reload it yourself.

If the computer place actually does good work and its free, then ignore the warning and let them do everything. :)

nicholle
Member #1,024
February 2001
avatar

Also - if you use outlook express, instead of searching for those files, do this:

Go to "tools" (in OE) and click on the "maintenance" tab - select 'store folder" copy the address - then go to "start" and "run" and paste the address -

matthew was right about the storage place - this is just to save you time

23yrold3yrold
Member #1,134
March 2001
avatar

I seem unable to even back my stuff up >:( My CD burner ain't burnin'. I'm not sure wheter this is because of "bad" files in certian folders, or because the hard drive just doesn't feel like opening anything (I;m scared to open too much; I'm afraid I'll aggravate the problem).

I'd just like to say this sucks. :( And I hear Future Shop (where i got it) isn't terribly competent, so I'll hope hard for quality work ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Matthew Leverton
Supreme Loser
January 1999
avatar

I like my setup at home with a network. I store all my important stuff (email, source code, etc) on a 'file' server and just keep that backed up. So if my main PC crashes (or I get the itch to reload), I don't have to worry about anything.

If the file server crashes, then I at least have a nightly backup I can use.

23yrold3yrold
Member #1,134
March 2001
avatar

Well, I'm signing off. Taking it in tonight; hopefully we'll be back up and running in a few days. I had just figured out how to open a .bmp file using my own code too, and it was soooooo cool 8-) I feel 1337 :D

Ta ta.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Matthew Leverton
Supreme Loser
January 1999
avatar

Hmmm... I wonder if your code is what is causing the problem on your pc. :o :D

23yrold3yrold
Member #1,134
March 2001
avatar

Already thought of that. I wasn't really doing any writing (only reading), and posting it to comp.lang.c++ for help didn't generate any comments along the lines of "What are you doing?!?! You'll screw up your hard drive!!!". It was pretty basic.
Here; it's short so I'll post it (just to be safe). Very rough and incomplete, but mostly working.code:#include <fstream>
#include <iostream>
#include <allegro.h>

int main()
{
// variables
ifstream ifile;
int temp = 0,
width = 0,
height = 0;
char r, g, b;

// set up Allegro
allegro_init();
install_keyboard();
set_color_depth(16);
set_gfx_mode(GFX_AUTODETECT, 640, 480, 0, 0);

// open, extract and display the bitmap
ifile.open("test.bmp", ios::in | ios::binary);
ifile.seekg(18); // move to the width and height
ifile.read(&width, 4);
ifile.read(&height, 4);
ifile.seekg(54); // move to the width and height

BITMAP* bitmap = create_bitmap(width, height);
clear(bitmap);

for(int y = height - 1 ; y >= 0 ; y--)
for(int x = width - 1 ; x >= 0 ; x--)
{
if(ifile.eof()) break;
ifile.read(&b, 1);
ifile.read(&g, 1);
ifile.read(&r, 1);
putpixel(bitmap, x, y, makecol16(r, g, b));
}

ifile.close();

draw_sprite(screen, bitmap, 0, 0);

// wait for a keypress
readkey();

// go back to text mode and display bitmap stats
set_gfx_mode(GFX_TEXT, 0, 0, 0, 0);

ifile.open("test.bmp", ios::in | ios::binary);

// extract the BITMAPFILEHEADER
ifile.read(&temp, 2); cout << "File ID: " << temp << endl;
ifile.read(&temp, 4); cout << "Size of file: " << temp << endl;
ifile.read(&temp, 4); cout << "Reserved values: " << temp << endl;
ifile.read(&temp, 4); cout << "Offset of data: " << temp << endl << endl;

// extract the BITMAPINFOHEADER
ifile.read(&temp, 4); cout << "Size of Info Header: " << temp << endl;
ifile.read(&temp, 4); cout << "Bitmap Width: " << width << endl;
ifile.read(&temp, 4); cout << "Bitmap Height: " << height << endl;
ifile.read(&temp, 2); cout << "Bitmap Planes: " << temp << endl;
ifile.read(&temp, 2); cout << "Bits Per Pixel: " << temp << endl;
ifile.read(&temp, 4); cout << "Compression: " << temp << endl;
ifile.read(&temp, 4); cout << "Bitmap Data Size: " << temp << endl;
ifile.read(&temp, 4); cout << "H Pixels Per Meter: " << temp << endl;
ifile.read(&temp, 4); cout << "V Pixels Per Meter: " << temp << endl;
ifile.read(&temp, 4); cout << "Colors: " << temp << endl;
ifile.read(&temp, 4); cout << "Important Colors: " << temp << endl;

ifile.close();

destroy_bitmap(bitmap);

return 0;
}
So did I do a Very Bad Thing? Looks harmless enough to me ...
PS: I know I said I was signing off; I'm leaving soon

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

23yrold3yrold
Member #1,134
March 2001
avatar

Guess I did OK since no one answered. Cool; my old crap computer still works!! :o Hope the new one gets fixed soon; this is a piece of junk.

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

23yrold3yrold
Member #1,134
March 2001
avatar

Back up and running !!
But with a blank hard drive
Ah well, gotta spend the day reinstalling ...

--
Software Development == Church Development
Step 1. Build it.
Step 2. Pray.

Go to: