You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Daniel Noll <da...@nuix.com> on 2007/04/02 08:47:34 UTC

GifImage hangs indefinitely

Hi all.

I thought I might try to side-step the ImageIO GIF bug by commenting out 
that provider in FOP's ImageFactory.  But it looks like the GifImage 
implementation is unsafe too.  The call to consumer.getImage() hangs 
waiting forever.

The underlying problem seems to come from the JDK, however:
> java.lang.NullPointerException
> 	at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:97)
> 	at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:107)
> 	at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240)
> 	at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
> 	at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)

That line in the JRE's URLImageSource.java calls url.openConnection(), 
so it fails because FOP's DummyConnection (URLConnection) doesn't attach 
a URL to the request.

I'm thinking that perhaps we can use the original URI to return a URL in 
that DummyConnection class, but I don't have enough time left today to 
test that theory just yet so I thought I'd prod the list to see if 
someone thinks it would solve the issue.

Daniel

-- 
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: GifImage hangs indefinitely

Posted by Daniel Noll <da...@nuix.com>.
Jeremias Maerki wrote:
> That NPE is a known problem. I actually think GIFImage should be removed.
> At any rate, I won't reimplement that once I get to the image package
> redesign. I have tried at least twice to somehow work around what I
> think is a bug in the class library but no luck. I gave up.

While I was stewing over this I realised how to fix the first half of 
the bug in ImageIOImage anyway, so now the Image I/O implementation is 
slightly better although neither show the black lines in my sample GIF yet.

Daniel


-- 
Daniel Noll

Nuix Pty Ltd
Suite 79, 89 Jones St, Ultimo NSW 2007, Australia    Ph: +61 2 9280 0699
Web: http://nuix.com/                               Fax: +61 2 9212 6902

This message is intended only for the named recipient. If you are not
the intended recipient you are notified that disclosing, copying,
distributing or taking any action in reliance on the contents of this
message or attachment is strictly prohibited.

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: GifImage hangs indefinitely

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
That NPE is a known problem. I actually think GIFImage should be removed.
At any rate, I won't reimplement that once I get to the image package
redesign. I have tried at least twice to somehow work around what I
think is a bug in the class library but no luck. I gave up.

On 02.04.2007 08:47:34 Daniel Noll wrote:
> Hi all.
> 
> I thought I might try to side-step the ImageIO GIF bug by commenting out 
> that provider in FOP's ImageFactory.  But it looks like the GifImage 
> implementation is unsafe too.  The call to consumer.getImage() hangs 
> waiting forever.
> 
> The underlying problem seems to come from the JDK, however:
> > java.lang.NullPointerException
> > 	at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:97)
> > 	at sun.awt.image.URLImageSource.getDecoder(URLImageSource.java:107)
> > 	at sun.awt.image.InputStreamImageSource.doFetch(InputStreamImageSource.java:240)
> > 	at sun.awt.image.ImageFetcher.fetchloop(ImageFetcher.java:172)
> > 	at sun.awt.image.ImageFetcher.run(ImageFetcher.java:136)
> 
> That line in the JRE's URLImageSource.java calls url.openConnection(), 
> so it fails because FOP's DummyConnection (URLConnection) doesn't attach 
> a URL to the request.
> 
> I'm thinking that perhaps we can use the original URI to return a URL in 
> that DummyConnection class, but I don't have enough time left today to 
> test that theory just yet so I thought I'd prod the list to see if 
> someone thinks it would solve the issue.


Jeremias Maerki


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org