bharath0305 / flying-saucer

Automatically exported from code.google.com/p/flying-saucer
0 stars 0 forks source link

NullPointerException out of org.xhtmlrenderer.swing.AWTFSImage #61

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
*** This issue was imported from http://java.net/jira/browse/XHTMLRENDERER-280

It was reported by bqu on 10.07.2009 23:24:43 +0200 and last updated in the 
previous bug tracker on 10.07.2009 23:27:03 +0200

Found in
Operating System: All
Platform: All

The priority for this issue at migration was Major.

Original description: 
When html contains a background image with a url source that is not available 
or no longer valid, e.g.,

<TD style="BACKGROUND-IMAGE: url
(http://webstage.silverpop.com/sales/jetblue/p_email_vert_divider.gif)">
some text</TD>,

"img" is null and exception is thrown:

java.lang.NullPointerException
    at org.xhtmlrenderer.swing.AWTFSImage$OldAWTFSImage.getWidth
(AWTFSImage.java:65)
    at org.xhtmlrenderer.render.AbstractOutputDevice.paintBackground0
(AbstractOutputDevice.java:226)
    at org.xhtmlrenderer.render.AbstractOutputDevice.paintBackground
(AbstractOutputDevice.java:181)
    at org.xhtmlrenderer.newtable.TableCellBox.paintBackgroundStack
(TableCellBox.java:310)
    at org.xhtmlrenderer.newtable.TableCellBox.paintBackground
(TableCellBox.java:272)
    at org.xhtmlrenderer.layout.Layer.paintBackgroundsAndBorders
(Layer.java:243)
    at org.xhtmlrenderer.layout.Layer.paint(Layer.java:329)
    at org.xhtmlrenderer.swing.BasicPanel.doRender(BasicPanel.java:143)
    at org.xhtmlrenderer.swing.BasicPanel.paintComponent
(BasicPanel.java:128)
    at org.xhtmlrenderer.simple.Graphics2DRenderer.render
(Graphics2DRenderer.java:97)
    at 
com.silverpop.marketer.mailing.thumbnails.ThumbnailRenderer.renderToImage
(ThumbnailRenderer.java:45)
    at 
com.silverpop.marketer.mailing.thumbnails.ThumbnailRenderer.renderToImage
(ThumbnailRenderer.java:21)
    at 
com.silverpop.marketer.mailingmanager.ThumbnailManager$WorkerThread.generateThum
bnail(ThumbnailManager.java:139)
    at 
com.silverpop.marketer.mailingmanager.ThumbnailManager$WorkerThread.call
(ThumbnailManager.java:120)
    at 
com.silverpop.marketer.mailingmanager.ThumbnailManager$WorkerThread.call
(ThumbnailManager.java:107)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask
(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run
(ThreadPoolExecutor.java:908)
    at java.lang.Thread.run(Thread.java:619)

This may have been fixed in Revision 1.9 of org.xhtmlrenderer.swing.AWTFSImage, 
dated 5/15/2009, but did not make to Release 8 on 4/18/2009.

Original issue reported on code.google.com by pdoubl...@gmail.com on 16 Feb 2011 at 9:47

GoogleCodeExporter commented 9 years ago
bqu wrote on 10.07.2009 23:27:03 +0200:
This may have been fixed in Revision 1.9 of org.xhtmlrenderer.swing.AWTFSImage, 
dated 5/15/2009, but did not make to Release 8 on 4/18/2009.

Original comment by pdoubl...@gmail.com on 16 Feb 2011 at 9:47