CZroe
Lifer
[EDIT]
I recently discovered this bug in MSPAINT.EXE (the 32-bit Windows Paint program).
Surprisingly, the bug appears to affect all 32-bit versions of MSPAINT.EXE, one of Microsoft's oldest 32-bit programs.
It has been confirmed to affect all versions of MSPAINT.EXE from Windows 95 to Windows XP Professional. I'm surprised that this type of bug (which causes 'data-loss') has gone unnoticed for so long.
-Reproducing the Error-
These steps are to set it up so that I know we are working with the same type of file, including details such as color-depth:
1. Right-Click on desktop and choose "New Bitmap Image"
2. This will create a blank 24-bit bitmap.
3. Open the image with MSPAINT.EXE.
(In recent versions of Windows, Right-Click the file and choose "Edit")
4. Scribble some lines on the image.
(you may want to make the image area smaller; editing a 24-bit bitmap on some machines is painfully slow)
5. Save the image.
6. Exit MSPAINT.
Now...
1. Open the bitmap with MSPAINT.
(In recent versions of Windows, Right-Click the file and choose "Edit")
2. Choose the selection tool.
(DO NOT CLICK ANYTHING ELSE)
3. Highlight a small areea of the image.
(DO NOT CLICK WITHIN THE SELECTED AREA YET)
4. Hold Shift THEN drag the selected area to 'smear' it.
(Make sure you are holding Shift BEFORE you press the mouse button)
5. Release the mouse button, THEN release Shift.
(Not really necessary, but a lousy mouse might move a pixel or two, which would mess it up)
6. Choose "Save" from the "File" menu.
7. Exit MSPAINT.
8. Open the file again with MSPAINT.
Notice that the contents have not changed.
Getting the bug to occur is not difficult, most of these restrictions are so that you don't accidentally mess it up. I actually have trouble making it NOT occur.
A common mistake when trying to reproduce it is to click inside a highlighted area without FIRST holding shift.
Even if the selected area doesn't move a single pixel, a regular 'click' is perceived as an 'edit' and the file will save properly, failing to reproduce the error.
Old message follows:
[/EDIT}
<< I had already posted this in FORUMS>OPERATING SYSTEMS before I realized that this category was more specific...
I recently encountered a serious logic error in one of Microsoft's oldest Windows programs.
Can anyone confirm this problem with MSPAINT on another Windows OS?
Open an existing bitmap image.
Highlight an area in the image using the selection tool (from the upper right).
Hold shift while dragging the selected area around on the image to wipe over everything.
Save the image.
Close MSPAINT.
Open the image again with MSPAINT.
The contents were never saved!
Make sure to not select any other tools while you are trying to duplicate the error.
The error will occur even if you "Save As" with a different filename.
MS programmers assume that because you have not resized the area, or used certain tools, that the image contents have not changed.
If the save option is avalible (and not grayed out), good programming practice dictates that it should go through the actual saving process.
How could this sloppy programming go unnoticed for so long?
Is it new to the Windows XP version of MSPAINT? >>
I recently discovered this bug in MSPAINT.EXE (the 32-bit Windows Paint program).
Surprisingly, the bug appears to affect all 32-bit versions of MSPAINT.EXE, one of Microsoft's oldest 32-bit programs.
It has been confirmed to affect all versions of MSPAINT.EXE from Windows 95 to Windows XP Professional. I'm surprised that this type of bug (which causes 'data-loss') has gone unnoticed for so long.
-Reproducing the Error-
These steps are to set it up so that I know we are working with the same type of file, including details such as color-depth:
1. Right-Click on desktop and choose "New Bitmap Image"
2. This will create a blank 24-bit bitmap.
3. Open the image with MSPAINT.EXE.
(In recent versions of Windows, Right-Click the file and choose "Edit")
4. Scribble some lines on the image.
(you may want to make the image area smaller; editing a 24-bit bitmap on some machines is painfully slow)
5. Save the image.
6. Exit MSPAINT.
Now...
1. Open the bitmap with MSPAINT.
(In recent versions of Windows, Right-Click the file and choose "Edit")
2. Choose the selection tool.
(DO NOT CLICK ANYTHING ELSE)
3. Highlight a small areea of the image.
(DO NOT CLICK WITHIN THE SELECTED AREA YET)
4. Hold Shift THEN drag the selected area to 'smear' it.
(Make sure you are holding Shift BEFORE you press the mouse button)
5. Release the mouse button, THEN release Shift.
(Not really necessary, but a lousy mouse might move a pixel or two, which would mess it up)
6. Choose "Save" from the "File" menu.
7. Exit MSPAINT.
8. Open the file again with MSPAINT.
Notice that the contents have not changed.
Getting the bug to occur is not difficult, most of these restrictions are so that you don't accidentally mess it up. I actually have trouble making it NOT occur.
A common mistake when trying to reproduce it is to click inside a highlighted area without FIRST holding shift.
Even if the selected area doesn't move a single pixel, a regular 'click' is perceived as an 'edit' and the file will save properly, failing to reproduce the error.
Old message follows:
[/EDIT}
<< I had already posted this in FORUMS>OPERATING SYSTEMS before I realized that this category was more specific...
I recently encountered a serious logic error in one of Microsoft's oldest Windows programs.
Can anyone confirm this problem with MSPAINT on another Windows OS?
Open an existing bitmap image.
Highlight an area in the image using the selection tool (from the upper right).
Hold shift while dragging the selected area around on the image to wipe over everything.
Save the image.
Close MSPAINT.
Open the image again with MSPAINT.
The contents were never saved!
Make sure to not select any other tools while you are trying to duplicate the error.
The error will occur even if you "Save As" with a different filename.
MS programmers assume that because you have not resized the area, or used certain tools, that the image contents have not changed.
If the save option is avalible (and not grayed out), good programming practice dictates that it should go through the actual saving process.
How could this sloppy programming go unnoticed for so long?
Is it new to the Windows XP version of MSPAINT? >>