Hi Kohei,

On Monday, 2012-02-13 12:40:11 -0500, Kohei Yoshida wrote:

> Attached change (not yet committed to master) will fix a crasher bug
> which is one of the bugs reported in
> 
> https://bugs.freedesktop.org/show_bug.cgi?id=45916
> 
> It originally comes from
> 
> https://issues.apache.org/ooo/show_bug.cgi?id=118851

I could not reproduce a crash in master as of commit
39bfd6c0bcce78a13eda4566741be3ae06152cb1 from Feb-10

May it be that the original document has to be opened in Excel and the
cells copied&pasted from there into Calc? I find it strange that the bug
report mentions ScDocument::InsertTableOp() being called.

> There were several ways to think this as far as I could see. I've
> settled with the attached change because the ScFormulaCell code
> appears to assume that we always have a non-NULL pCode instance beyond
> its construction.

Hmm.. yes, but ...

> The problem happened when calc was not able to
> compile the formula string for whatever reason, in which case pCode
> would remain NULL after the Compile is called in one of its
> constructors.

That would be strange, an ScTokenArray is always returned by
ScCompiler::CompileString(). So unless (the ugly one-liner)

    if ( pDocument->IsClipOrUndo() ) return;

was hit there should always be a pCode. Which in turn pops up the
question why pCode would be accessed in a clipboard document if it
crashed there.

If we really always need a pCode it might be better to check at that
return place instead of the ctor. Still I'm not convinced that this is
the real cause.

 Eike

-- 
LibreOffice Calc developer. Number formatter stricken i18n transpositionizer.
GnuPG key 0x293C05FD : 997A 4C60 CE41 0149 0DB3  9E96 2F1A D073 293C 05FD

Attachment: pgpLM357TRtAv.pgp
Description: PGP signature

_______________________________________________
LibreOffice mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice

Reply via email to