Return-Path: Delivered-To: apmail-xmlgraphics-batik-dev-archive@www.apache.org Received: (qmail 51904 invoked from network); 2 Jan 2011 19:22:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 2 Jan 2011 19:22:07 -0000 Received: (qmail 81973 invoked by uid 500); 2 Jan 2011 19:22:06 -0000 Delivered-To: apmail-xmlgraphics-batik-dev-archive@xmlgraphics.apache.org Received: (qmail 81935 invoked by uid 500); 2 Jan 2011 19:22:06 -0000 Mailing-List: contact batik-dev-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: batik-dev@xmlgraphics.apache.org Delivered-To: mailing list batik-dev@xmlgraphics.apache.org Received: (qmail 81928 invoked by uid 99); 2 Jan 2011 19:22:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jan 2011 19:22:06 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 02 Jan 2011 19:22:05 +0000 Received: from thor.apache.org (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p02JLjlo027659 for ; Sun, 2 Jan 2011 19:21:45 GMT Received: (from daemon@localhost) by thor.apache.org (8.13.8+Sun/8.13.8/Submit) id p02JLiIM027658; Sun, 2 Jan 2011 14:21:44 -0500 (EST) Date: Sun, 2 Jan 2011 14:21:44 -0500 (EST) From: bugzilla@apache.org To: batik-dev@xmlgraphics.apache.org Subject: DO NOT REPLY [Bug 50536] New: Problem with transcoding SVG files on multiple threads. X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Batik X-Bugzilla-Component: Bridge X-Bugzilla-Keywords: X-Bugzilla-Severity: major X-Bugzilla-Who: karolbe@gmail.com X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: batik-dev@xmlgraphics.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=50536 Summary: Problem with transcoding SVG files on multiple threads. Product: Batik Version: 1.8 Platform: PC OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: Bridge AssignedTo: batik-dev@xmlgraphics.apache.org ReportedBy: karolbe@gmail.com I am consistently getting following exception when trying to process different documents on multiple threads: org.w3c.dom.DOMException: file:/tmp/layer_3139666847115514441Complex%20SVG%20intro.svg: The attribute "style" represents an invalid CSS declaration ("fill:#148409;fill-opacity:1;fill-rule:nonzero;stroke:#000000;stroke-width:17.00787354;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0"). Original message: java.lang.NullPointerException at org.apache.batik.css.engine.CSSEngine.getCascadedStyleMap(CSSEngine.java:825) at org.apache.batik.css.engine.CSSEngine.getComputedStyle(CSSEngine.java:868) at org.apache.batik.bridge.CSSUtilities.getComputedStyle(CSSUtilities.java:82) at org.apache.batik.bridge.CSSUtilities.convertDisplay(CSSUtilities.java:564) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:206) at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219) at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171) at org.apache.batik.bridge.GVTBuilder.buildGraphicsNode(GVTBuilder.java:219) at org.apache.batik.bridge.GVTBuilder.buildComposite(GVTBuilder.java:171) at org.apache.batik.bridge.GVTBuilder.build(GVTBuilder.java:82) at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:208) at org.apache.batik.transcoder.print.PrintTranscoder.transcode(PrintTranscoder.java:159) at org.apache.batik.transcoder.XMLAbstractTranscoder.transcode(XMLAbstractTranscoder.java:142) at org.apache.batik.transcoder.SVGAbstractTranscoder.transcode(SVGAbstractTranscoder.java:156) at org.apache.batik.transcoder.print.PrintTranscoder.print(PrintTranscoder.java:307) This is a code fragment (which I have written) which causes the issue: String parser = XMLResourceDescriptor.getXMLParserClassName(); SAXSVGDocumentFactory f = new SAXSVGDocumentFactory(parser); Document doc = f.createDocument(svgUri); ... ... final public void render(Graphics2D graphics2D, float width, float height) throws Exception { TranscoderInput input = new TranscoderInput(doc); PrintTranscoder printTranscoder = new PrintTranscoder(); printTranscoder.addTranscodingHint(PrintTranscoder.KEY_SCALE_TO_PAGE, Boolean.TRUE); printTranscoder.addTranscodingHint(PrintTranscoder.KEY_PAGE_WIDTH, new Float(width)); printTranscoder.addTranscodingHint(PrintTranscoder.KEY_PAGE_HEIGHT, new Float(height)); printTranscoder.addTranscodingHint(PrintTranscoder.KEY_WIDTH, new Float(width)); printTranscoder.addTranscodingHint(PrintTranscoder.KEY_HEIGHT, new Float(height)); printTranscoder.transcode(input, null); PageFormat pageFormat = new PageFormat(); Paper paper = new Paper(); paper.setSize(width, height); paper.setImageableArea(0, 0, width, height); pageFormat.setPaper(paper); printTranscoder.print(graphics2D, pageFormat, 0); } When I make the method 'synchronized' all works fine (also, when there is only one thread then it works fine too). I am testing it with 5 threads and the exception is thrown always. I am using current (trunk from SVN) version of Batik. At first I thought that it is connected to the bug #46360 in FOP but I am not using FOP in this case (and even if I am wrong about it I have the latest FOP from SVN which should have that bug fixed). -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. --------------------------------------------------------------------- To unsubscribe, e-mail: batik-dev-unsubscribe@xmlgraphics.apache.org For additional commands, e-mail: batik-dev-help@xmlgraphics.apache.org