[Openmcl-devel] Weird bug

Gary Byers gb at clozure.com
Tue Nov 6 06:20:49 UTC 2007


Recall that if you start the IDE by doing

? (require "COCOA")

(instead of double-clicking on the result of requiring "COCOA-APPLICATION")

you wind up in a pretty similar environment, with one difference being
that standard output and error streams stay connected (to the terminal/
shell buffer/SLIME "inferior lisp" buffer), which is another way of
increasing the likelyhood that they'll be seen.

In a lot of cases (like the one Ron reported earlier), the problem
hasn't (yet) taken down the whole event system, so it should be possible
to display any debugging output in some window inside the IDE.  (I think
that it'd make sense to log that output first, -then- try to display
it in a window ...)

It is sometimes useful to generate this kind of output as a debugging
aid; the ObjC runtime function "NSLog" is often helpful.  (If you look
at the IDE sources - files like cocoa-ide/cocoa-editor.lisp - you'll
see a lot of calls to #_NSLog, most of them hopefully prefaced with
#+debug).  I think that we'd like to ultimately be a lot more ambitious
about using the GUI to help diagnose errors that occur in the GUI, but
it might still be useful to have some way of seeing output generated
by things like #_NSLog from inside the IDE.

On Tue, 6 Nov 2007, Raffael Cavallaro wrote:

>
> On Nov 5, 2007, at 7:28 PM, Gary Byers wrote:
>
>> when the IDE is running as a standalone application,
>> the output side of that process's *terminal-io* is a sytem logging
>> device; under Leopard at least, that output goes (reliably) to
>> /var/log/system.log ; it can be viewed with Apple's "Console" program
>> (/Applications/Utilities/Console.app.)
>
> Ron,
> I've run into similar issues but I always run cocoa code with a
> console window open to see all the pretty messages I'm generating with
> my misuse of the objective-c runtime ;^)
>
> In all of the cases where I've landed in similar unresponsive IDE
> states I've always had a slew of console messages that I could track
> back to something I'd done that I shouldn't have.
>
> The good news is that when your code does work properly on the lisp
> side, and you see no console messages, you're probably not abusing the
> cocoa side either.
>
> regards,
>
> Ralph
>
> Raffael Cavallaro, Ph.D.
> raffaelcavallaro at mac.com
>
> _______________________________________________
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
> http://clozure.com/mailman/listinfo/openmcl-devel
>
>



More information about the Openmcl-devel mailing list