Using the SVGGraphics2D with the following code: public void paint(Graphics2D g2d) { GeneralPath gp = new GeneralPath(); gp.moveTo(0,0); gp.lineTo(100,100); // OOPS!!! gp.lineTo(Double.NaN,Double.NaN); g2d.draw(gp); } The presence of the NaN in the path will cause the SVG output to contain an invalid/corrupt path i.e.: <path style="fill:none;" d="M0 0 L100 100 L� �"/> Full test case added as an attachment. I fully understand that this is not something one would normally do, but the lack of any exception/error was a surprise.
Created attachment 28544 [details] Minimal test case for the problem