[comp.sys.mac] MacWrite 4.5 BOMB

pgn@osupyr.UUCP (03/20/87)

Why? Why? Why?

Do this: install MacsBug or something equivalent. Run MacWrite 4.5. Hit the
interrupt switch. Then try to resume or go to the Finder. I can't. Can you?
Why?

OR

Do this: make a simple FKey doing nothing but ExitToShell. Use it on
MacWrite 4.5 (or Excel). BOMBBBBB!. Why?

So far I couldn't reproduce this on other programs.

Paul Nevai                                pgn%osupyr.uucp (PREFERRED) 
Department of Mathematics                 nevai-p@osu-eddie.uucp
The Ohio State University                 ...!ihnp4!cbatt!osupyr!pgn
231 West Eighteenth Avenue                TS1171@OHSTVMA.bitnet
Columbus, OH 43210, U.S.A.	          1-614-292-5688

dgold@apple.UUCP (03/23/87)

In article <121@osupyr.UUCP> pgn@.UUCP (Paul G. Nevai) writes:
>Do this: install MacsBug or something equivalent. Run MacWrite 4.5. Hit the
>interrupt switch. Then try to resume or go to the Finder. I can't. Can you?
>Do this: make a simple FKey doing nothing but ExitToShell. Use it on
>MacWrite 4.5 (or Excel). BOMBBBBB!. Why?
I've never had any problem entering Macsbug in either of these programs and
the continuing.  Perhaps you have a bad version of Macsbug.
As far as not being able to ExitToShell, it's possible that MacWrite patches
some traps (I know Excel does).  If they do not patch out ExitToShell in order
to clean up their patches if the program exits abnormally, then you will
return to the Finder with those patches installed.  Since they point into the
middle of the now-reinitialized application heap, the first time the Finder
calls one of those traps it will bomb.


-- 
David Goldsmith
Apple Computer, Inc.
MacApp Group

AppleLink: GOLDSMITH1
UUCP:  {nsc,dual,sun,voder,ucbvax!mtxinu}!apple!dgold
CSNET: dgold@apple.CSNET, dgold%apple@CSNET-RELAY
BIX: dgoldsmith

rs4u#@ANDREW.CMU.EDU.UUCP (03/23/87)

I haven't tried that with MacsBug, but when I was
writing my Transfer... desk accessory,
I found that MacWrite would crash miserably when I tried
to transfer out of it.

This probably has something to do with the way that MacWrite
screws around with the
trap vectors or interrupt vectors or whatever it
is that MacWrite screws around with....

		--Rich

Richard M. Seigel
Mail Stop  231
NASA/Langley Research Center
Hampton, Va. 23665
(804) 865-3036

pgn@osupyr.UUCP.UUCP (03/24/87)

My simple FKEY doing nothing but ExitToShell explodes on MacWrite, Word and
Excel. Do you think that they could all be guilty and I am innocent? Just
try that FKey, takes 5 minutes to write it on LSP.

Otherwise, much more complex FKeys work just fine on other programs.

Thanks for your comments.
Paul

Paul Nevai                                pgn%osupyr.uucp (PREFERRED) 
Department of Mathematics                 nevai-p@osu-eddie.uucp
The Ohio State University                 ...!ihnp4!cbatt!osupyr!pgn
231 West Eighteenth Avenue                TS1171@OHSTVMA.bitnet
Columbus, OH 43210, U.S.A.	          1-614-292-5688

dgold@apple.UUCP (03/31/87)

In article <8703232111.AA11200@osupyr.UUCP> pgn@osupyr.UUCP (Paul G. Nevai) writes:
>My simple FKEY doing nothing but ExitToShell explodes on MacWrite, Word and
>Excel. Do you think that they could all be guilty and I am innocent? Just
>try that FKey, takes 5 minutes to write it on LSP.
I believe all of these programs patch Mac ROM traps.  If you simply
ExitToShell, the program does not get a chance to clean up and the patches
are left in (there are more serious problems with MacWrite, as it will leave
all of its work files open).  Since the patches are still there, and point
at nonexistent application code (since you've left the application), anyone
who calls those traps (like the Finder) will jump off into garbage, with
predictable results.  In general, it is NOT SAFE to call ExitToShell behind
an application's back, and there is no guarantee that it will work.

Some applications which patch traps also patch ExitToShell, so that during
debugging, if a crash occurs, you can ExitToShell in Macsbug.  The ExitToShell
patch cleans up the other patches, then exits.
-- 
David Goldsmith
Apple Computer, Inc.
MacApp Group

AppleLink: GOLDSMITH1
UUCP:  {nsc,dual,sun,voder,ucbvax!mtxinu}!apple!dgold
CSNET: dgold@apple.CSNET, dgold%apple@CSNET-RELAY
BIX: dgoldsmith