I was just testing out the inspector, and was able to reliably cause it to blow up.
CL-USER(168): (clouseau:inspector *taems-model* :new-process t) #<MULTIPROCESSING:PROCESS Inspector Clouseau: #<TAEMS-MODEL @ #x72023142> @ #x72f7cd42>
...crashes with the followign error:
Error: Attempt to access the plist field of #<TAEMS-MODEL @ #x72023142> which is not a symbol. [condition type: SIMPLE-ERROR]
Restart actions (select using :continue): 0: Return to application command loop 1: Abort entirely from this process. [Current process: Inspector Clouseau: *TAEMS-MODEL*] [1] CL-USER(1):
CL-USER(169): (clouseau:inspector '*taems-model* :new-process t) #<MULTIPROCESSING:PROCESS Inspector Clouseau: *TAEMS-MODEL* @ #x728a4da2>
This works ok (presumably because it's a symbol it has a property list?), but when I click on the value cell of the *taems-model* variable, Clouseau blows up with the same error.
The proximate cause seems to be PRINT-DOCUMENTATION, which pulls the documentation and then tries to print it, as can be seen in this error:
CL-USER(171): (documentation *taems-model* t) Error: Attempt to access the plist field of #<TAEMS-MODEL @ #x72023142> which is not a symbol. [condition type: SIMPLE-ERROR]
Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart). 1: Abort entirely from this process.
Does this mean that ACL is not doing the Right Thing with the documentation function? Or is CLOUSEAU wrong to assume that everything will have documentation? Seems like documentation might not be defined on objects, if I read the CLHS correctly.
The following change to PRINT-DOCUMENTATION seems to fix my problem. Not sure how right it is, though.
(defun print-documentation (object pane) "Print OBJECT's documentation, if any, to PANE" (when (catch 'no-docs (handler-bind ((warning #'muffle-warning) (error #'(lambda (c) (declare (ignore c)) (throw 'no-docs nil)))) (documentation object t))) (with-heading-style (pane) (format pane "~&Documentation: ")) (princ (documentation object t) pane)))
On Apr 1, 2005 4:48 PM, rpgoldman@sift.info rpgoldman@sift.info wrote:
The proximate cause seems to be PRINT-DOCUMENTATION, which pulls the documentation and then tries to print it, as can be seen in this error:
CL-USER(171): (documentation *taems-model* t) Error: Attempt to access the plist field of #<TAEMS-MODEL @ #x72023142> which is not a symbol. [condition type: SIMPLE-ERROR]
Restart actions (select using :continue): 0: Return to Top Level (an "abort" restart). 1: Abort entirely from this process.
Does this mean that ACL is not doing the Right Thing with the documentation function? Or is CLOUSEAU wrong to assume that everything will have documentation? Seems like documentation might not be defined on objects, if I read the CLHS correctly.
I'd say that ACL does indeed have a problem with documentation. According to CLHS, "The generic function documentation returns the documentation string associated with the given object if it is available; otherwise it returns nil." On SBCL you also get a warning saying that the type of documentation you asked for is not supported. But throwing an exception seems wrong; CLHS says that DOCUMENTATION has no exceptional situations.
And, judging by the cryptic nature of the error, I'm almost certain that it's an ACL bug.
The following change to PRINT-DOCUMENTATION seems to fix my problem. Not sure how right it is, though.
(defun print-documentation (object pane) "Print OBJECT's documentation, if any, to PANE" (when (catch 'no-docs (handler-bind ((warning #'muffle-warning) (error #'(lambda (c) (declare (ignore c)) (throw 'no-docs nil)))) (documentation object t))) (with-heading-style (pane) (format pane "~&Documentation: ")) (princ (documentation object t) pane)))
That catch-throw trickery looks a little ugly, but the change shouldn't hurt anything on any other implementations, so I'll commit it. Thanks.
-Peter
On Apr 2, 2005 10:22 AM, Peter Scott sketerpot@gmail.com wrote:
That catch-throw trickery looks a little ugly, but the change shouldn't hurt anything on any other implementations, so I'll commit it. Thanks.
Scratch that; the catch-throw thing broke things over here, so I ripped it out and replaced it with a HANLER-CASE which I'm much happier about. And that uncovered some other bugs (thanks again) which I think I've got fixed. Tell me if you have any problems with the current CVS version of the inspector.
-Peter
"PS" == Peter Scott sketerpot@gmail.com writes:
PS> On Apr 1, 2005 4:48 PM, rpgoldman@sift.info rpgoldman@sift.info wrote: >> The proximate cause seems to be PRINT-DOCUMENTATION, which pulls the >> documentation and then tries to print it, as can be seen in this >> error: >> >> CL-USER(171): (documentation *taems-model* t) >> Error: Attempt to access the plist field of >> #<TAEMS-MODEL @ #x72023142> which is not a symbol. >> [condition type: SIMPLE-ERROR] >> >> Restart actions (select using :continue): >> 0: Return to Top Level (an "abort" restart). >> 1: Abort entirely from this process. >> >> Does this mean that ACL is not doing the Right Thing with the >> documentation function? Or is CLOUSEAU wrong to assume that >> everything will have documentation? Seems like documentation might not >> be defined on objects, if I read the CLHS correctly.
PS> I'd say that ACL does indeed have a problem with documentation. PS> According to CLHS, "The generic function documentation returns the PS> documentation string associated with the given object if it is PS> available; otherwise it returns nil." On SBCL you also get a warning PS> saying that the type of documentation you asked for is not supported. PS> But throwing an exception seems wrong; CLHS says that DOCUMENTATION PS> has no exceptional situations.
PS> And, judging by the cryptic nature of the error, I'm almost certain PS> that it's an ACL bug.
Note that I haven't tested this on ACL 7.0; this is ACL 6.2.
R