Hi Michael,
Thanks for the patch. For some reason (possibly driver error) I wasn't able to apply
the patch using the patch tool. Anyway I applied it manually, and recompiled that file. I
got a few warnings about variables being bound but not referenced:
While compiling clearcase-view-mode:
** variable was-one-window bound but not referenced
[... etc]
I figured these warnings were not significant since they refer to functions that I
hadn't changed! (Bear in mind I am a lisp newbie :). None of the warnings referred to
the clearcase-path-native function, which was the one I had patched.
Unfortunately after recompiling the same symptom seems to be occuring. Here is a stack
trace.
Signaling: (wrong-type-argument stringp nil)
old-call-process-internal(nil nil #<buffer
"cleartoolexecution<2>"> nil "cd" "x:\\cirs\\")
apply(old-call-process-internal nil nil #<buffer
"cleartoolexecution<2>"> nil ("cd" "x:\\cirs\\"))
call-process-internal(nil nil #<buffer "cleartoolexecution<2>">
nil "cd" "x:\\cirs\\")
apply(call-process-internal nil nil #<buffer
"cleartoolexecution<2>"> nil ("cd" "x:\\cirs\\"))
call-process(nil nil #<buffer "cleartoolexecution<2>"> nil
"cd" "x:\\cirs\\")
apply(call-process nil nil #<buffer "cleartoolexecution<2>"> nil
("cd" "x:\\cirs\\"))
clearcase-ct-get-command-stdout(nil "cd" "x:\\cirs\\")
apply(clearcase-ct-get-command-stdout nil ("cd" "x:\\cirs\\"))
clearcase-ct-blocking-call("cd" "x:\\cirs\\")
clearcase-ct-cd("/cygdrive/x/cirs/")
clearcase-ct-do-cleartool-command("describe"
"/cygdrive/x/cirs/run_cruise.sh" unused)
clearcase-describe("/cygdrive/x/cirs/run_cruise.sh")
#<compiled-function nil "...(4)" [buffer-file-name clearcase-describe] 2
("/usr/local/lib/xemacs/xemacs-packages/lisp/clearcase/clearcase.elc" . 35490)
nil>()
call-interactively(clearcase-describe-current-buffer)
command-execute(clearcase-describe-current-buffer t)
execute-extended-command(nil)
call-interactively(execute-extended-command)
By the way I notice that cygwin path conversion is a highly troublesome process (in fact
probably the most difficult thing about running cygwin!), but it is performed multiple
times in various xemacs packages. For example your clearcase mode does it, but there is
also a fairly extensive (from what I have seen) set of cygwin path conversion functions
inside JDE, and possibly other packages as well. The JDE functions are particularly
noteworthy as they optionally remove the need to invoke the cygpath tool via shell
command; instead everything is done in lisp. I think that's right anwyay...
So my suggestion is to create a separate package for cygwin-only stuff, usable by
clearcase, JDE, and any other package that needs to do path conversion.
Any thoughts on this?
-----Original Message-----
From: Michael Diers [mailto:mdiers@elego.de]
Sent: Tuesday, February 25, 2003 11:42 AM
To: Rankine, Alastair J (Alastair)
Cc: xemacs-beta(a)xemacs.org; esler(a)rational.com
Subject: Re: XEmacs, clearcase mode problem
Alastair Rankine <arankine(a)avaya.com> writes:
> [Sending this to mdiers & xemacs-beta as advised by Adrian
Aichner in
> comp.emacs.xemacs posting]
Alastair,
thank you very much for the bug report.
> OK the problem is pretty easy to reproduce. Start up XEmacs
-vanilla,
> then M-x load-library clearcase. Open a file in a clearcase view,
> then M-x clearcase-describe-current-buffer. Error message is "Wrong
> argument type: stringp, nil".
[...]
Looks like this is reproducible with current Cygwin and XEmacs
21.4.12 w/ latest sumo packages on Windows NT 4.
There is a bogon in the way path conversion is done. Could you
please try again with the following patch:
--- xemacs-packages-2002-12-30/lisp/clearcase/clearcase.el
2002-06-14 08:23:13.000000000 +0200
+++ xemacs-packages/lisp/clearcase/clearcase.el 2003-02-25
14:26:32.000000000 +0100
@@ -4557,7 +4557,14 @@
(if (not clearcase-on-mswindows)
path
(if clearcase-on-cygwin32
- (substring (shell-command-to-string (concat "cygpath
-w -p " path)) 0 -1)
+ ;; FIXME something better. We may get called with a PATH
+ ;; argument which is the result of
+ ;; clearcase-fprop-canonicalise-path; in that case, we may
+ ;; already have a DOS-style PATH and must not call cygpath
+ ;; with the -p switch.
+ (if (equal ":" (substring path 1 2))
+ (substring (shell-command-to-string (concat
"cygpath -w " path)) 0 -1)
+ (substring (shell-command-to-string (concat
"cygpath -w -p " path)) 0 -1))
(subst-char-in-string ?/ ?\\ path))))
(defun clearcase-path-file-really-exists-p (filename)
> One more thing: I noticed that you can get XEmacs to lock hard by
> doing the following: M-x load-library clearcase, open file in a
> clearcase view, M-x clearcase-mode, Options >
Troubleshooting > Debug
> on Signal, then click on the Clearcase menu.
>
> This will yield the stack trace as above, but will also cause XEmacs
> to lock hard. In this state you can't even move the frame around, or
> even get a screenshot of the problem. It's process restart
> time.
Sorry, I cannot duplicate the freeze.
> Should I file a separate bug report for this?
No, this is fine. Thanks again.
--
Michael Diers mailto:mdiers@elego.de
Senior Developer
elego Software Solutions GmbH, Ohmstraße 9, 10179 Berlin, Germany
tel +49-30-2345-8696, fax +49-30-2345-8695
http://www.elego.de/