The Case Of The Unreadable File
Ray G. Miller
rgmiller at pacbell.net
Tue Feb 4 17:40:01 EST 2003
Greetings Puzzle Solvers,
This is a case of How-To-Backout-Gracefully.
I've a small MC project for a client that creates/reads semi-large
databases with images (specifically ".jpg" photos) stored on CDs. The
number of photos on any given CD range from 3500 to 5000. Each image
file is approximately 150Kb per; nothing really large.
Normally, the photos and the data associated with it are retrieved and
displayed within 35-50 ticks. (I have no control over creation or
quality of the photo CDs. The client does that on a fast WIN machine...
I'm on a Mac, G4, 9.2.2 MOS.)
The problem is that a few of the pix files are unreadable. I've tried
everything: PhotoShop 7.0, ClarisWorks, and Quicktime to prove that it
is not MC. Quicktime, after futzing for a couple of minutes, sez it
can't read it (error:-36.) MetaCard takes between 3000 and 12000 ticks
to give up.
The non-reading is in the following script:
-- set the pix path
put the ticks into theStart
set the fileName of image "thePix" to thePath #### where the non read occurs!
if the ticks - theStart > 300 then -- this is a bad record!
beep
# put the ticks - theStart
put "The picture:" & cr & "" & thePath & " " &\
"is unreadable and may be corrupted!" & cr & cr &\
"Delete this record?" into pmt
answer warning pmt with "Cancel" or "Delete"
if it = "Delete" then
deleteThisLine gCurrentPixRecordNum
end if
break --- ******* bad record!!!!!!
end if
As everyone knows, users get itchy if any operation lasts longer than 4
or 5 seconds. Is there a more elegant way of detecting bad file data or
getting out the operation without resetting the machine? The megabytes
MC uses during the read failure goes from a nominal 18-20 MB up to
60-80MB!
Any ideas would be greatly appreciated.
Ray
--
Ray G. Miller
-----------
Turtlelips Productions
4009 Everett Ave.
Oakland, CA 94602
MailTo:rgmiller at pacbell.net
(V) 510.530.1971
(F) 510.482.3491
More information about the metacard
mailing list