phetsims / gravity-and-orbits

"Gravity And Orbits" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
12 stars 6 forks source link

artifacts seen with latest macOS + safari #472

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device MacBook Air (m1 chip)

Operating System macOS 13.0

Browser Safari 16.1

Problem description For https://github.com/phetsims/qa/issues/850, I am seeing artifacts with the planet/moon and star/planet scenes with Gravity Force and Velocity checked and the mass of planet or star is increased. This is a general issue with the latest macOS + safari and scenery that is assigned to @jonathanolson in https://github.com/phetsims/scenery/issues/1503.

Steps to reproduce

  1. On either screen, select the star/planet scene
  2. Check Gravity Force and Velocity
  3. Increase the Star Mass to 2.0
  4. Press Play

Visuals

https://user-images.githubusercontent.com/87318828/200918451-46ea6c82-88a7-4bc0-ab25-a30101738abd.mp4

Screenshot 2022-11-09 at 11 49 24 AM
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Gravity and Orbits‬ URL: https://phet-dev.colorado.edu/html/gravity-and-orbits/1.6.0-rc.4/phet/gravity-and-orbits_all_phet.html Version: 1.6.0-rc.4 2022-11-08 22:23:49 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36 Language: en-US Window: 2068x1060 Pixel Ratio: 1.3333333730697632/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 31 uniform: 1024 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 16384x16384 OES_texture_float: true Dependencies JSON: {}
Nancy-Salpepi commented 1 year ago

Actually, I'm seeing artifacts in the first 3 scenes without adjusting mass values.

jonathanolson commented 1 year ago

@Nancy-Salpepi can you verify that the above commit handles this issue? Turns out it was a different Safari bug, documented in https://github.com/phetsims/scenery/issues/1503.

jonathanolson commented 1 year ago

@kathy-phet should I look into reporting an SVG bug to Safari for this?

<html>
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">

  <title>Arrow bug test</title>
</head>
<body>
  <svg focusable="false" width="1502" height="566">
    <g transform="matrix(0.84317049365593055299,0.00000000000000000000,0.00000000000000000000,0.84317049365593055299,319.29670724816355686926,0.00000000000000000000)">
      <g transform="scale(0.80000000000000004441)">
        <path d="M 429.73685877293036128322 152.33263688218951870113 L 475.96967537052415764265 314.78633972164936949412 L 471.16063094948151501740 316.15494914600617448741 L 482.48002585411597920029 328.52916827259900856006 L 485.58776421260949973657 312.04912087293575950753 L 480.77871979156685711132 313.41773029729256450082 L 434.54590319397306075189 150.96402745783271370783 L 429.73685877293036128322 152.33263688218951870113 Z" style="fill: rgb(50,130,215); stroke: rgb(64,64,64);"></path>
      </g>
    </g>
  </svg>
</body>
</html>

Causes the buggy case:

image

While this was possibly to isolate into an easy-to-report issue, it is also dramatically easy to work around (likely a minimal performance impact). Also, I don't need to be the person to report this.

Nancy-Salpepi commented 1 year ago

@jonathanolson things looks good on master.

samreid commented 1 year ago

Based on https://github.com/phetsims/qa/issues/854, I feel we do not have a complete understanding of this problem or its solution. However, based on https://github.com/phetsims/scenery/issues/1503 it seems like we want to move forward with cherry picking https://github.com/phetsims/scenery/commit/8ebb1eb3aae93a70a746f841818228f943581bb7

kathy-phet commented 1 year ago

@samreid - The problem is in Safari. JO will submit bug reports. For now, yes, do the cherry pick of the fix that fixes GAO - it just needs one pick not two picks. The easier of the picks, I believe.

jonathanolson commented 1 year ago

Bug reports submitted:

https://bugs.webkit.org/show_bug.cgi?id=248003 https://bugs.webkit.org/show_bug.cgi?id=248004 https://bugs.webkit.org/show_bug.cgi?id=248005

The first submitted bug is for this issue in particular. This is the issue that will be worked around by the maintenance release.

samreid commented 1 year ago

Ready for testing in https://github.com/phetsims/qa/issues/857, please check for the artifacts in Safari 16.1. Please close if all is well.

Nancy-Salpepi commented 1 year ago

This looks good in 1.6.0-rc.6. Closing.