https://issues.apache.org/bugzilla/show_bug.cgi?id=45877
Summary: Null base style for paragraph results in crash
Product: POI
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: major
Priority: P2
Component: HWPF
AssignedTo: [email protected]
ReportedBy: [EMAIL PROTECTED]
CC: [EMAIL PROTECTED]
Created an attachment (id=22629)
--> (https://issues.apache.org/bugzilla/attachment.cgi?id=22629)
Word document causing NullPointerException
Attached document, scanning its parts with QuickTest, results in a
java.lang.NullPointerException
at
org.apache.poi.hwpf.sprm.ParagraphSprmUncompressor.uncompressPAP(ParagraphSprmUncompressor.java:50)
at org.apache.poi.hwpf.model.PAPX.getParagraphProperties(PAPX.java:135)
at org.apache.poi.hwpf.usermodel.Range.getParagraph(Range.java:822)
at org.apache.poi.hwpf.QuickTest.main(QuickTest.java:45)
After some debugging, I found that
1) the istd value for problematic paragraph style is 10
2) in getParagraphProperties method, baseStyle is null, and then in
uncompressPAP method, the null variable causing the exception is "parent"
3) During StyleSheet constructor execution (the istd of problematic style is
10), _parahraphDescriptions[10] is not null, but
_parahraphDescriptions[10]getPap() returns null
4) in createPAP(10) (called by the second loop in constructor), "pap" and
"papx" local variables are *both* null, then createPAP does not create the PAP
for istd=10
A more weird thing is that, deleting or changing other document parts, for
example removing other paragraphs, the crash disappears...
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]