Re: Javascript and konq crash

yan seiner <[email protected]>
Newsgroups gmane.comp.kde.devel.konq-e
Message-ID <[email protected]>
Luciano Montanaro wrote:

>On Friday 24 March 2006 14:26, Yan Seiner wrote:
>  
>
>>Eva Brucherseifer wrote:
>>    
>>
>>>Hi Yan,
>>>
>>>can you have a look at it? We are pretty busy with fixing other stuff...
>>>
>>>Greetings,
>>>eva
>>>      
>>>
>>OK, I've looked at it.... It's a scary mess.
>>
>>In your javascript that fails, are you calling any floating point?
>>sin/cos? log?
>>
>>The code that fails for us uses a good bit of floating point....  It
>>would be good to confirm that suspicion....
>>
>>    
>>
>
>The dtoa code is really quite intricated.
>It seem to be called from a single point in kjs, in ustring.
>Perhaps for testing purposes another conversion method (with sprintf or a 
>stringstream) could be used. If that works, the problem is indeed in dtoa.
>
>Luciano
>
>  
>
OK, some testing....

Floating point in Javascript on ARM seems to be badly broken -

document.getElementById("xa"+idx).value =
                depth * 100 /
                document.getElementById("ha"+idx).value;

which should be

0.5 * 100 / 3 = 16.66667 - and in fact shows up as 16.6667 in Firefox on 
x86 - shows up as -0.0003 just before konq crashes....

The big question is where is it broken?  Can the kjs folks look at it?

I can tarball the code I am using if that will help....  But for now I 
am going to walk around and clear my head....

--Yan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.