xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremias Maerki <...@jeremias-maerki.ch>
Subject Re: Failure in FOP's junit tests in headless mode [was: Re: DO NOT REPLY [Bug 42408] [PATCH] Headless problem in transcoders]
Date Thu, 11 Nov 2010 09:25:13 GMT
I guess we need to do something similar as we have in PDFGraphics2D
which constructs its own GraphicsConfiguration object instead of relying
on the screen configuration.

On 10.11.2010 20:55:35 Simon Pepping wrote:
> I ran fop's junit tests in headless mode with current batik. Only two
> errors result, from the same piece of code. This is much better than
> with batik-all-1.7.jar.
> 
> The remaining error occurs XGC, see the stack trace below. It occurs
> when batik's paint method is called with the graphics object. This
> object's getDeviceConfiguration method tries to get a screen device,
> which is not available in headless mode. Is there a way to run this
> test in headless mode?
> 
> Simon
> 
> On Wed, Nov 10, 2010 at 10:08:26AM -0500, bugzilla@apache.org wrote:
> > https://issues.apache.org/bugzilla/show_bug.cgi?id=42408
> > 
> > --- Comment #17 from Simon Pepping <spepping@apache.org> 2010-11-10 10:08:17
EST ---
> > I applied the patch, built batik-all.jar, inserted it into the fop lib
> > directory, and ran fop's junit tests in a graphics environment. I got
> > no errors. Then I ran fop's junit tests in headless mode. I got one
> > error, which is the same error I get without the patch. This indicates
> > the patch did not correct the piece of code that uses a display in
> > fop's junit tests.
> > 
> > The offending method that calls
> > HeadlessGraphicsEnvironment.getDefaultScreenDevice is a method in
> > xmlgraphics-commons, java2d.ps.PSGraphics2D.getDeviceConfiguration.
> > Maybe fop's headless junit test problem is not a batik problem, but a
> > XGC problem.
> > 
> >     [junit] No X11 DISPLAY variable was set, but this program performed an
> > operation which requires it.
> >     [junit] java.awt.HeadlessException: 
> >     [junit] No X11 DISPLAY variable was set, but this program performed an
> > operation which requires it.
> >     [junit]     at
> > sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessGraphicsEnvironment.java:82)
> >     [junit]     at
> > org.apache.xmlgraphics.java2d.ps.PSGraphics2D.getDeviceConfiguration(PSGraphics2D.java:824)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.GraphicsUtil.getDestination(Unknown Source)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.GraphicsUtil.getDestinationColorModel(Unknown
> > Source)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(Unknown
> > Source)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(Unknown
> > Source)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.renderable.FilterChainRable8Bit.paintRable(Unknown
> > Source)
> >     [junit]     at
> > org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source)
> >     [junit]     at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown
> > Source)
> >     [junit]     at
> > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
> >     [junit]     at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown
> > Source)
> >     [junit]     at
> > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
> >     [junit]     at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown
> > Source)
> >     [junit]     at
> > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
> >     [junit]     at
> > org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source)
> >     [junit]     at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown
> > Source)
> >     [junit]     at
> > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Source)
> >     [junit]     at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unknown
> > Source)
> >     [junit]     at
> > org.apache.fop.render.ps.AbstractPSTranscoder.transcode(AbstractPSTranscoder.java:154)
> >     [junit]     at
> > org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Source)
> >     [junit]     at
> > org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Source)
> >     [junit]     at
> > org.apache.fop.AbstractBasicTranscoderTestCase.testGenericPDFTranscoder(AbstractBasicTranscoderTestCase.java:70)
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: general-unsubscribe@xmlgraphics.apache.org
> For additional commands, e-mail: general-help@xmlgraphics.apache.org




Jeremias Maerki


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


Mime
View raw message