Path: utzoo!yunexus!ists!jarvis.csri.toronto.edu!rutgers!ucsd!tut.cis.ohio-state.edu!purdue!bu-cs!dartvax!eleazar.dartmouth.edu!ari From: ari@eleazar.dartmouth.edu (Ari Halberstadt) Newsgroups: comp.sys.mac.programmer Subject: Question about TECopy with Heap scramble/purge [possible bug?] Message-ID: <17072@dartvax.Dartmouth.EDU> Date: 17 Nov 89 22:14:56 GMT Article-I.D.: dartvax.17072 Sender: news@dartvax.Dartmouth.EDU Reply-To: ari@eleazar.dartmouth.edu (Ari Halberstadt) Organization: Dartmouth College, Hanover, NH Lines: 21 In more of my adventures with text edit, I seem to have run into a very odd bug, possibly in Apple's system software. Using TMON on a mac II with 4 megs of RAM, I turned heap check/scramble/purge on. My code seems to run perfectly, but when I call TECopy, random garbage is copied to the desk scrap. I'm using it on the new styled text edit on system 6.02, with THINK C 4.0. Using the debugger, I set a breakpoint just before TECopy, and then executed my program without scrambling the heap. When the program stopped, I turned the scrambling on, stepped over TECopy, and turned scrambling off. Thus, only during the call to TECopy was scrambling/purging turned on. Still, the bug persisted. I even tried locking the TEHandle before calling TECopy, but this also didn't fix the problem. The bug also exists when I build an application, thus eliminating the THINK C debugger from the possible corrupters of memory. So, if anyone has any ideas, I would truly appreciate hearing them. If a sollution is found, and it wasn't posted to the net, then I'll summarize and post it. -- Ari Halberstadt '91, "Long live succinct signatures" ari@eleazar.dartmouth.edu Disclaimer: "Live Free or Die"