Canvas path rendering bug

Bug #1434404 reported by Basil Titovchenko
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mozilla Firefox
Invalid
Unknown
firefox (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Ubuntu: 14.04.2 LTS (32bit and 64bit versions)

Firefox: Mozilla Firefox for Ubuntu canonical - 1.0
Installed: 36.0.1+build2-0ubuntu0.14.04.1

I wrote the simple script to draw the circle composed by lines from it center. In Ubuntu Firefox I've got some weird looking artefacts, while in other OSes or browsers all seems to be ok (I've tested Firefox, Opera and Chrome in Windows, Chrome and Opera in Ubuntu).

To reproduce:
-------------------

1. Open source file circle360.html in Firefox on Ubuntu;
2. Expected to see the correctly drawin picture;
3. Instead I see the picture with drawing artefacts (look at attached picture canvas-firefox.png)

Source file: circle360.html
-------------------------------------
<!DOCTYPE html>
<html>
<head>
  <title>Ray Circle</title>
</head>
<body>
<canvas height='640' width='640' id='example'>You should update your browser.</canvas>
<script>
    var example = document.getElementById("example"),
        ctx = example.getContext('2d'),
 PIdiv180 = Math.PI / 180,
 size = 480;

    ctx.beginPath();
    for (var i = 0; i < 360; i++) {
        ctx.moveTo(320, 320);
        ctx.lineTo(320 + Math.sin(i * PIdiv180) * 320, 320 + Math.cos(i * PIdiv180) * 320);
    }
    ctx.stroke();
</script>
</body>
</html>
-------------------------------------

Revision history for this message
Basil Titovchenko (unibasil) wrote :
tags: added: canvas
tags: added: image path
Revision history for this message
Basil Titovchenko (unibasil) wrote :
Revision history for this message
Basil Titovchenko (unibasil) wrote :
Revision history for this message
madbiologist (me-again) wrote :

Thanks. I can reproduce this with Firefox 37.0.1. Can you report the bug upstream to Mozilla and link this bug report to the upstream bug report by clicking on "Also affects project" near the top of this page?

tags: added: trusty
Changed in firefox (Ubuntu):
status: New → Confirmed
Revision history for this message
In , Basil Titovchenko (unibasil) wrote :

Created attachment 8595754
canvas-firefox.png

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:37.0) Gecko/20100101 Firefox/37.0
Build ID: 20150403141925

Steps to reproduce:

Ubuntu: 14.04.2 LTS (32bit and 64bit versions)
Firefox: Mozilla Firefox for Ubuntu canonical - 1.0
Installed: 36.0.1+build2-0ubuntu0.14.04.1

Run this HTML in Firefox:
----------------------------
<!DOCTYPE html>
  <html>
  <head>
    <title>Ray Circle</title>
  </head>
  <body>
  <canvas height='640' width='640' id='example'>You should update your browser.</canvas>
  <script>
      var example = document.getElementById("example"),
          ctx = example.getContext('2d'),
   PIdiv180 = Math.PI / 180,
   size = 480;

      ctx.beginPath();
      for (var i = 0; i < 360; i++) {
          ctx.moveTo(320, 320);
          ctx.lineTo(320 + Math.sin(i * PIdiv180) * 320, 320 + Math.cos(i * PIdiv180) * 320);
      }
      ctx.stroke();
  </script>
  </body>
  </html>
----------------------------

Actual results:

See attached file canvas-firefox.png

Expected results:

The same figure without artefacts.

Changed in firefox:
importance: Unknown → Medium
status: Unknown → New
Revision history for this message
In , Alice0775-t (alice0775-t) wrote :

Created attachment 8595941
reporter's testcase

Revision history for this message
In , Alice0775-t (alice0775-t) wrote :

Reproduced on ubuntu since Firefox4.0

Revision history for this message
In , Alice0775-t (alice0775-t) wrote :

Regression window:
https://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=2968d19b0165&tochange=29a6a85fab8e

Suspect: f236632a9747 Jeff Muizelaar — Bug 542605. Update cairo to 12d521df8acc483b2daa844d4f05dc2fe2765ba6. r=vlad,jwatt,bas

Changed in firefox:
status: New → Confirmed
Revision history for this message
In , Bas-c (bas-c) wrote :

This is a very old regression, I don't think this is a high priority sadly.

Revision history for this message
In , Basil Titovchenko (unibasil) wrote :

Seems now it draws well in Firefox Quantum 57.0.4 (64-bit), Ubuntu 16.04

Revision history for this message
Paul White (paulw2u) wrote :

Upstream bug is still open but reporter said issue was fixed in Firefox 57.0.4 over a year ago. Test file works here with Firefox 66.0.2 in Ubuntu 18.04 so closing as fixed.

Changed in firefox (Ubuntu):
status: Confirmed → Fix Released
Changed in firefox:
importance: Medium → Unknown
Revision history for this message
In , Gp3033 (gp3033) wrote :
Changed in firefox:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.