JDK-8230728 : Thin stroked shapes are not rendered if affine transform has flip bit
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 11,13,14
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-09-06
  • Updated: 2021-06-28
  • Resolved: 2019-09-10
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 11 JDK 13 JDK 14 JDK 8
11.0.6-oracleFixed 13.0.2Fixed 14 b16Fixed 8u311Fixed
Description
ICEpdf team reported a rendering issue in Marlin renderer (the bug comes from Pisces code) due to at.getDeterminant() is negative in userSpaceLineWidth() that leads to a NaN stroke width:
https://github.com/bourgesl/marlin-renderer/issues/36

"Debugging MarlinRenderingEngine, execution steps into line 208:
widthScale = (float)Math.sqrt(at.getDeterminant());
In our scenario, at.getDeterminant() returns the value -0.47389273965262657 and widthScale and thus the value returned by userSpaceLineWidth(AffineTransform, float) is NaN.

Using the absolute value of at.getDeterminant(), the lines seem to get rendered correctly, the value returned by userSpaceLineWidth(AffineTransform, float) then is 0.18158083"

After investigation, using the absolute value (before sqrt) is the right solution.
Comments
I already pushed in 13u last night, after seeing the notification 13u-fix-SQE-OK. I expect 13u-fix-yes is coming, sorry.. Too many labels and notification email are confusing.
03-10-2019

You need proper tags for this, notice "11u" and "13u", fixed accordingly.
26-09-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/7f55aad34ac4 User: psadhukhan Date: 2019-09-25 09:20:40 +0000
25-09-2019

URL: https://hg.openjdk.java.net/jdk/client/rev/7f55aad34ac4 User: lbourges Date: 2019-09-10 19:21:25 +0000
10-09-2019

Fix Request Backporting this patch fixes a regression introduced in 9 vs ductus, pisces suffers the same problem in jdk8 but was removed since. Patch applies cleanly to 11u. The new FlipBitTest fails without the patch, and passes with it.
10-09-2019

RFR Thread: http://mail.openjdk.java.net/pipermail/2d-dev/2019-September/010258.html
06-09-2019