Return-Path: Delivered-To: apmail-xmlgraphics-general-archive@www.apache.org Received: (qmail 34536 invoked from network); 11 Nov 2010 09:24:45 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 11 Nov 2010 09:24:45 -0000 Received: (qmail 61105 invoked by uid 500); 11 Nov 2010 09:25:16 -0000 Mailing-List: contact general-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@xmlgraphics.apache.org Delivered-To: mailing list general@xmlgraphics.apache.org Received: (qmail 61097 invoked by uid 99); 11 Nov 2010 09:25:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Nov 2010 09:25:15 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=RCVD_IN_DNSWL_NONE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [213.239.215.103] (HELO tux17.hoststar.ch) (213.239.215.103) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 11 Nov 2010 09:25:07 +0000 Received: from [127.0.0.1] (194-230-63-144.static.adslpremium.ch [194.230.63.144]) (authenticated bits=0) by tux17.hoststar.ch (8.13.8/8.12.11) with ESMTP id oAB9OlMJ025680 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 11 Nov 2010 10:24:48 +0100 Date: Thu, 11 Nov 2010 10:25:13 +0100 From: Jeremias Maerki To: "general@xmlgraphics.apache.org" Subject: Re: Failure in FOP's junit tests in headless mode [was: Re: DO NOT REPLY [Bug 42408] [PATCH] Headless problem in transcoders] In-Reply-To: <20101110195535.GA3884@leverkruid.eu> References: <201011101508.oAAF8QYo002729@thor.apache.org> <20101110195535.GA3884@leverkruid.eu> Message-Id: <20101111102350.40F6.60BA733C@jeremias-maerki.ch> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable X-Mailer: Becky! ver. 2.50.02 [en] X-Antivirus: avast! (VPS 101110-1, 10.11.2010), Outbound message X-Antivirus-Status: Clean 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. >=20 > 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? >=20 > Simon >=20 > On Wed, Nov 10, 2010 at 10:08:26AM -0500, bugzilla@apache.org wrote: > > https://issues.apache.org/bugzilla/show_bug.cgi?id=3D42408 > >=20 > > --- Comment #17 from Simon Pepping 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. > >=20 > > 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. > >=20 > > [junit] No X11 DISPLAY variable was set, but this program performed= an > > operation which requires it. > > [junit] java.awt.HeadlessException:=20 > > [junit] No X11 DISPLAY variable was set, but this program performed= an > > operation which requires it. > > [junit] at > > sun.java2d.HeadlessGraphicsEnvironment.getDefaultScreenDevice(HeadlessG= raphicsEnvironment.java:82) > > [junit] at > > org.apache.xmlgraphics.java2d.ps.PSGraphics2D.getDeviceConfiguration(PS= Graphics2D.java:824) > > [junit] at > > org.apache.batik.ext.awt.image.GraphicsUtil.getDestination(Unknown Sour= ce) > > [junit] at > > org.apache.batik.ext.awt.image.GraphicsUtil.getDestinationColorModel(Un= known > > 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(Unkno= wn > > Source) > > [junit] at > > org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source) > > [junit] at > > org.apache.batik.ext.awt.image.renderable.PadRable8Bit.paintRable(Unkno= wn > > Source) > > [junit] at > > org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source) > > [junit] at > > org.apache.batik.ext.awt.image.renderable.FilterChainRable8Bit.paintRab= le(Unknown > > Source) > > [junit] at > > org.apache.batik.ext.awt.image.GraphicsUtil.drawImage(Unknown Source) > > [junit] at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unkn= own > > Source) > > [junit] at > > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Sourc= e) > > [junit] at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unkn= own > > Source) > > [junit] at > > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Sourc= e) > > [junit] at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unkn= own > > Source) > > [junit] at > > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Sourc= e) > > [junit] at > > org.apache.batik.gvt.CanvasGraphicsNode.primitivePaint(Unknown Source) > > [junit] at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unkn= own > > Source) > > [junit] at > > org.apache.batik.gvt.CompositeGraphicsNode.primitivePaint(Unknown Sourc= e) > > [junit] at org.apache.batik.gvt.AbstractGraphicsNode.paint(Unkn= own > > Source) > > [junit] at > > org.apache.fop.render.ps.AbstractPSTranscoder.transcode(AbstractPSTrans= coder.java:154) > > [junit] at > > org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(Unknown Sou= rce) > > [junit] at > > org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(Unknown Sou= rce) > > [junit] at > > org.apache.fop.AbstractBasicTranscoderTestCase.testGenericPDFTranscoder= (AbstractBasicTranscoderTestCase.java:70) >=20 > --------------------------------------------------------------------- > 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