incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Pedro Giffuni <...@apache.org>
Subject R: vcl field.cxx issue 150733 invalid float operation
Date Thu, 12 Jul 2012 22:58:10 GMT
FWIW;

--- Gio 12/7/12, Yuri Dario ha scritto:

> Hi,
> 
> I finally discovered the cause of a strange crash on some pc
> for the os2 port. It is due to an invalid float operation in
> MetricField class. It seems that some CPU are processing
> some invalid float value, which in turn generates the
> exception.
>

Just for reference: we have an initial patch for this
issue that Yuri is testing.

cheers,

Pedro.

 
> Surprisingly, the source code has this remark
> 
> sal_Int64 MetricField::ConvertValue( sal_Int64 nValue,
> sal_Int64 
> mnBaseValue, sal_uInt16 nDecDigits,
>                
>                
>      FieldUnit eInUnit, FieldUnit 
> eOutUnit )
> {
>     // caution: precision loss in double cast
>     return static_cast<sal_Int64>(
>         // #150733# cast double to
> sal_Int64 can throw a
>         //
> EXCEPTION_FLT_INVALID_OPERATION on Windows
>         nonValueDoubleToValueDouble(
>            
> ConvertDoubleValue( (double)nValue, mnBaseValue, 
> nDecDigits,
>                
>                
> eInUnit, eOutUnit ) ) );
> }
> 
> 
> but issue 150733 is not existing in current bugzilla
> database. I think
> it is an internal staroffice/sun/oracle issue.
> 
> Do someone know how has it been resolved?
> 
> This bug is present when users show the page settings dialog
> to select
> margins and page size. Since it happens when very big
> numbers are used
> forI found a workaround using
> 
>     mnMax           
>    = 0x00000000FFFFFFFFLL;
> 
> as initializer in void NumericFormatter::ImplInit()
> 
> 
> thanks,
> 
> -- 
> Bye,
> 
>     Yuri Dario
> 
> /*
>  * OS/2 open source software
>  * http://web.os2power.com/yuri
>  * http://www.netlabs.org
> */
> 
> 
> 

Mime
View raw message