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

Mass Icons incorrect or missing with mac + safari #475

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 1 year ago

Test device MacBook Air (m1 chip)

Operating System macOS 13.0.1

Browser Safari

Problem description For https://github.com/phetsims/qa/issues/850 in PhET and PhET-iO brands:

As you change the scenes on either screen, the icons in the Masses Control panel are either incorrect or missing. It looks like the problem was introduced between 1.6.0-rc.1 and 1.6.0-rc.3. Perhaps it is related to https://github.com/phetsims/gravity-and-orbits/issues/449?

I don't see this mac + chrome. I also saw this with macOS 10.15.7 and safari 15.6.1

Steps to reproduce

  1. On either screen, click through the different scenes.

Visuals

https://user-images.githubusercontent.com/87318828/201344794-e3391d73-5a31-46be-9760-b002e9160ad0.mp4

Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: ‪Gravity and Orbits‬ URL: https://phet-dev.colorado.edu/html/gravity-and-orbits/1.6.0-rc.3/phet/gravity-and-orbits_all_phet.html Version: 1.6.0-rc.3 2022-10-06 04:17:15 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: 2068x1047 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

I haven't been able to reproduce this issue with ipadOS 16.1

samreid commented 1 year ago

I did not see this problem in Mac 12.6 running Safari Version 16.0 (17614.1.25.9.10, 17614). I'll update my OS for further testing.

KatieWoe commented 1 year ago

I'm not seeing it either. Could it be an M1 chip thing? Edit: It looks like one of the devices @Nancy-Salpepi saw it on was not an M1 chip.

samreid commented 1 year ago

I'm on M1 (in my test above as well), and I upgraded to MacOS 13.0.1 running Safari Version 16.1 (18614.2.9.1.12). I still do not see the icons disappear, but I see a different problem in the same place. The icons do not switch to reflect the new scene.

image

This is not a problem in production and may be related to the new renderer: 'canvas' flag introduced in that part of the sim.

stemilymill commented 1 year ago

I haven't been able to reproduce this in Mac 12.6 safari 16.0 (17614.1.25.9.10, 17614). I can continue trying in the morning with this setup or I can update OS for more testing, whatever would be more helpful

Nancy-Salpepi commented 1 year ago

@samreid sometimes the correct icons didn't appear as you said in https://github.com/phetsims/gravity-and-orbits/issues/475#issuecomment-1314655887 and sometimes they disappeared for me completely. I was seeing different things at different times. I am glad you were able to reproduce this!!

samreid commented 1 year ago

@marlitas and I were able to reproduce this issue many times, but it was very flaky--sometimes the same situation (code + screen size) would give a different result. Resizing the window would trigger a repaint. We tried setTimeout + repaint + invalidation at many levels but could not find a combination that worked 100% of the time.

Next, I tried rendering the body objects using mipmaps, and have not yet seen a case where that fails. I have also tried toggling between image => mipmap and for a buggy scenario, was able to see image=bug, mipmap=ok image=bug. It's unfortunate we don't know more about the cause of this problem or why it affects chrome only in this flaky way, but let's run mipmaps past QA to see if it is sturdy enough.

samreid commented 1 year ago

During testing, I have never seen the mipmaps fail, so I went ahead and committed that fix. However, reverting that change, I was unable to make the icon disappear in chrome, despite testing at different resolutions and restarting chrome numerous times. So this is still mysterious, but I think it's ready for QA to take a look. Please test Mac Chrome, Win Chrome, Safari and a Firefox to make sure the mass slider icons render correctly when changing scenes. Please test at a few different window resolutions--some sizes seem to trigger the problem and some do not.

samreid commented 1 year ago

Ready for testing in https://github.com/phetsims/qa/issues/857, please close if all is well. Please see prior comment for testing instructions.

Nancy-Salpepi commented 1 year ago

When testing 1.6.0-rc.6 with different screen sizes/resolutions, things look good with mac + safari/chrome/firefox. @KatieWoe would you mind taking at look at Windows?

KatieWoe commented 1 year ago

Windows 11 Chrome looks ok to me.

Nancy-Salpepi commented 1 year ago

Things look good on the iPad as well. Closing.