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

Raffael Cavallaro raffaelcavallaro at mac.com
Tue May 11 20:59:33 PDT 2004


On May 11, 2004, at 9:29 PM, Gary Byers wrote:

> How does it crash ?  Is there any output generated anywhere, does the
> beachball cursor appear and not got away, or does something else 
> happen ?

Sorry about the lack of specificity.

If run from the IDE, when I close an animating tiny-loop window, the 
IDE simply goes away - no "The Application OpenMCL has unexpectedly 
Quit. Would you like to file a report" dialog. The  Console log shows 
the following:

Unhandled exception 11 at 0x00010a14, context->regs at #xf02c7848
Read operation to unmapped address 0xf892f2fc
  In foreign code at address 0x00010a14
? for help
[592] OpenMCL kernel debugger:


If run from a terminal, when I close an animating tiny-loop window, I 
get the spinning beach ball, and the terminal output is similar:

? Unhandled exception 11 at 0x00010a14, context->regs at #xf03fa788
Read operation to unmapped address 0x0c54b710
  In foreign code at address 0x00010a14
? for help
[594] OpenMCL kernel debugger:

I could send all the code, but the only relevant parts are those I've 
changed in tiny.lisp:

(defvar max 9)
(defvar min 3)
(defvar step 2)
(defvar numsides min)

Note that numsides is a constant in the original tiny.lisp. Here it 
varies to animate different polygons.


and, inside tiny-setup, right before it returns w, the ns-window, I've 
added the following which changes numsides, and redraws the polygon 
window:

(labels ((draw-a-polygon (n)
                          (declare (optimize (speed 3) (safety 0) (space 
0) (compilation-speed 0)))
                          (setf numsides n)
                          (slet ((view-bounds (send my-view 'bounds)))
                                (send my-view :draw-rect view-bounds)
                                (send my-view :display-rect 
view-bounds)))
	      (loop-up ()
                          (declare (optimize (speed 3) (safety 0) (space 
0) (compilation-speed 0)))
                          (loop for i from min to max by step do
		               (draw-a-polygon i)))
	       (loop-down ()
                          (declare (optimize (speed 3) (safety 0) (space 
0) (compilation-speed 0)))
                          (loop for i from (- max step) downto (+ min 
step) by step do (draw-a-polygon i))))
	(loop do (loop-up) (loop-down)))


These are the only changes I've made. I get the same, consistently 
repeatable crash if I just:

(require 'tiny-loop)
(cll::tiny-setup)

and then close the Polygon Window (i.e., the drawing output window) 
while it is drawing/looping/animating the first time after launching 
OpenMCL, either from a terminal, or the IDE. later invocations and 
window closings will not reliably cause a crash - it must be 
immediately after starting OpenMCL. As I noted, entering a break first 
will prevent OpenMCL from crashing when I close the drawing window.

BTW, I didn't mean to suggest some sort of cargo cult notion that 
merely removing TINY-LOOP from *modules*  was having some bizarre 
effect. I was simply noting that doing so would force tiny-loop.lisp to 
be recompiled by the (require 'tiny-loop) form.

Raf


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


More information about the Openmcl-devel mailing list