Path: utzoo!attcan!uunet!cs.utexas.edu!tut.cis.ohio-state.edu!ucbvax!hoptoad!tim From: tim@hoptoad.uucp (Tim Maroney) Newsgroups: comp.sys.mac.programmer Subject: Re: HELP! ID=01 on a Mac II Message-ID: <9073@hoptoad.uucp> Date: 24 Nov 89 20:16:32 GMT References: <1989Nov24.035604.27499@agate.berkeley.edu> Reply-To: tim@hoptoad.UUCP (Tim Maroney) Organization: Eclectic Software, San Francisco Lines: 47 In article <1989Nov24.035604.27499@agate.berkeley.edu> silverio@brahms.berkeley.edu (C J Silverio) writes: >I wrote a nifty program on my Plus. Used Think C v4, ANSI library, >very little Macish stuff at all. Runs just great. Never crashes. Runs >fine under Multifinder/6.0.4. Takes up maybe 60K of memory. Didn't try >heap scrambling yet. > >So I pop it on a Mac II and get an ID=01 in the same spot every time. >8 Megs, turned off all the inits, 6.0.3, turned off Multifinder, bomb >bomb bomb same spot. Right while plonking a PICT into a window during >the program start. The mac is all warmed up at this point -- all calls >to InitThis and InitThat are made. > >My pal says "dollars to doughnuts it's an alignment problem." OK, >cool, pretty easy to fix, right? Dollars to doughnuts it isn't. The Plus uses a 68000, which is very nervous about alignment. The Mac II uses a 68020, which is much more relaxed. The 68020 can cope with pointers on pretty much any alignment, though I understand there's a bit of extra overhead for using unaligned pointers (something about an internal exception handler having to fire). If it ran on the Mac II but not on the Plus, then it would probably be an alignment problem, but not the other way around. Try heap scramble. That may bring it to the top if it's an unlocked handle problem. That would be my best bet. Are you perhaps doing something like (*x)->y = NewHandle(z), with x unlocked? I have seen things like this consistently succeed on one model and fail on another due to the different memory configurations. >Natch, I don't have a MacII hanging around to debug on -- I'll just >have to borry one. Try heap scramble on your Plus first. Oh, one more thing. You didn't mention whether the Mac II was a color machine. Since this happens during graphics, if the machine is color, it would change my best bet to that. Some fields of a grafport are not the same on a color system. -- Tim Maroney, Mac Software Consultant, sun!hoptoad!tim, tim@toad.com FROM THE FOOL FILE: "The negro slaves of the South are the happiest, and, in some sense, the freest people in the world. The children and the aged and infirm work not at all, and yet have all the comforts and neccessaries of life provided for them." -- George Fitzhugh, CANNIBALS ALL! OR, SLAVES WITHOUT MASTERS, 1857