[Openmcl-devel] Search Files Bug

Glen Foy lisp at clairvaux.org
Sat Oct 24 12:57:29 PDT 2009

The search files tool crashes consistently when used twice in a row.   
There was an obvious array reference error in #/updateResults: which  
the code below fixes.  The call to expand-all-results also  
occasionally caused an error (??), so I've commented it out.

I've submitted a ticket, but this fix may be useful until Clozure can  
take a look.

 From ccl/cocoa-ide/search-files.lisp

(objc:defMethod (#/updateResults: :void) ((wc search-files-window- 
   (let* ((old-results (gui::search-results wc)))
     (setf (gui::search-results wc) (gui::new-results wc))
     ;; release NSString instances.  sigh.
     (dotimes (idx (length old-results))
       (let* ((file (aref old-results idx))
              (lines (when file (gui::search-result-file-lines file))))
         (dotimes (idx (length lines))
           (let* ((line (aref lines idx))
                  (string (when line (gui::search-result-line-nsstr  
             (and string (#/release string))))
         (and (gui::search-result-file-nsstr file)
              (#/release (gui::search-result-file-nsstr file)))))
     (gui::set-results-string wc msg)
;    (when (or (auto-expandable-p (search-results wc))
;	      (expand-results-p wc))
;      (expand-all-results wc))
     (#/reloadData (gui::outline-view wc))
     (#/setEnabled: (gui::search-button wc) t)))
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.clozure.com/pipermail/openmcl-devel/attachments/20091024/ef6b60f7/attachment.htm>

More information about the Openmcl-devel mailing list