Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!claris!apple!lsr
From: lsr@Apple.COM (Larry Rosenstein)
Newsgroups: comp.sys.mac
Subject: Re: "Can't load needed resource."
Message-ID: <13105@apple.Apple.COM>
Date: 30 Jun 88 18:46:08 GMT
References: <2232@ur-tut.UUCP> <5555@pucc.Princeton.EDU>
Reply-To: lsr@apple.apple.com.UUCP (Larry Rosenstein)
Organization: Advanced Technology Group, Apple Computer
Lines: 41

In article <5555@pucc.Princeton.EDU> 6029334@pucc.Princeton.EDU writes:
>In article <2232@ur-tut.UUCP>, syap@ur-tut (James Fitzwilliam) writes:
> 
>>I recently downloaded the System Tools 6.0 release from GEnie.  There were
>(stuff deleted)
>>This disk will not boot.  The happy face appears, the startup screen says
>>"Welcome to Macintosh," then a dialog with a System icon appears saying
>>"Can't load needed resource" with a Restart button.  However, cmd-opt-
>>doubleclicking on the Finder works just fine.
> 
>You need the *new* boot blocks.  There are two easy ways to do this:

I don't think this is the problem.  According to Tech Note #134, a happy Mac
means that valid boot blocks were found.  If you get to "Welcome to
Macintosh", then the System file must have been opened, since that string
comes from there.

My guess would be that one of the patches could not be found.  Open the
System file and look at the PTCH and ptch resources.  There should be 5 PTCH
resources (-1, 0, 117, 376, and 630), and 4 ptch resources (0, 1, 2, 3).

If those are in place, then try adding a debugger and see where it crashes.
The error message is put up by the System Error Handler (the SysError trap).
Set a trap breakpoint on SysError.  Also, SysError saves the return address
in a global variable, so you can go back after the error and see what code
failed.

(To find the global variable, disassemble the SysError trap and look at the
code.  You have to do this without MultiFinder running, because MultiFinder
patches SysError.)

The only complication in this detective work is that if the crash is too
early, the keyboard driver might not be loaded, and you won't be able to use
a debugger.  If you were using Macsbug, however, it should be possible to
customize things to execute a few commands when entering the debugger, and
reveal what went wrong.

		 Larry Rosenstein,  Object Specialist
 Apple Computer, Inc.  20525 Mariani Ave, MS 27-AJ  Cupertino, CA 95014
	    AppleLink:Rosenstein1    domain:lsr@Apple.COM
		UUCP:{sun,voder,nsc,decwrl}!apple!lsr