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

[no subject]



Subject:  formerly too many contacts, now destroy???



	Ok, after a good deal of tracking it down, I've found the
procedure that actually causes the server to crash.


=======================================
(defun clear-plan-display ()
  (when *debug* (format t "~%alt-clear-plan-display"))
  (with-slots (x y width height mouse-doc-window mouse-documentation)
	      (the scroll-window (get '*editor* 'plan-display-window))
;    (destroy (get '*editor* 'plan-display-window))

    (setf (get '*editor* 'plan-display-window)
	  (make-contact 'scroll-window :parent *editor* :name 'editor-plan-display-window
			:x x :y y :width width :height height :state nil
			:mouse-doc-window mouse-doc-window
			:mouse-documentation mouse-documentation)))
  (with-slots (x y width height mouse-doc-window mouse-documentation)
	      (the mirror-scroll-window (get '*editor* 'plan-mirror-window))
;    (destroy (get '*editor* 'plan-mirror-window))
    (setf(get '*editor* 'plan-mirror-window)
	  (make-contact 'mirror-scroll-window :parent *editor* :name 'editor-plan-mirror-window
			:x x :y y :width width :height height :zoom *zoom*
			:mirror-for (get '*editor* 'plan-display-window)
			:state nil
			:mouse-doc-window mouse-doc-window
			:mouse-documentation mouse-documentation)))
  (my-present (get '*editor* 'plan-display-window))
  (my-present (get '*editor* 'plan-mirror-window))
  (format t "~&exited clear-plan"))
  
==============

	As far as I can figure out, is that the destroy command is what
causes the server to crash in some way.  I've gone as far to comment
all code BUT the destroy commands, and it still crashes the server.
However, if you comment out the destroy commands, the program works
fine. 

	Unfortunately, I've tried to reproduce this in different
conditions by destroying windows in different conditions. But I
couldn't do it.   

	So, to deallocate the resoures, I did the following to fix
things, and it seems to work.  Could you tell me if this is good/bad
or why it happened?

=================
(defun clear-plan-display ()
  (let ((win1) (win2))
    (format t "~&Entered clear-plan-display, baby 4.0")
    (when *debug* (format t "~%alt-clear-plan-display"))
    (with-slots (x y width height mouse-doc-window mouse-documentation)
		(the scroll-window (get '*editor* 'plan-display-window))
		(setf win1 (get '*editor* 'plan-display-window))
		;;    (destroy (get '*editor* 'plan-display-window))
		(setf (get '*editor* 'plan-display-window)
		      (make-contact 'scroll-window :parent *editor* :name 'editor-plan-display-window
				    :x x :y y :width width :height height :state nil
				    :mouse-doc-window mouse-doc-window
				    :mouse-documentation mouse-documentation)))
    (with-slots (x y width height mouse-doc-window mouse-documentation)
		(the mirror-scroll-window (get '*editor* 'plan-mirror-window))
		(setf win2 (get '*editor* 'plan-mirror-window))
;;;    (destroy (get '*editor* 'plan-mirror-window))
		(setf(get '*editor* 'plan-mirror-window)
		     (make-contact 'mirror-scroll-window :parent *editor* :name 'editor-plan-mirror-window
				   :x x :y y :width width :height height :zoom *zoom*
				   :mirror-for (get '*editor* 'plan-display-window)
				   :state nil
				   :mouse-doc-window mouse-doc-window
				   :mouse-documentation mouse-documentation)))
    (my-present (get '*editor* 'plan-display-window))
    (my-present (get '*editor* 'plan-mirror-window))
    (destroy win1)
    (destroy win2)
    (format t "~&exited clear-plan"))
  )

===========


	I'll add that the original code worked with clue-1-13.  Has
destroyed changed in a way that would change this, is it the same in
clue 6.0?  We used the method of destroying a window and resetting it to a new
contact as a way to clear a window with many nodes so we could read in a new
plan.

	Thanx for your help

	Forrest

	NIST