[Openmcl-devel] Re: [Bug-openmcl] NSViewHierarchyLock Assertion failure

Raffael Cavallaro raffaelcavallaro at mac.com
Tue May 11 09:28:17 PDT 2004


On May 11, 2004, at 6:55 AM, Gary Byers wrote:

> I can't reproduce this problem, but I'm willing to believe that it
> exists (and don't think that changing/reverting the method definition
> has too much to do with it.)

FWIW, I've been playing around with simple changes to tiny.lisp, 
renamed as tiny-loop.lisp, such that the drawing of polygons loops 
(animates), and I've found similar problems. In particular, closing the 
window while the animation is running will often, though not always, 
cause OpenMCL to crash. (On an unrelated side note, I've also seen some 
tearing in the drawing).

I've found that first entering a break loop before closing the drawing 
window prevents this crash.

Before loading modified code, I've also found that crashes can be 
prevented by first removing TINY-LOOP from cl-user::*modules* while in 
the break loop.

So, some practical suggestions:

1. Don't try to execute modified drawing code to an existing Cocoa 
drawing window. Enter a break loop, close the existing window, remove 
the module from cl-user::*modules*, then reload it with (require 
'whatever) if you've been using require, or just (load …) it, if you've 
been using load.

2. Don't try to close a drawing window while it's drawing - I assume I 
need some sort of window-closed method, either in Objective-C or MCL - 
no? Unfortunately, I don't know what level this needs to be at (should 
the loop check that the window is still open before trying to draw each 
time through?) At what level of granularity would I need to check - 
before drawing each line? Each polygon?

Of course these suggestions don't get at the real problem, but they do 
make learning the Cocoa bridge significantly easier.

BTW, I'm running MacOS X 10.3.3, and OpenMCL Version (Beta: Darwin) 
0.14.2, but all of the above has been true since early this year when I 
first started playing around with tiny.lisp.

Raf

Raffael Cavallaro, Ph.D.
raffaelcavallaro at mac.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: text/enriched
Size: 2011 bytes
Desc: not available
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20040511/30b0d571/attachment.bin>


More information about the Openmcl-devel mailing list