MEMORANDUM TO: Bruce Deffenbaugh FROM: Keith Corbett DATE: October 6, 1986 SUBJ: High Priority Iris Bugs COPY: Bill Campbell This is an update on the two outstanding, critical Vista/IRIS bugs that we know about. As we discussed today, I have no one in my group that can even minimally deal with any of the products that fill in this area: Vista, Iris, or the window system. We need support from Engineering on bug fixes and resolving problems. Two of the most pressing were discussed in my memo to you of 10/3, which read as follows: On 9/18 (two weeks ago) I spoke with Peter Wolf and Mike Grandfield about problems our Iris/Vista customers have experienced with the Iris functions READPIXELS and READRGB. The problems are affecting two customers, Rockwell Rocketdyne and Night Vision respectively, very seriously; both are unable to proceed with their projects until their problem is resolved. Attached is a summary from Debra Ellerin on the two problems. Both were reported to Engineering over three months ago. The READPIXELS problem is fixed in Release 3.0, but 3.0 has not yet been made available to 2.0 customers. Nor is Vista ready for release with 3.0 Lisp. Furthermore, in Release 3.0 the customer's example code causes performance of the entire system to degrade severely. Mike assured me on 9/19 that Peter Wolf would fix the READRGB bug immediately and provide a 2.0 patch for the customer. Since then I have been waiting for the fix. Last week, Mike said he was not sure whether Peter had completed the patch, but he would let me know. Can you let me know where we stand on these bugs, and when we can provide complete fixes to the customers? Wendy Rowe never gave me the status on READRBG as you requested. Ken DeHoff (Rockwell) has called in again to report that his problems have gotten worse; his application is now hanging often in :TYI within the function IRIS:END-PICK. Lee Atkinson (Night Vision) has called repeatedly for a status on the fix that he needs also. It seems that the entire device interface between Lambda and Iris needs to be looked into and checked thoroughly by Engineering. KMC Attachment ;;; -*- Mode:LISP; Package:USER; Base:10 -*- 1. READPIXELS problem and Ken DeHoff at Rockwell Rocketdyne. READPIXELS: is a function which can read x number of pixels from the given cursor position on the iris. Therefore to read the entire display screen of the iris, start in the upper-left corner, read that line, move to the next line, read that line,... etc. until the end of the screen. HISTORY: I first talked to Ken in June. At that time, he could read about 100 lines successfully, and then the transaction would hang, while Waiting For Iris Data. I sent him the iris upgrade in July which fixed a problem, but uncovered another. He could now read about 1.5 screenfuls but then he would run out of regions. I tried it in 3.0 and did not yet run out of regions, but it makes the whole system really slow, even after readpixels finished. It is not possible to read a couple screenful of data, and then continue to use the system effectively. SOLUTION?: (Is this because readpixels allocates a new array for each read - Maybe it should be a resource, which could be reused.) TODAY'S STATUS: I told Peter about the region problem, and he is going to look into it. Ken has a contract pending on this, and needs some definite information - like a date. CODE: Here is the code to duplicate the problem: ;;; this is the first attempt at reading pixels. ;;; better, but not tested (defun try-to-read-pixels () (do ((x 1 (1+ x))) ((= x 800)) (iris:cmov2i 0 x) (format terminal-io "num ~d~% " x) (multiple-value-bind (count array) (iris:readpixels 1000) (print count) (listarray array)))) (defun try-to-read-pixels () (do ((x 1 (1+ x) )) ((= x 800)) (cmov2i 0 x) (format terminal-io "num ~d~% " x) (readpixels 1023))) 2. READRGB problem and Lee Atkinson at Night Vision. READRGB: reads pixel values in RGB mode from up to 24 bitplanes. Returns the number of pixels read and RGB values in RED, GREEN, and BLUE arrays. HISTORY: Lee first reported this problem in June. I sent him the new IRIS upgrade, but it did not solve the problem. I looked at the problem with Peter Wolf in July, and we determined that the  and the IRIS were getting out-of-sync. The IRIS was writing x bits, and the  was reading x-1 or x+1. TODAY'S STATUS: I talked to Peter 9/17 and he told me that he hadn't had a chance to fix the problem, but that he had told Lee what function to change and how to do it, and that everything was fine. The next day Keith talked to Lee, and was told that everything was not fine, and that he (Lee) did not understand how to fix it. I talked to Peter after that, and he said, Lee had told him that he was able to read, but then he was running out of something... (sound familiar?) CODE: ;;; Here is the code to duplicate the READRGB problem. (defun foo (x) (xgreset) (rgbmode) (gconfig) (let ((count 0)) (cmov2i 0 0) (loop repeat 100 (print (incf count)) (readrgb x)))) To determine whether or not things or out-of-sync, use the functions (read-head) and (read-tail). From here down, is the relevant code from the iris directory: (def-iris-com READPIXELS (number-of-pixels) "Reads pixel values from the bitplanes. Returns the number of pixels read and an array of colors." (declare (values pixel-count color-array)) (command 143 :short-byte number-of-pixels :return :long-byte :short-byte-array)) (def-iris-com READRGB (number-of-pixels) "Reads pixel values in RGB mode from up to 24 bitplanes. Returns the number of pixels read and RGB values in RED, GREEN, and BLUE arrays." (declare (values pixel-count red green blue)) (command 144 :short-byte number-of-pixels :return :long-byte :byte-array :byte-array :byte-array)) ;;; used by READPIXELS (defun (:SHORT-BYTE-ARRAY RETURN-TYPE) () '(receive-short-byte-array)) ;;; Routine to receive an array of Shorts (16 bit elements) (defun RECEIVE-SHORT-BYTE-ARRAY () (let* ((number-of-shorts (receive-long-byte)) (number-of-longs (// (1+ number-of-shorts) 2)) (byte-array (make-array number-of-shorts))) (if (= (get-graphics-character) *r-escape*) (progn (dotimes (i number-of-longs) (let* ((byte1 (receive-6-bit)) (byte2 (dpb (receive-6-bit) (byte 6 6) byte1)) (byte3 (dpb (receive-6-bit) (byte 6 12) byte2)) (byte4 (dpb (receive-6-bit) (byte 6 18) byte3)) (byte5 (dpb (receive-6-bit) (byte 6 24) byte4)) (byte-final (dpb (receive-6-bit ) (byte 2 30) byte5))) (if (sync-p i) (progn (get-graphics-character) (send-graphics-character *sync-char*) (force-output-graphics-stream))) (cond ((OR (< i (1- number-of-longs)) (evenp number-of-shorts)) (aset (ldb (byte 16 16) byte-final) byte-array (* i 2)) (aset (ldb (byte 16 0) byte-final) byte-array (1+ (* i 2)))) ('ELSE (aset (ldb (byte 16 16) byte-final) byte-array (* i 2)))))) (get-graphics-character)) (format t "~%Receive-short-byte-array: error in array transport~%")) byte-array)) ;;; used by READRGB (defun (:BYTE-ARRAY RETURN-TYPE) () '(receive-byte-array)) ;;; the readrgb out-of-sync bug is in this function. (somewhere) (defun RECEIVE-BYTE-ARRAY () (let* ((number-of-bytes (receive-long-byte)) (number-of-longs (// (+ number-of-bytes 3) 4)) (number-left (ldb (byte 2 0) number-of-bytes)) (byte-array (make-array (+ number-left (* 4 number-of-longs))))) (if (= (get-graphics-character) *r-escape*) (progn (dotimes (i number-of-longs) (let* ((byte-1 (receive-6-bit)) (byte-2 (dpb (receive-6-bit) (byte 6 12) byte-1)) (byte-3 (dpb (receive-6-bit) (byte 6 18) byte-2)) (byte-4 (dpb (receive-6-bit) (byte 6 24) byte-3)) (byte-final (dpb (receive-6-bit) (byte 2 30) byte-4))) (if (sync-p i) (progn (get-graphics-character) (send-graphics-character *sync-char*) (force-output-graphics-stream))) (cond ((OR (< i (1- number-of-longs)) (zerop number-left)) (aset (ldb (byte 8 24) byte-final) byte-array (+ i (* i 3))) (aset (ldb (byte 8 16) byte-final) byte-array (+ i (* i 3) 1)) (aset (ldb (byte 8 8) byte-final) byte-array (+ i (* i 3) 2)) (aset (ldb (byte 8 0) byte-final) byte-array (+ i (* i 3) 3))) ((= number-left 3) (aset (ldb (byte 8 24) byte-final) byte-array (+ i (* i 3))) (aset (ldb (byte 8 16) byte-final) byte-array (+ i (* i 3) 1)) (aset (ldb (byte 8 8) byte-final) byte-array (+ i (* i 3) 2))) ((= number-left 2) (aset (ldb (byte 8 24) byte-final) byte-array (+ i (* i 3))) (aset (ldb (byte 8 16) byte-final) byte-array (+ i (* i 3) 1))) (T (aset (ldb (byte 8 24) byte-final) byte-array (+ i (* i 3))))))) (get-graphics-character)) (format t "~%Receive-byte-array: error in array transport~%")) byte-array)) (defmacro COMMAND (com &rest args) "Send a command and arguments to the IRIS. args is a list of type keywords and the arguments. Following :RETURN are type keywords of the returned values." (let ((*let-clauses* nil)) (let ((com-chars (command-chars com)) (sends (loop until (or (null args) (eq (car args) :return)) for type = (pop args) for f = (get type 'send-type) when (null f) do (ferror nil "Unknown argument type to COMMAND: ~S" type) for nargs = (length (arglist f)) appending (apply f (firstn nargs args)) do (setq args (nthcdr nargs args)))) (returns (loop for return-type in (cdr args) for fcn = (get return-type 'return-type) when (null fcn) do (ferror nil "Unknown return type to COMMAND: ~S" return-type) collect (funcall fcn)))) (flet ((will-be-fix (thing) (not (and (listp thing) (eq (car thing) 'quote))))) `;(with-lock (*command-lock*) (let (,@(nreverse *let-clauses*)) (,(if (and (every com-chars #'will-be-fix) (every sends #'will-be-fix)) (selectq (+ (length com-chars) (length sends)) (3 'send-3-bytes) (4 'send-4-bytes) (5 'send-5-bytes) (otherwise 'send-bytes)) 'send-stuff) ,@com-chars ,@sends) ,@(if returns `((multiple-value-prog1 (values ,@returns) (reccr))))) ;) ))))