[REVIEW 3-5] Fix for a crasher during copy-n-paste from Excel.

Kohei Yoshida kohei.yoshida at gmail.com
Mon Feb 13 12:32:18 PST 2012


On Mon, 2012-02-13 at 21:16 +0100, Eike Rathke wrote:
> 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?

Yes, you need to copy&paste from Excel to reproduce the bug, on Windows.

>  I find it strange that the bug
> report mentions ScDocument::InsertTableOp() being called.

It's not strange at all; my call stack included that method as well.

> 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.

Well, maybe you have more clue than I do.  Feel free to improve my fix
there.  I'm happy enough with my fix, and the crash is indeed gone with
it. ;-)

Kohei

-- 
Kohei Yoshida, LibreOffice hacker, Calc



More information about the LibreOffice mailing list