[WASTE-list] Copy/paste problem

Marco Piovanelli marco.piovanelli at pobox.com
Tue Nov 6 08:53:10 EST 2007


On Mon, 5 Nov 2007 15:54:14 -0600,
Chinh Nguyen (cnguyen at stata.com) wrote:



>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.


Good.


>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


1610612736 is hexadecimal 0x60000000. This smells like an endian
issue to me.

Is this happening on a Intel mac? Tiger or Leopard?
Can you reproduce this problem with the WASTE demo application?
When you copy the text from within your text editor, which flavors
end up on the pasteboard? (you can tell using PasteboardPeeker)


>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?


WECalText() is a no-op in WASTE 3.0, that's why commenting it out
has no effect. As for your handling of kHICommandCopy and kHICommandPaste,
you're doing essentially what HIWASTEView does.


>PS. Is WECalText() still necessary after WEPaste()?


No. It was actually never necessary unless you inhibited line
break recalculation.


-- marco

--
It's not the data universe only, it's human conversation.
They want to turn it into a one-way flow that they have entirely
monetized. I look at the collective human mind as a kind of
ecosystem. They want to clear cut it. They want to go into the
rainforest of human thought and mow the thing down.



More information about the WASTE-list mailing list