incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yuri Dario" <>
Subject vcl field.cxx issue 150733 invalid float operation
Date Thu, 12 Jul 2012 15:50:42 GMT

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.

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
            ConvertDoubleValue( (double)nValue, mnBaseValue, 
                                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()



	Yuri Dario

 * OS/2 open source software

View raw message