[comp.sys.mac.programmer] Bogus DeskTop Entries

bochner@zoom.harvard.edu (Harry Bochner) (03/13/90)

In article <13053@burdvax.PRC.Unisys.COM> dave@PRC.Unisys.COM
(David Lee Matuszek) writes:
   When we displayed the files "By Kind," the type of this file showed up
   as "document"; however, the TYPE of OTHER MacWrite documents showed up
   as "Beth's star distances".
   Rebuilding the desktop restored things to normal (I hope).  So now I
   have a possible explanation.

This behavior is reminiscent of a problem we've had on a Mac II that's
accessible to students. Every few months it gets into a state where
MacWrite Documents are described by the Finder as Kermit documents!  I
looked at the Desktop file's APPL resource with ResEdit, and found
that while the correct entry for MACA (MacWrite's creator signiture)
was still there, there was another entry earlier in the list that said
the signiture MACA belonged to Kermit. There were also several more
incorrect entries where the name of the application was garbled:
TeachText has been affected several times. Since the machine is open
to students, there's no telling what they've been runnning, and so
I haven't tried to track down the corruption of the Desktop file,
but could it be related to the bug that Andy Peterman reports below?

In article <1511@gvgpvd.GVG.TEK.COM> andyp@gvgpvd.GVG.TEK.COM
(Andy Peterman) writes:
>He said that under System 6.0.4, there was a bug in the file manager
>that would do strange things (like corrupting or destroying files) if
>there was a file with an apostrophe in it.  I then went back to MPW 3.0
>and System 6.0.3 (paranoia!!) and have since had no problems.   
>	Andy Peterman

We do have files whose names have an apostrophe ("Eradicate'm" comes to
mind :-), but we don't have 6.0.4 yet: I think we're running 6.0.3.
Has anyone else seen a symptom like this?
--
Harry Bochner
bochner@endor.harvard.edu

ags@seaman.cc.purdue.edu (Dave Seaman) (03/13/90)

In article <13053@burdvax.PRC.Unisys.COM> dave@PRC.Unisys.COM
(David Lee Matuszek) writes:
>   When we displayed the files "By Kind," the type of this file showed up
>   as "document"; however, the TYPE of OTHER MacWrite documents showed up
>   as "Beth's star distances".
>   Rebuilding the desktop restored things to normal (I hope).  So now I
>   have a possible explanation.

>In article <1511@gvgpvd.GVG.TEK.COM> andyp@gvgpvd.GVG.TEK.COM
>(Andy Peterman) writes:
>>He said that under System 6.0.4, there was a bug in the file manager
>>that would do strange things (like corrupting or destroying files) if
>>there was a file with an apostrophe in it.  I then went back to MPW 3.0
>>and System 6.0.3 (paranoia!!) and have since had no problems.   
>>	Andy Peterman

I have seen this twice on my Mac II running 6.0.3:  once with a MacWrite
document and once with a HyperCard stack.  In each case, I was able to fix the
problem by opening the file with the appropriate application, writing out to a
different file, and then deleting the original.  The application saw nothing
wrong with the file.

--
Dave Seaman	  					
ags@seaman.cc.purdue.edu

dave@PRC.Unisys.COM (David Lee Matuszek) (03/16/90)

In article <13053@burdvax.PRC.Unisys.COM> dave@PRC.Unisys.COM  I wrote:

>   When we displayed the files "By Kind," the type of this file showed up
>   as "document"; however, the TYPE of OTHER MacWrite documents showed up
>   as "Beth's star distances".
>   Rebuilding the desktop restored things to normal (I hope).  So now I
>   have a possible explanation.

In article <BOCHNER.90Mar12174007@zoom.harvard.edu> bochner@zoom.harvard.edu
(Harry Bochner) writes:

>This behavior is reminiscent of a problem we've had on a Mac II that's
>accessible to students. Every few months it gets into a state where
>MacWrite Documents are described by the Finder as Kermit documents!

Brian Bechtel at Apple responded to me (in part):

> System 6.0 started being more rigorous about bundle bits, and people who 
> had bundle bits inadvertently set on documents see the sort of behavior 
> you described.  It has nothing to do with the file name having an 
> apostrophe.

It was in fact the case that the bundle bit on "Beth's star distances"
was incorrectly turned on.  So in all probability this is the correct
explanation.  There is no particular reason to suspect the apostrophe
since, as far as I know, there is nothing special about this character
(as there is for, say, colons).

Rebuilding the desktop effected a symptomatic cure, but left the
bundle bit set.  I used BundAid to reset this bit (and the bundle bits
on a few other stray files)--BundAid is specifically designed to seek
out and correct bundle bit problems.  ResEdit, DiskTop, and a few
other programs can be used to correct the error in individual cases.

So the real problem becomes one of figuring out which applications are
occasionally screwing up the bundle bits.  One possible suspect is
MacWrite 4.5, which we use fairly heavily, it being the last of the
reasonably priced (free) upgrades to the original MacWrite.  Probably
several applications are at fault.

Bundle bits have always caused occasional problems, and apparently
System 6.0.4 is less robust in the face of bundle bit errors than
earlier systems were.

BTW, BundAid is available on sumex-aim and at better BBS everywhere.

-- Dave Matuszek (dave@prc.unisys.com)
-- Unisys Corp. / Paoli Research Center / PO Box 517 / Paoli PA  19301
-- Any resemblance between my opinions and those of my employer is improbable.
-- Dave Matuszek (dave@prc.unisys.com)
-- Unisys Corp. / Paoli Research Center / PO Box 517 / Paoli PA  19301
-- Any resemblance between my opinions and those of my employer is improbable.
  << Those who fail to learn from Unix are doomed to repeat it. >>