(I know nasty things happen when you try to use quotes in subject) Anyway… this is my problem:
I of ten use MS-Paint for minor edits to graphics files. Today, using another program, I saved a file as BMP but instead of monochrome as intended I saved it as color, so instead of a bit over 1 MB it was over 30 MB. When I double clicked on it to open it with Paint, the computer hung up. Reset, boot etc and now something very strange happens:
If I click on the Paint program icon directly the computer hangs
If I click on a shortcut to the program, the computer hangs
If I type the program path in RUN, the computer hangs
BUT
If I click on a BMP file, Paint runs and opens it OK
If I make a shortcut with a BMP file as parameter, paint runs and opens it OK. (paint.exe file.bmp)
If I type the same thing in the RUN box, Paint runs OK too.
Some further info: I have removed and reinstalled MS-Paint using the Control panel. Still does it. I have several versions of MSPaint installed. They all do the same thing. In case some file was corrupted, I have copied them from my other computer, still no dice.
For now I am just launching the program by using a dummy BMP file but I am very curious as to what may cause this. How is it possible that the command line will hang if there is no file name as a parameter? And what can be corrupted? I just cannot think of anything. Anyone have any ideas? What is the process of launching a program?
I think my computer is suffering from PMS as it has also taken to rearranging the icons on the desktop which it likes to do from time to time but had not done in quite some time.
Not sure what’s going on, but I’d try cleaning out paint’s settings in the registry. Run regedit and go rename the “paint” key to “paint.old” or something. This is akin to throwing away the prefs file on a mac (but oh so much, uh, easier :-). Renaming it instead of deleting it allows you to put it back the way it was if it doesn’t solve the problem (or if it somehow causes more problems).
The key is:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Applets\Paint
on windows2000. It’s undoubtedly the same on win9x.
WAG 1:
If there is some way of cleaning out the paintbrush history file of the last few files executed in the registry (or wherever it’s kept) I think this might solve your problem.
If the big file that caused the crash is still in your system possibly renaming a small file to it’s name and renaming (or moving) the big file might help.
WAG 2:
Main paintbrush binaries are probably OK. Some intermediate driver in the startup sequence that is still trying to associate the large bmp (even if it no longer exists) might be corrupted due to the inital big file crash and causing the glitch. This sequence would possibly be bypassed if you executed the program as a function of the file being activated. You might want to go to system information applet and run the system file checker to see if it picks up any corrupted drivers resident on your system. Have a 98 install disk handy if it does detect some and needs to re-install a fresh driver from the CD .
I checked and the paint file history is located and editable in the registry. Using regedit just do a search on one of the last 4 files executed in paint and it should pop up.
Thanks all for your input. Let’s see… This computer where I have the problem is running WIN95 OSR2 so it does not have SFC. The registry entries are also different. I had already gone over them one by one and could not find anything strange. I cannot find any entry specific for the Paint Most Recently Used (MRU) list and I do not think this version has it. (Only the general, Windows MRU list). At any rate, I do not think the problem is with the Most Recently Used (MRU) list, mainly because that file has long been gone from that list because I have opened many files after that. Also, I cannot see why the MRU list would have anything to do with it. It is just a list of recently used files and has no effect until you try to open one. You can delete the original file and will not get an error until you try to access it. Note also that I did open the huge BMP file in my other computer so there was nothing wrong with it.
I figured uninstalling and reinstalling the program would clear any problem but it didn’t.
I think Astro’s second guess is probably closer. For some reason the launch sequence is slightly different when you start the program with or without parameters. How could I find out? Does anyone know some other command line parameter I can use with Paint?
The parameters that are used with a document launch are goverened by the File Type settings for that file type. Look in Explorer > View > Folder Options.
I can’t explain why running it directly from the EXE icon would be any different from typing the name of the EXE into the Run command line. That would indicate a reasonably serious problem with your Registry to me.
>> I can’t explain why running it directly from the EXE icon would be any different from typing the name of the EXE into the Run command line
KneadToKnow, that is not what happens. It does not matter how you launch the program: if it does not have an object file name parameter then it crashes, but if it has a BMP file parameter then it starts OK. I cannot think of any other parameter I could put there to test if the parameter has to be a file or can be any other switch.
KneadToKnow, no need to apologize for a simple misunderstanding and I do appreciate your taking time to read this and think about it.
I have discovered one further thing: Once I have the program running if I click FILE -> NEW it also hangs. So, I am looking at it from a slightly different angle now. It may be that the program starts OK but immediately tries to open a new file and that is where it hangs. Now, if I have reinstalled the program and all the files are good, why cannot it open a new file? What would be involved in this? Everything else (edit, save etc) seems to be working OK.
>> What an interesting problem
Yes, specially interesting to me since I am suffering it But I have to agree it is kind of unusual.
Maybe it doesn’t like something in the default image attributes, such as the image size. Try this: open Paint with some image, click on “image/attributes” and change the size of the current image and/or other things. Then try “file/new”. I suppose the default image attributes are also somewhere in the registry.
Many programs store information in INI or other files, rather than the register. I looked at any files in the Windows folder (or others) which had been recently modified. Paint appears in win.ini and others but finally I hit paydirt when I hid a file called Msimgsiz.dat . That must be the corrupted file because now Paint starts again with no problem. The lesson is that many programs, especially older ones, keep information in other files. Note that even though the program is elsewhere they often have a file in the Windows or System folders.