Re: RMCL 5.2 on Snow Leopard: floating point issues

Toomas Altosaar <[email protected]> Fri, 16 Oct 2009 10:02:14 +0300
Newsgroups gmane.lisp.mcl.general
Message-ID <p06240803c6fdc8e6085e@[192.168.0.102]>
Probably unrelated, but who knows:

In MCL 5.1b4, i.e., no Intel, no Rosetta,

(choose-directory-dialog)

always causes MCL to end up in the spinning beach 
ball mode when clicking in the dialog and going 
shallower and then deeper into directories (by 2 
levels when at some fairly deep level already). 
When moving towards the root it does not seem to 
freeze. Also, many clicks may be required to get 
the dialog to show the files and folders within 
the clicked upon folder, otherwise the folder is 
shown as empty.

IIRC, this started to occur on 10.5, not tested in 10.6 for obvious reasons.

So my guess is that (choose-directory-dialog) is corrupting memory bad.

We should check whether the primitives that 
(choose-directory-dialog) calls are still 
supported or have been deprecated starting from 
10.5, and if so, then find a replacement.

>The problem manifests itself with returning 
>every float value as 0.0 which is a likely 
>source of causing division by zero float error.
>
>I still do not know what causes this problem. 
>There is no obvious CL code that could explain 
>this. However, there is good news, or at least 
>good enough news. I can now replicate the bug. 
>Tracking the bug in a large code base finally 
>turned up this unlikely culprit:
>
>Welcome to Macintosh Common Lisp Version 5.2!
>? 3.3
>3.3
>? (choose-directory-dialog)
>#P"Double Ristretto:Users:alex:Desktop:RMCL 5.2:level-1:"
>? 3.3
>0.0
>?
>
>OS X 10.6.1, Core 2 Duo, 2.6 Ghz MacBook Pro 
>with a fresh copy of RMCL from Google Code.
>
>time to sleep...
>
>Alex
>
>
>
>On Oct 15, 2009, at 9:30 PM, Chun Tian wrote:
>
>>Hi again,
>>
>>>(this is in a Listerner 1 process "initial" breaking after the error  
>>>
>>>occurring for the first time resulting in float /0 errors)
>>>
>>
>>What does above mean? I try to eval something like (/ 1.0 0.0) first,  
>>but the rest of those float tests are still keep the same.
>>
>>--binghe
>>
>>çð 2009-10-16ÅC11:26ÅC Chun Tian é ì¼ÅF
>>
>>>Hi, Alexander
>>>
>>>
>>>Hmmm ... I'm also in Snow Leopard using RMCL 5.2, but your tests are  
>>>
>>>all fine here:
>>>
>>>
>>>Welcome to Macintosh Common Lisp Version 5.2!
>>>
>>>? 3
>>>
>>>3
>>>
>>>? 3.0
>>>
>>>3.0
>>>
>>>? *read-default-float-format*
>>>
>>>SINGLE-FLOAT
>>>
>>>? (setq *read-default-float-format* 'short-float)
>>>
>>>SHORT-FLOAT
>>>
>>>? 3
>>>
>>>3
>>>
>>>? 3.3
>>>
>>>3.3
>>>
>>>? (float 3)
>>>
>>>3.0
>>>
>>>? (+ 4.5 5.5)
>>>
>>>10.0
>>>
>>>?
>>>
>>>
>>>This is Mac OS X 10.6.1 on Intel Core 2 Duo 2.66GHz (MacBookPro5,2).  
>>>
>>>I just want to clarify that not everyone met the same issue as you  
>>>
>>>(I'm sorry for that).
>>>
>>>
>>>Regards,
>>>
>>>
>>>Chun Tian (binghe)
>>>
>>>
>>>çð 2009-10-16ÅC4:38ÅC Alexander Repenning é ì¼ÅF
>>>
>>>
>>>>getting closer to WHAT is happening but not WHY. Keep in mind this  
>>>>
>>>>worked on Leopard but not Snow Leopard. I would assume this is has  
>>>>
>>>>something to do with the new version of Rosetta. Here are some  
>>>>
>>>>stunning listener interactions (this is in a Listerner 1 process  
>>>>
>>>>"initial" breaking after the error occurring for the first time  
>>>>
>>>>resulting in float /0 errors):
>>>>
>>>>
>>>>1 > 3
>>>>
>>>>3
>>>>
>>>>;; OK
>>>>
>>>>1 > 3.0
>>>>
>>>>1.06099791E-315
>>>>
>>>>;; HUH!!!
>>>>
>>>>
>>>>1 > (setq *read-default-float-format* 'short-float)
>>>>
>>>>SHORT-FLOAT
>>>>
>>>>1 > 3
>>>>
>>>>3
>>>>
>>>>1 > 3.3
>>>>
>>>>0.0
>>>>
>>>>1 > (float 3)
>>>>
>>>>0.0
>>>>
>>>>1 > (+ 4.5 5.5)
>>>>
>>>>0.0
>>>>
>>>>
>>>>Looks as if ANY kind of float returned is a 0.0
>>>>
>>>>
>>>>Meanwhile, in the regular listerner things are still working as  
>>>>
>>>>expected.
>>>>
>>>>
>>>>I am stumped at the moment and would appreciate any pointer or even  
>>>>
>>>>wild guesses on how RMCL could possibly enter this state.
>>>>
>>>>
>>>>So far I have only seen the problem in process initial but I am not  
>>>>
>>>>sure if this is relevant.
>>>>
>>>>
>>>>all the best,  Alex
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>On Oct 14, 2009, at 2:57 PM, Terje Norderhaug wrote:
>>>>
>>>>
>>>>>On Oct 14, 2009, at 9:15 AM, Alexander Repenning wrote:
>>>>>
>>>>>>What kinds of  issues do people have out there with RMCL 5.2 and
>>>>>>
>>>>>>Snow Leopard (OS X, 10.6.1)?
>>>>>>
>>>>>>
>>>>>>Things almost work here but there are some strange floating point
>>>>>>
>>>>>>issues (with shorts).
>>>>>>
>>>>>>
>>>>>>At least we get further, ironically, with RCML 5.2 than CCL 1.3
>>>>>>
>>>>>>which immediately quits. What is the version of CCL one should use
>>>>>>
>>>>>>to work under OS X 10.6.1?
>>>>>>
>>>>>
>>>>>Are these the same as the problems discussed in issue 8 at
>>>>>
>>>>><http://mcl.googlecode.com>mcl.googlecode.com?
>>>>>
>>>>>
>>>>><http://code.google.com/p/mcl/issues/detail?id=8>http://code.google.com/p/mcl/issues/detail?id=8
>>>>>
>>>>>
>>>>>Gary made some changes to the floating point functionality, but come
>>>>>
>>>>>to think about it, these changes may not have been propagated into
>>>>>
>>>>>the distribution yet:
>>>>>
>>>>>
>>>>><http://code.google.com/p/mcl/source/detail?>http://code.google.com/p/mcl/source/detail?
>>>>>
>>>>>r=ff3f7eb878e5d61e1a8e83f6d19b3a3ea86de346
>>>>>
>>>>>
>>>>>-- Terje
>>>>>
>>>>>_______________________________________________
>>>>>
>>>>>info-mcl mailing list
>>>>>
>>>>><mailto:[email protected]>[email protected]
>>>>>
>>>>><http://clozure.com/mailman/listinfo/info-mcl>http://clozure.com/mailman/listinfo/info-mcl
>>>>>
>>>>
>>>>Prof. Alexander Repenning
>>>>
>>>>
>>>>University of Colorado
>>>>
>>>>Computer Science Department
>>>>
>>>>Boulder, CO 80309-430
>>>>
>>>>
>>>>vCard: 
>>>><http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf>http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf
>>>>
>>>>
>>>>
>>>>_______________________________________________
>>>>
>>>>info-mcl mailing list
>>>>
>>>><mailto:[email protected]>[email protected]
>>>>
>>>><http://clozure.com/mailman/listinfo/info-mcl>http://clozure.com/mailman/listinfo/info-mcl
>>>>
>>>
>>
>>_______________________________________________
>>info-mcl mailing list
>><mailto:[email protected]>[email protected]
>><http://clozure.com/mailman/listinfo/info-mcl>http://clozure.com/mailman/listinfo/info-mcl
>>
>
>Prof. Alexander Repenning
>
>
>University of Colorado
>
>Computer Science Department
>
>Boulder, CO 80309-430
>
>
>vCard: 
><http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf>http://www.cs.colorado.edu/~ralex/AlexanderRepenning.vcf
>
>
>
>
>_______________________________________________
>info-mcl mailing list
>[email protected]
>http://clozure.com/mailman/listinfo/info-mcl

_______________________________________________
info-mcl mailing list
[email protected]
http://clozure.com/mailman/listinfo/info-mcl