You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@poi.apache.org by bu...@apache.org on 2014/03/05 11:47:10 UTC

[Bug 56218] New: [PATCH] NPE when reading XLSX file with drawing shapes

https://issues.apache.org/bugzilla/show_bug.cgi?id=56218

            Bug ID: 56218
           Summary: [PATCH] NPE when reading XLSX file with drawing shapes
           Product: POI
           Version: 3.10
          Hardware: PC
            Status: NEW
          Severity: major
          Priority: P2
         Component: SXSSF
          Assignee: dev@poi.apache.org
          Reporter: hong-thai.nguyen@polyspot.com

Created attachment 31367
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=31367&action=edit
Patch check NPE with test case

Read attached XLSX file, NPE raised
{code}
Caused by: java.lang.NullPointerException
    at
org.apache.poi.xssf.usermodel.XSSFSimpleShape.<init>(XSSFSimpleShape.java:84)
    at
org.apache.poi.xssf.usermodel.XSSFDrawing.getShapes(XSSFDrawing.java:377)
    at
org.apache.poi.xssf.eventusermodel.XSSFReader$SheetIterator.getShapes(XSSFReader.java:295)
    at
org.apache.tika.parser.microsoft.ooxml.XSSFExcelExtractorDecorator.buildXHTML(XSSFExcelExtractorDecorator.java:148)
    at
org.apache.tika.parser.microsoft.ooxml.AbstractOOXMLExtractor.getXHTML(AbstractOOXMLExtractor.java:105)
    at
org.apache.tika.parser.microsoft.ooxml.XSSFExcelExtractorDecorator.getXHTML(XSSFExcelExtractorDecorator.java:94)
    at
org.apache.tika.parser.microsoft.ooxml.OOXMLExtractorFactory.parse(OOXMLExtractorFactory.java:112)
    at
org.apache.tika.parser.microsoft.ooxml.OOXMLParser.parse(OOXMLParser.java:82)
    at org.apache.tika.parser.ParserDecorator.parse(ParserDecorator.java:91)
    at org.apache.tika.parser.CompositeParser.parse(CompositeParser.java:242)
    ... 24 more
{code}

On line 84 of org.apache.poi.xssf.usermodel.XSSFSimpleShape, We would check
that  body is not null (some shape has no text info, eg. lines).

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56218] [PATCH] NPE when reading XLSX file with drawing shapes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56218

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |NEEDINFO

--- Comment #1 from Dominik Stadler <do...@gmx.at> ---
Thanks for the patch, unfortunately it contains many unrelated changes like
tab/space changes and formatting changes, making it hard to only apply the
actual changes. Any chance you can re-do it so that it does not contain all
these changes?

Also you will need to attach the test-file separately, as it is not contained
in a text-only patch.

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


[Bug 56218] [PATCH] NPE when reading XLSX file with drawing shapes

Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=56218

Dominik Stadler <do...@gmx.at> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org