A GIF Image Corrupts RVF Documents
Posted: Sun Jul 23, 2006 11:55 pm
Hi Sergey,
I ran into a rather serious problem. Here are the steps to reproduce.
1. Download the following animated GIF image from the Web: http://www.cyberisle.com/animate/animals/run-cat.gif
2. In your pre-compiled RVActionTest 1.9.8, create a new blank document and insert the above image into it (everything seems to be fine at this point: the image is nicely animated)
3. Save the document as Abc1.rvf or whatever (seemingly, no problems)
4. Open the just-saved Abc1.rvf - at this point, the image is all white, but you can still select it in the document
5. Save the already apparently half-corrupted document as Abc2.rvf (the document is saved but we also get the "Error saving file" message)
6. The Abc2.rvf file is completely corrupted.
I first caught this problem in the DB-aware version where I don't seem to be getting any notification of the above problem (nothing similar to the return value of SaveRVF()), so I can't even warn the user or attempt to prevent data loss. This is rather catastrophic since a user can completely lose his document just because he inserted a picture like the one above.
I tried the above GIF in a regular project with TGIFImage and TImage components and didn't see any problems. If the GIF is in some way corrupted or unusual, I don't know what may be wrong with it. TRichView should not corrupt documents even with completely corrupt images though.
I hope this can be fixed easily enough!
Thanks,
Michel
I ran into a rather serious problem. Here are the steps to reproduce.
1. Download the following animated GIF image from the Web: http://www.cyberisle.com/animate/animals/run-cat.gif
2. In your pre-compiled RVActionTest 1.9.8, create a new blank document and insert the above image into it (everything seems to be fine at this point: the image is nicely animated)
3. Save the document as Abc1.rvf or whatever (seemingly, no problems)
4. Open the just-saved Abc1.rvf - at this point, the image is all white, but you can still select it in the document
5. Save the already apparently half-corrupted document as Abc2.rvf (the document is saved but we also get the "Error saving file" message)
6. The Abc2.rvf file is completely corrupted.
I first caught this problem in the DB-aware version where I don't seem to be getting any notification of the above problem (nothing similar to the return value of SaveRVF()), so I can't even warn the user or attempt to prevent data loss. This is rather catastrophic since a user can completely lose his document just because he inserted a picture like the one above.
I tried the above GIF in a regular project with TGIFImage and TImage components and didn't see any problems. If the GIF is in some way corrupted or unusual, I don't know what may be wrong with it. TRichView should not corrupt documents even with completely corrupt images though.
I hope this can be fixed easily enough!
Thanks,
Michel