[WASTE-list] Copy/paste problem

Chinh Nguyen cnguyen at stata.com
Mon Nov 5 16:54:14 EST 2007


I sent a bug report about Select All and problems with the selection
not being cleared after you press the down arrow key. It turns out I
was still pointing to the 3.0.2 framework instead of the 3.1b2
framework which evidently fixes the problem.

However, I just noticed a problem with copy/paste. If I copy text
from say, Terminal.app, then paste it into my text editor using WASTE,
it pastes just fine. If I copy the text within my text editor and
then paste again, my app locks up and I get the following message:

StataSE(22746,0xa0133f60) malloc: *** mmap(size=1610612736) failed
(error code=12)
*** error: can't allocate region
*** set a breakpoint in malloc_error_break to debug

I can copy text from my text editor and paste it into TextEdit without
any problems. I ran an older executable that still used WASTE 3.0.2
and it doesn't have the problem. With 3.1b2, I'm not using the HIView
version of WASTE and I'm also handling kHICommandCopy and
kHICommandPaste myself. For kHICommandCopy, I only WECopy() and for
kHICommandPaste, I WEPaste(), WECalText(), update my status bar as to
the current line number, then return noErr. Even after I comment out
WECalText and my status bar updating routine so that I only WEPaste(),
I still lock up. Any suggestions?

PS. Is WECalText() still necessary after WEPaste()? I suspect that's
old WASTE 2 logic I'm using.

-Chinh Nguyen
cnguyen at stata.com



More information about the WASTE-list mailing list