[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: drawing to offscreen bitmap bombs



>From: nate@garnet.berkeley.edu (Nathaniel Titterton)
>Subject: Re: drawing to offscreen bitmap bombs
>To: bill@cambridge.apple.com (Bill St. Clair)
>Date: Wed, 8 Sep 1993 12:19:37 -0700 (PDT)
>Content-Type: text/plain; charset=US-ASCII
>Content-Transfer-Encoding: 7bit
>Content-Length: 882       
>
>>
>>At 10:52 AM 9/7/93 -0600, Tom McDougal wrote:
>>>Thanks to Mark, Bill, and Daniel for their assistance.  Is it ok to give
>>>WITH-PORT an uninitialized port?  If so (I tried it and it seemed to work),
>>>then Bill's code can be simplified somewhat:
>>>
>...
>
>I e-mailed you just a week or two ago about this same problem.
>
>Evaluating
>
>(dotimes (i 100000)
>  (rlet ((g :grafport))
>    (without-interrupts
>      (with-port g
>        (#_openport g)
>        (#_closeport g)
>      ))))
>
>eventually crashes my IIvx (MCL2.0p2).  I thought the problem was that
>an update event was being handled after the with-port but before the
>open-port initializes the clipping regions...  but the without-interrupts
>I dunno.
>
>This was a terrible bug for me to "solve", since it crashes seemingly 
>at random...  I used ccl::%temp-port% as argument to with-port, and the
>crashes seem to disappear.  

Hmm... Crashes for me as well on my Quadra 800, even if I move the
#_ClosePort call outside of the WITH-PORT to make it look like
Tom's code. It makes me feel unconfortable to see the #_ClosePort
call inside of the WITH-PORT, though it's probably safe. This works
for me:

(dotimes (i 100000)
  (rlet ((g :grafport))
    (without-interrupts
      (with-port ccl::%temp-port%
        (#_openport g))
      (#_closeport g)
      )))