[comp.sys.mac] Fatal HyperCard Bug

steele@unc.cs.unc.edu (Oliver Steele) (10/15/87)

How to break HyperCard:

1) Cut a bitmapped image from somewhere.
2) Put yourself in a situation where you have about 600K free in
   the application heap in the Finder.
3) Enter HyperCard 1.0.1.
4) Make sure you're at painting or above.
5) Paste.

HyperCard switches to marquee mode, puts up a dialog saying "There is not
enough memory to use the painting tools," removes the dialog, puts up a
dialog saying "There is not enough memory to use the painting tools,"
removes the dialog, ....

Someone at Apple: will this posting get turned into a bug report?  Will I
get one of those rainbow bugs if it does?

------------------------------------------------------------------------------
Oliver Steele				  ...!{decvax,ihnp4}!mcnc!unc!steele
							steele%unc@mcnc.org

Disclaimer:  Apple doesn't give away rainbow bugs.  Just testing the
rumor-mongering machinery.  Betcha John Dvorak writes about rainbow bugs
in January.

faulkner@scdpyr.UUCP (Bill Faulkner) (10/15/87)

In article <1632@unc.cs.unc.edu>, steele@unc.cs.unc.edu (Oliver Steele) writes:
> How to break HyperCard:
> 
> 1) Cut a bitmapped image from somewhere.
> 2) Put yourself in a situation where you have about 600K free in
>    the application heap in the Finder.
> 3) Enter HyperCard 1.0.1.
> 4) Make sure you're at painting or above.
> 5) Paste.

Funny, thing happened when I thought I would try this.  Hypercard performed
exactly how I expected.  This is what I did.

1. Start MacPaint and copy an bitmap image, then quit MacPaint
2. Started Hypercard 1.0.1
3. entered into the slideshow stack
4. created a new card   (didn't want to paste over the current card)
5. Pasted the picture
6. Pictured appeared on card perfectly.

This is on a Mac SE, with a 20 meg hard drive, running finder 5.5
Now I am not sure how to check that I had about 600K free in the
application heap, but I do know that Hypercard takes up a 780K
partion under Switcher, so maybe the previous poster did not have enough
memory and Hypercard was working OK.  Any other ideas?
-- 
Bill Faulkner * NCAR (Nat'l Center for Atmospheric Research)
PO Box 3000 * Boulder, CO  80307-3000 * 303-497-1259
UUCP:  faulkner@scdpyr.UUCP or  ..!hao!scdpyr!faulkner
INTERNET: faulkner@scdpyr.ucar.edu  ARPA: faulkner%ncar@csnet-relay.arpa

steele@unc.cs.unc.edu (Oliver Steele) (10/16/87)

faulkner@scdpyr.UUCP (Bill Faulkner) writes:
>In article <1632@unc.cs.unc.edu>, steele@unc.cs.unc.edu (Oliver Steele) writes:
>> How to break HyperCard:
>> 
>> 1) Cut a bitmapped image from somewhere.
>> 2) Put yourself in a situation where you have about 600K free in
>>    the application heap in the Finder.
>> 3) Enter HyperCard 1.0.1.
>> 4) Make sure you're at painting or above.
>> 5) Paste.
>
>Funny, thing happened when I thought I would try this.  Hypercard performed
>exactly how I expected.  This is what I did.

Mr. Faulkner then describes a set of steps in which he follows the above
except for step 2.

The bug has to do with how HyperCard recovers, or fails to recover, from a
situation in which it can't find enough memory to use painting tools but
is asked (indirectly, by means of a PICT paste) to do so anyway.  If
HyperCard *does* have enough memory to use painting tools, you're
obviously not going to see any problem.  You aren't going to see a failure
to recover from a memory shortage if there is no memory shortage.

>[...] so maybe the previous poster did not have enough
>memory and Hypercard was working OK.

Indeed I didn't have enough memory; that was why I listed step 2 as
necessary to reproduce the bug.  Hypercard was not working OK:  an
application shouldn't go into an infinite loop drawing and erasing a
dialogue box when there isn't enough memory.  It should just refuse to
perform, tell you that it can't perform, tell you why it can't perform,
and either exit to the Finder or close a document or let you pick up where
you left off.  This is particularly important with an application, such as
HyperCard, that requires a fair amount of memory; it shouldn't assume,
just because it's running on a machine with at least 1Meg of memory, that
that entire 1Meg is free for its personal use.

I'm sorry if I was unclear on this in my earlier posting.

------------------------------------------------------------------------------
Oliver Steele				  ...!{decvax,ihnp4}!mcnc!unc!steele
							steele%unc@mcnc.org

	"'As it were' means 'I think that I sound very erudite.'
	 'Per se' is Latin for 'as it were.'  As it were."