I'm the guilty party for setting, persistently and unintentionally so,  those optimization settings<div>from within easygui views.lisp. Apologies to all concerned. I thought the compiler treated these</div><div>declarations as affecting the subsequent contents of the source file in which they appeared</div><div> (modulo later declarations in the same overriding them), rather than causing the form to be</div><div>given effect when loading the fasl; must I put it within (eval-when (:compile-toplevel) ...)?</div><div><br></div><div>I think that file gets loaded as part of (require 'cocoa-application), not as part of the</div><div>startup of the ide-containing image.</div><div><br></div><div>Arthur<br><br>----- Original Message -----<br>From: Gary Byers <gb@clozure.com><br>Date: Tuesday, June 9, 2009 2:31 pm<br>Subject: Re: [Openmcl-devel] ns:ns-tracking-area not present in 32bit CCL<br>To: Ron Garret <ron@awun.net><br>Cc: openmcl-devel Devel <openmcl-devel@clozure.com><br><br>> The code that sets the optimization settings (persistently and <br>> probablynot intentionally so) is in <br>> ccl/examples/cocoa/easygui/views.lisp.  For<br>> reasons that I don't pretend to understand, that file is loaded <br>> everytimethat the standalone IDE starts up, but isn't loaded or <br>> referenced when<br>> one just does (require "COCOA").<br>> <br>> That's my best guess; if it's not correct and it was more important<br>> that I can imagine it to be to determine what other difference in<br>> environment led to to different behavior, then I suppose that - armed<br>> with knowledge of what all of those differences are - one could come<br>> up with a more accurate explanation.<br>> <br>> I don't know.  To be honest, I don't really care; it seems <br>> like the<br>> time spent puzzling over this could be better spent trying to <br>> fix the bug.<br>> <br>> On Tue, 9 Jun 2009, Ron Garret wrote:<br>> <br>> > Why is Rainer seeing this bug now and not me?  At this <br>> point we're running <br>> > the same code on the same CCL version on the same OS X version.<br>> ><br>> > rg<br>> ><br>> > On Jun 9, 2009, at 4:32 AM, Gary Byers wrote:<br>> ><br>> >> The bug's somewhat tersesly described in:<br>> >> <br>> >> <http://trac.clozure.com/openmcl/ticket/516><br>> >> <br>> >> It's still open, though the code in the trunk version of the IDE<br>> >> that was exposing/triggering the problem has been changed.<br>> >> <br>> >> That code can cause the IDE to start up with<br>> >> <br>> >> ;;;; see CLtL2; DECLARATION-INFORMATION didn't make it into <br>> ANSI CL<br>> >> ? (ccl:declaration-information 'optimize nil)<br>> >> ((SPEED 0) (SAFETY 3) (COMPILATION-SPEED 0) (SPACE 0) (DEBUG 3))<br>> >> <br>> >> This combination of OPTIMIZE settings causes some rarely-executed<br>> >> code to be executed, and the real bug is in that code.<br>> >> (Of course, this should just have the effect of making the <br>> code as<br>> >> slow, bloated, and stupid as possible, but it incidentally exposes<br>> >> a bug.)<br>> >> <br>> >> Untile the real bug is if fixed, you can work around the <br>> problem by doing:<br>> >> <br>> >> ? (declaim (optimize (speed 1) (space 1) (safety 1) (debug 1) <br>> >> (compilation-speed 1)))<br>> >> <br>> >> on startup.<br>> >> <br>> >> <br>> >> <br>> >> <br>> >> On Tue, 9 Jun 2009, Rainer Joswig wrote:<br>> >> <br>> >>> Same error in  Clozure Common Lisp Version 1.3-<br>> r12235M  (DarwinX8664).<br>> >>> <br>> >>> Mac OS X 10.5.7 on 64bit Intel...<br>> >>> <br>> >>> <br>> >>> *** Error in event process: unknown arg spec :REGISTERS<br>> >>> <br>> >>> (442BE8) : 0 (FUNCALL #'#<(:INTERNAL |-[StandardView <br>> drawRect:]|)>>>> #<SIMPLE-ERROR #x3000421B439D>) 85<br>> >>> (#:G2965)<br>> >>>  #:G2965: #<SIMPLE-ERROR #x3000421B439D><br>> >>> <br>> >>> #:COMPILER-VAR: (NIL)<br>> >>> #:G2962: #<A Foreign Pointer #x7FFF5FBFD360><br>> >>> <br>> >>> (442C10) : 1 (SIGNAL #<SIMPLE-ERROR #x3000421B439D>) 981<br>> >>> (CONDITION &REST CCL::ARGS)<br>> >>>  CONDITION: #<SIMPLE-ERROR #x3000421B439D><br>> >>>  CCL::ARGS: NIL<br>> >>> <br>> >>> CCL::%HANDLERS%: ((ERROR) (ERROR))<br>> >>> CCL::TAG: #<SIMPLE-ERROR #x3000421B439D><br>> >>> CCL::HANDLERS: CCL::*BACKTRACE-CONTEXTS*<br>> >>> CCL::FN: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL |-[StandardView<br>> >>> drawRect:]|) #x493DBF><br>> >>> <br>> >>> (442C68) : 2 (%ERROR #<SIMPLE-ERROR #x3000421B439D> <br>> (:REGISTERS)>>> 558482) 117<br>> >>> (CONDITION CCL::ARGS CCL::ERROR-POINTER)<br>> >>>  CONDITION: #<SIMPLE-ERROR #x3000421B439D><br>> >>>  CCL::ARGS: (:REGISTERS)<br>> >>>  CCL::ERROR-POINTER: 558482<br>> >>> <br>> >>> ...<br>> >>> <br>> >>> Regards,<br>> >>> <br>> >>> Rainer Joswig<br>> >>> <br>> >>> <br>> >>> <br>> >>> Am 09.06.2009 um 07:02 schrieb Ron Garret:<br>> >>> <br>> >>>> Try updating.  The 1.3 branch is currently at verison <br>> r12153M.  It<br>> >>>> works for me on that version.<br>> >>>> <br>> >>>> rg<br>> >>>> <br>> >>>> On Jun 8, 2009, at 9:35 PM, Rainer Joswig wrote:<br>> >>>> <br>> >>>>> <br>> >>>>> <br>> >>>>> using Clozure Common Lisp Version 1.3-r12088M  <br>> (DarwinX8664)>>>>> <br>> >>>>> <br>> >>>>> On executing the add-subview example form in draggable.lisp<br>> >>>>> <br>> >>>>> I get:<br>> >>>>> <br>> >>>>> *** Error in event process: unknown arg spec :REGISTERS<br>> >>>>> <br>> >>>>> (442BE8) : 0 (FUNCALL #'#<(:INTERNAL |-[StandardView <br>> drawRect:]|)>>>>>> #<SIMPLE-ERROR #x3000420F8DBD>) 85<br>> >>>>> (#:G5085)<br>> >>>>> #:G5085: #<SIMPLE-ERROR #x3000420F8DBD><br>> >>>>> <br>> >>>>> #:COMPILER-VAR: (NIL)<br>> >>>>> #:G5082: #<A Foreign Pointer #x7FFF5FBFD360><br>> >>>>> <br>> >>>>> (442C10) : 1 (SIGNAL #<SIMPLE-ERROR #x3000420F8DBD>) 981<br>> >>>>> (CONDITION &REST CCL::ARGS)<br>> >>>>> CONDITION: #<SIMPLE-ERROR #x3000420F8DBD><br>> >>>>> CCL::ARGS: NIL<br>> >>>>> <br>> >>>>> CCL::%HANDLERS%: ((ERROR) (ERROR))<br>> >>>>> CCL::TAG: #<SIMPLE-ERROR #x3000420F8DBD><br>> >>>>> CCL::HANDLERS: CCL::*BACKTRACE-CONTEXTS*<br>> >>>>> CCL::FN: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL |-<br>> [StandardView>>>>> drawRect:]|) #x493DBF><br>> >>>>> <br>> >>>>> (442C68) : 2 (%ERROR #<SIMPLE-ERROR #x3000420F8DBD> <br>> (:REGISTERS)>>>>> 558482) 117<br>> >>>>> (CONDITION CCL::ARGS CCL::ERROR-POINTER)<br>> >>>>> CONDITION: #<SIMPLE-ERROR #x3000420F8DBD><br>> >>>>> CCL::ARGS: (:REGISTERS)<br>> >>>>> CCL::ERROR-POINTER: 558482<br>> >>>>> <br>> >>>>> <br>> >>>>> <br>> >>>>> (442C90) : 3 (%FF-CALL 140735390423728 :REGISTERS #<NS-OBJECT<br>> >>>>> <NSCFType: 0x170192c0> (#x170192C0)> :ADDRESS #<NS-<br>> CONSTANT-STRING<br>> >>>>> "Lisp Rules!" (#x137CD2F0)> :ADDRESS #<A Foreign Pointer<br>> >>>>> #x7FFF82F59600> :ADDRESS #<NS-MUTABLE-DICTIONARY {<br>> >>>>> NSFont = "TimesNewRomanPS-ItalicMT 48.00 pt. P [] (0x13799150)<br>> >>>>> fobj=0x170178c0, spc=12.00";<br>> >>>>> } (#x17019E50)> :VOID) 701<br>> >>>>> (CCL::ENTRY &REST CCL::SPECS-AND-VALS)<br>> >>>>> CCL::ENTRY: 140735390423728<br>> >>>>> CCL::SPECS-AND-VALS: (:REGISTERS #<NS-OBJECT <NSCFType:<br>> >>>>> 0x170192c0> (#x170192C0)> :ADDRESS #<NS-CONSTANT-STRING "Lisp<br>> >>>>> Rules!" (#x137CD2F0)> :ADDRESS ...)<br>> >>>>> <br>> >>>>> CCL::LEN: 9<br>> >>>>> CCL::TOTAL-WORDS: 0<br>> >>>>> CCL::RESULT-SPEC: :VOID<br>> >>>>> CCL::NARGS: 4<br>> >>>>> CCL::N-FP-ARGS: 0<br>> >>>>> CCL::I: 0<br>> >>>>> CCL::SPECS: (:REGISTERS #<NS-OBJECT <NSCFType: 0x170192c0><br>> >>>>> (#x170192C0)> :ADDRESS #<NS-CONSTANT-STRING "Lisp<br>> >>>>> Rules!" (#x137CD2F0)> :ADDRESS ...)<br>> >>>>> CCL::SPEC: :REGISTERS<br>> >>>>> <br>> >>>>> (442CF8) : 4 (FUNCALL #'#<Anonymous Function <br>> #x300041D9AB4F> #<NS-<br>> >>>>> CONSTANT-STRING "Lisp Rules!" (#x137CD2F0)> #S(CCL::OBJC-<br>> >>>>> SELECTOR :NAME "sizeWithAttributes:" :%SEL #<A Foreign <br>> Pointer>>>>> #x7FFF82F59600>) #<NS-MUTABLE-DICTIONARY {<br>> >>>>> NSFont = "TimesNewRomanPS-ItalicMT 48.00 pt. P [] (0x13799150)<br>> >>>>> fobj=0x170178c0, spc=12.00";<br>> >>>>> } (#x17019E50)>) 805<br>> >>>>> (#:G3751 #:G3752 CCL::ARG0)<br>> >>>>> #:G3751: #<NS-CONSTANT-STRING "Lisp Rules!" (#x137CD2F0)><br>> >>>>> #:G3752: #S(CCL::OBJC-SELECTOR :NAME "sizeWithAttributes:" :%SEL<br>> >>>>> #<A Foreign Pointer #x7FFF82F59600>)<br>> >>>>> CCL::ARG0: #<NS-MUTABLE-DICTIONARY {<br>> >>>>> NSFont = "TimesNewRomanPS-ItalicMT 48.00 pt. P [] (0x13799150)<br>> >>>>> fobj=0x170178c0, spc=12.00";<br>> >>>>> } (#x17019E50)><br>> >>>>> <br>> >>>>> #:G3753: #<NS-SIZE 0 X 0 #x3000420F8EDD> [gcable] <br>> (#x17029190)>>>>> #:G3756: #<A Foreign Pointer #x17029190><br>> >>>>> #:G3755: #<NS-OBJECT <NSCFType: 0x170192c0> (#x170192C0)><br>> >>>>> <br>> >>>>> (442D38) : 5 (FUNCALL #'#<(:INTERNAL CCL::SEND-<br>> UNAMBIGUOUS-MESSAGE<br>> >>>>> (SHARED-INITIALIZE :AFTER (CCL::OBJC-DISPATCH-FUNCTION <br>> T)))> #<NS-<br>> >>>>> CONSTANT-STRING "Lisp Rules!" (#x137CD2F0)> #<NS-<br>> MUTABLE-DICTIONARY {<br>> >>>>> NSFont = "TimesNewRomanPS-ItalicMT 48.00 pt. P [] (0x13799150)<br>> >>>>> fobj=0x170178c0, spc=12.00";<br>> >>>>> } (#x17019E50)>) 501<br>> >>>>> (CCL::RECEIVER &REST CCL::ARGS)<br>> >>>>> CCL::RECEIVER: #<NS-CONSTANT-STRING "Lisp Rules!" <br>> (#x137CD2F0)>>>>>> CCL::ARGS: (#<NS-MUTABLE-DICTIONARY {<br>> >>>>> NSFont = "TimesNewRomanPS-ItalicMT 48.00 pt. P [] (0x13799150)<br>> >>>>> fobj=0x170178c0, spc=12.00";<br>> >>>>> } (#x17019E50)>)<br>> >>>>> <br>> >>>>> CCL::SELECTOR: #S(CCL::OBJC-SELECTOR :NAME <br>> "sizeWithAttributes:" :<br>> >>>>> %SEL #<A Foreign Pointer #x7FFF82F59600>)<br>> >>>>> FUNCTION: #<Anonymous Function #x300041D9AB4F><br>> >>>>> <br>> >>>>> (442D78) : 6 (FUNCALL #'#<#<STANDARD-METHOD VIEW-<br>> DRAW-CONTENTS<br>> >>>>> (TEXT-VIEW)>> #<TESTVIEW #x30004201D12D> #<NS-RECT <br>> 100 X 100 @ 0,0<br>> >>>>> (#x7FFF5FBFD370) #x3000420F928D>) 229<br>> >>>>> (V &OPTIONAL RECT)<br>> >>>>> V: #<TESTVIEW #x30004201D12D><br>> >>>>> RECT: #<NS-RECT 100 X 100 @ 0,0 (#x7FFF5FBFD370) <br>> #x3000420F928D>>>>>> <br>> >>>>> <br>> >>>>> <br>> >>>>> (442DA0) : 7 (FUNCALL #'#<|-[StandardView drawRect:]|><br>> >>>>> 17591849974380) 981<br>> >>>>> (#:G5081)<br>> >>>>> #:G5081: 17591849974380<br>> >>>>> <br>> >>>>> #:G5088: #<A Foreign Pointer #x7FFF5FBFD360><br>> >>>>> #:G5082: #<A Foreign Pointer #x7FFF5FBFD360><br>> >>>>> #:COMPILER-VAR: (NIL)<br>> >>>>> #:G5087: #<COMPILED-LEXICAL-CLOSURE (:INTERNAL |-<br>> [StandardView>>>>> drawRect:]|) #x493DBF><br>> >>>>> #:G5089: (CONDITION #<COMPILED-LEXICAL-CLOSURE # #x493DBF>)<br>> >>>>> CCL::%HANDLERS%: ((CONDITION #) (ERROR))<br>> >>>>> SELF: #<STANDARD-VIEW <StandardView: 0x170221c0> <br>> (#x170221C0)>>>>>> _CMD: #<A Foreign Pointer #x7FFF83013F38><br>> >>>>> RECT: #<NS-RECT 100 X 100 @ 0,0 (#x7FFF5FBFD370) <br>> #x3000420F928D>>>>>> <br>> >>>>> (442E48) : 8 (%PASCAL-FUNCTIONS% 277 17591849974380) 397<br>> >>>>> (CCL::INDEX CCL::ARGS-PTR-FIXNUM)<br>> >>>>> CCL::INDEX: 277<br>> >>>>> CCL::ARGS-PTR-FIXNUM: 17591849974380<br>> >>>>> <br>> >>>>> CCL::LISP-FUNCTION: #<Compiled-function |-[StandardView <br>> drawRect:]|>>>>> (Non-Global)  #x300041F007BF><br>> >>>>> WITHOUT-INTERRUPTS: NIL<br>> >>>>> CCL::*CALLBACK-TRACE-P*: NIL<br>> >>>>> <br>> >>>>> (442F08) : 10 (FUNCALL #'#<Anonymous Function #x30004122027F><br>> >>>>> #<LISP-APPLICATION <LispApplication: 0x1c3580> (#x1C3580)><br>> >>>>> #S(CCL::OBJC-SELECTOR :NAME "run" :%SEL #<A Foreign Pointer<br>> >>>>> #x7FFF82FFFD68>)) 205<br>> >>>>> (#:G3072 #:G3073)<br>> >>>>> #:G3072: #<LISP-APPLICATION <LispApplication: <br>> 0x1c3580> (#x1C3580)><br>> >>>>> #:G3073: #S(CCL::OBJC-SELECTOR :NAME "run" :%SEL #<A Foreign<br>> >>>>> Pointer #x7FFF82FFFD68>)<br>> >>>>> <br>> >>>>> <br>> >>>>> <br>> >>>>> (442F28) : 11 (FUNCALL #'#<(:INTERNAL CCL::SEND-<br>> UNAMBIGUOUS-MESSAGE<br>> >>>>> (SHARED-INITIALIZE :AFTER (CCL::OBJC-DISPATCH-FUNCTION <br>> T)))> #<LISP-<br>> >>>>> APPLICATION <LispApplication: 0x1c3580> (#x1C3580)>) 501<br>> >>>>> (CCL::RECEIVER &REST CCL::ARGS)<br>> >>>>> CCL::RECEIVER: #<LISP-APPLICATION <LispApplication: <br>> 0x1c3580>>>>>> (#x1C3580)><br>> >>>>> CCL::ARGS: NIL<br>> >>>>> <br>> >>>>> CCL::SELECTOR: #S(CCL::OBJC-SELECTOR :NAME "run" :%SEL <br>> #<A Foreign<br>> >>>>> Pointer #x7FFF82FFFD68>)<br>> >>>>> FUNCTION: #<Anonymous Function #x30004122027F><br>> >>>>> <br>> >>>>> (442F68) : 12 (EVENT-LOOP NIL) 413<br>> >>>>> (&OPTIONAL GUI::END-TEST)<br>> >>>>> GUI::END-TEST: NIL<br>> >>>>> <br>> >>>>> GUI::APP: #<LISP-APPLICATION <LispApplication: <br>> 0x1c3580> (#x1C3580)><br>> >>>>> *BREAK-ON-ERRORS*: NIL<br>> >>>>> #:G163537: (ERROR)<br>> >>>>> CCL::%HANDLERS%: ((ERROR))<br>> >>>>> GUI::*EVENT-PROCESS-REPORTED-CONDITIONS*: (#<SIMPLE-ERROR<br>> >>>>> #x3000420F8DBD>)<br>> >>>>> <br>> >>>>> <br>> >>>>> <br>> >>>>> <br>> >>>>> <br>> >>>>> <br>> >>>>> <br>> >>>>> Am 09.06.2009 um 02:44 schrieb Ron Garret:<br>> >>>>> <br>> >>>>>> [This may be a repeat, but the original never showed up <br>> in my<br>> >>>>>> inbox.  Also, there's an update at the end.]<br>> >>>>>> <br>> >>>>>> On Jun 8, 2009, at 11:32 AM, Arthur W Cater wrote:<br>> >>>>>> <br>> >>>>>>> Use #/addTrackingRect:owner:userData:assumeInside: with<br>> >>>>>>> - the view<br>> >>>>>>> - its #/bounds<br>> >>>>>>> - a ns-object as target<br>> >>>>>>> - ccl::+null-ptr+<br>> >>>>>>> - #$NO<br>> >>>>>>> <br>> >>>>>>> Then<br>> >>>>>>> (objc:define-objc-method ((:void :mouse-entered (:id event))<br>> >>>>>>> <theTargetClassYouUsed>) ...)<br>> >>>>>>> <br>> >>>>>>> likewise :mouse-exited and :mouse-move<br>> >>>>>> <br>> >>>>>> Thanks!  Updated version enclosed. This has been <br>> tested in 32-bit<br>> >>>>>> CCL, and should now work on Tiger as well.<br>> >>>>>> <br>> >>>>>> This version also fixes a bug whereby testviews did not get<br>> >>>>>> properly re-initialized to add a tracker when the class got<br>> >>>>>> redefined.  I was using an initialize-instance <br>> :after method when<br>> >>>>>> I should have been using shared initialize -- I <br>> think.  There is<br>> >>>>>> still a subtle bug which I can't figure out.  When <br>> you add a<br>> >>>>>> highlighted mixin to an existing testview instance, you <br>> have to<br>> >>>>>> click on it once before it starts to highlight <br>> itself.  I have no<br>> >>>>>> idea why this is happening.  I may not be using <br>> shared-initialize<br>> >>>>>> properly.  Maybe a CLOS wizard can help with some <br>> advice on the<br>> >>>>>> proper way to do this.<br>> >>>>>> <br>> >>>>>> UPDATE: it turns out that the reason for this is that calling<br>> >>>>>> shared-initialize is done lazily.  So until there is an<br>> >>>>>> interaction with the updated object it doesn't get re-<br>> initialized,>>>>>> so add-tracker doesn't get called, so the <br>> event that would<br>> >>>>>> normally cause the interaction never gets received.  <br>> Makes an<br>> >>>>>> interesting little puzzle.<br>> >>>>>> <br>> >>>>>> rg<br>> >>>>>> <br>> >>>>>> <draggable.lisp><br>> >>>>>> _______________________________________________<br>> >>>>>> Openmcl-devel mailing list<br>> >>>>>> Openmcl-devel@clozure.com<br>> >>>>>> http://clozure.com/mailman/listinfo/openmcl-devel<br>> >>>>> <br>> >>>>> Rainer Joswig, Hamburg, Germany<br>> >>>>> http://lispm.dyndns.org/<br>> >>>>> mailto:joswig@lisp.de<br>> >>>>> <br>> >>>>> <br>> >>> <br>> >>> Rainer Joswig, Hamburg, Germany<br>> >>> http://lispm.dyndns.org/<br>> >>> mailto:joswig@lisp.de<br>> >>> <br>> >>> <br>> >>> <br>> >>> _______________________________________________<br>> >>> Openmcl-devel mailing list<br>> >>> Openmcl-devel@clozure.com<br>> >>> http://clozure.com/mailman/listinfo/openmcl-devel<br>> >>> <br>> >>> <br>> >> _______________________________________________<br>> >> Openmcl-devel mailing list<br>> >> Openmcl-devel@clozure.com<br>> >> http://clozure.com/mailman/listinfo/openmcl-devel<br>> ><br>> _______________________________________________<br>> Openmcl-devel mailing list<br>> Openmcl-devel@clozure.com<br>> http://clozure.com/mailman/listinfo/openmcl-devel</div>