incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 121134] Aoo crashes while opening the MS Word document
Date Fri, 28 Sep 2012 06:00:21 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=121134

wujinlong@gmail.com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #79671|                            |review?
              Flags|                            |

--- Comment #1 from wujinlong@gmail.com ---
Created attachment 79671
  --> https://issues.apache.org/ooo/attachment.cgi?id=79671&action=edit
Patch

The crash is related with fix for bug 119657. There is a bug in the solution.
If revert the fix, Aoo will not crash.

In the test document, there is a special case not covered. The "AbstractNum id
0" has a style link to style "MinDList", which references "Num id 8". At the
same time, "AbstractNum id 0" has a complete level definition. 

When processing "num id 1", it finds that the AbstractNum it points to, which
is "AbstractNum id 0", has a style linked. Then it will use the style name to
find the Num it uses, which is "Num id 8". Since the Num is processed in
sequence, "Num id 8" is not processed at that moment. So it will fail to
retrieve the AbstractNum "Num id 8" uses, which should be "AbstractNum id 0".

According to the logic of fix for 119657, in such case, the "AbstractNum id 0"
would not be created  successfully. In fact, we should create the number rule
using the level definitions defined in "AbstractNum id 0", rather than look for
the style link. 

The above explains the bug in previous solution, however the reason why the Aoo
crashes is not clear. I've tried to attach the soffice process, when Aoo
crashes, the Visual Studio can't show any meaningful call stack to determine
where Aoo crashes.

But if I add two lines of code to the previous fix, Aoo will not crash. So I
suppose the crash is related with unsuccessful creation of Number rule for
"AbstractNum id 0".

This new fix is to return the current AbstractNum if can't find a correct
AbstractNum through style link, which gos the same path as previous (without
the previous fix).

-------------- numbering.xml -------------
<w:abstractNum w:abstractNumId="0">
  <w:nsid w:val="22A540F9"/>
  <w:multiLevelType w:val="multilevel"/>
  <w:tmpl w:val="22AC870E"/>
  <w:styleLink w:val="MinDList"/>
  <w:lvl w:ilvl="0">
  ......
</w:abstractNum>
......
<w:num w:numId="1">
  <w:abstractNumId w:val="0"/>
</w:num>
......
<w:num w:numId="8">
  <w:abstractNumId w:val="0"/>
</w:num>
---------------------------------
------- style.xml------
<w:style w:type="numbering" w:customStyle="1" w:styleId="MinDList">
  <w:name w:val="MinD List"/>
  <w:rsid w:val="00E278DA"/>
  <w:pPr>
    <w:numPr>
      <w:numId w:val="8"/>
    </w:numPr>
  </w:pPr>
</w:style>
------------------------

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message