You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2006/12/11 15:33:33 UTC

DO NOT REPLY [Bug 41149] New: - PNG causes NPE for RTF output

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41149>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41149

           Summary: PNG causes NPE for RTF output
           Product: Fop
           Version: 1.0dev
          Platform: Other
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: rtf
        AssignedTo: fop-dev@xmlgraphics.apache.org
        ReportedBy: bowditch_chris@hotmail.com


Attached PNG causes a NPE when rendering to RTF. Submitted by Dominic Brugger 
(brugger.at.puzzle.ch) Stack trace below:

SEVERE: Error while handling an external-graphic: null
java.lang.NullPointerException
        at org.apache.commons.io.IOUtils.copy(IOUtils.java:920)
        at org.apache.commons.io.IOUtils.toByteArray(IOUtils.java:215)
        at org.apache.fop.image.AbstractFopImage.loadDefaultOriginalData
(AbstractFopImage.java:223)
        at org.apache.fop.image.ImageIOImage.loadOriginalData
(ImageIOImage.java:217)
        at org.apache.fop.image.AbstractFopImage.load
(AbstractFopImage.java:174)
        at org.apache.fop.render.rtf.RTFHandler.image(RTFHandler.java:1131)
        at org.apache.fop.render.rtf.RTFHandler.invokeDeferredEvent
(RTFHandler.java:1492)
        at org.apache.fop.render.rtf.RTFHandler.recurseFONode
(RTFHandler.java:1616)
        at org.apache.fop.render.rtf.RTFHandler.recurseFONode
(RTFHandler.java:1687)
        at org.apache.fop.render.rtf.RTFHandler.recurseFONode
(RTFHandler.java:1687)
        at org.apache.fop.render.rtf.RTFHandler.recurseFONode
(RTFHandler.java:1639)
        at org.apache.fop.render.rtf.RTFHandler.endPageSequence
(RTFHandler.java:

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 41149] - PNG causes NPE for RTF output

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41149>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41149


jeremias@apache.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED




------- Additional Comments From jeremias@apache.org  2006-12-11 12:09 -------
Yet another reason for a redesign of the image package. The reason for the NPE
is the loadBitmap() call in ImageIOImage.loadDimensions(). The class decodes the
full image in order to get at the dimensions and loadBitmap() closes the
InputStream when it's done.

I don't have time right now to test that it won't break anything but one could
change loadDimensions() in ImageIOImage so it doesn't call loadBitmap() if it
has the resolution and extents of the image (which it can get from the
ImageReader). When this is done all image formats that are registered in
ImageFactory for loading with ImageIOImage need to be retested with RTF and at
least PDF output.

HTH

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

DO NOT REPLY [Bug 41149] - PNG causes NPE for RTF output

Posted by bu...@apache.org.
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG�
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=41149>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND�
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=41149





------- Additional Comments From bowditch_chris@hotmail.com  2006-12-11 06:34 -------
Created an attachment (id=19242)
 --> (http://issues.apache.org/bugzilla/attachment.cgi?id=19242&action=view)
PNG


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.