Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Redirected IR Wave Flashes when Greenhouse Gas Levels Change #401

Closed
Tracked by #1086
Nancy-Salpepi opened this issue Apr 27, 2024 · 8 comments
Closed
Tracked by #1086

Redirected IR Wave Flashes when Greenhouse Gas Levels Change #401

Nancy-Salpepi opened this issue Apr 27, 2024 · 8 comments
Labels

Comments

@Nancy-Salpepi
Copy link

Test device
MacBook Air M1 chip

Operating System
14.4.1

Browser
Safari and Chrome

Problem description

For phetsims/qa#1080 and seen in published, on the Waves Screen the center IR wave redirecting back to the surface will flash when increasing greenhouse gas levels from None to Lots.
It is easier to see this using keyboard navigation but happens with the mouse as well.

Not sure if this falls in the "artifacts" category that was discussed in #84.

Steps to reproduce

  1. On the Waves Screen, press Start Sunlight
  2. With keyboard nav, move the Greenhouse Gas slider to None
  3. With keyboard nav, move the slider to Lots --keeping an eye on the center IR wave redirecting back to the surface

Visuals

irWaveFlashes.mp4
@Nancy-Salpepi Nancy-Salpepi added the type:bug Something isn't working label Apr 27, 2024
@arouinfar
Copy link
Contributor

Good find @Nancy-Salpepi.

The flickering looks a bit odd, but I don't think it's particularly harmful. @jbphet if there's not a clear solution, I'm fine with closing as wont-fix.

@jbphet
Copy link
Contributor

jbphet commented May 8, 2024

The problematic behavior was due to the intensity changes that are tracked on each wave getting a little out of order. I believe I've corrected this.

@Nancy-Salpepi - Could you please test this on main? I'd like to verify that it's fixed on whatever platforms and in whatever use cases you were using.

@jbphet jbphet assigned Nancy-Salpepi and unassigned jbphet May 8, 2024
@samreid
Copy link
Member

samreid commented May 9, 2024

I observed that CT indicated 86d9389 caused this error:

greenhouse-effect : migration : 1.2->main : assert
http://128.138.93.172/continuous-testing/ct-snapshots/1715204138894/phet-io-wrappers/migration/?sim=greenhouse-effect&oldVersion=1.2&phetioMigrationReport=assert&locales=*&phetioDebug=true&phetioWrapperDebug=true&fuzz&migrationRate=5000&&wrapperContinuousTest=%7B%22test%22%3A%5B%22greenhouse-effect%22%2C%22migration%22%2C%221.2-%3Emain%22%2C%22assert%22%5D%2C%22snapshotName%22%3A%22snapshot-1715204138894%22%2C%22timestamp%22%3A1715205857681%7D
Uncaught TypeError: this.intensityChanges.updateOrder is not a function
TypeError: this.intensityChanges.updateOrder is not a function
at updateOrder (Wave.ts:285:26)
at step (WavesModel.ts:188:41)
at Array.forEach
at forEach (PhetioGroup.ts:183:65)
at forEach (WavesModel.ts:188:19)
at stepModel (GreenhouseEffectModel.ts:74:11)
at step (Sim.ts:432:21)
at apply (PhetioAction.ts:162:16)
at execute (Sim.ts:1048:30)
at stepSimulation (Sim.ts:1038:11)
image image

jbphet added a commit that referenced this issue May 9, 2024
@jbphet
Copy link
Contributor

jbphet commented May 9, 2024

Thanks @samreid. This error is due to some phet-io complications with some changes that I made that I felt would improve the maintainability of this code and prevent problems like this from creeping in again. However, my changes create a new type, which has to be handled in phet-io, and because this new type extends Array, I wasn't at all sure how to handle it in phet-io. I was also concerned that it would also create migration problems. So, I'm just going back to a simpler solution and hope that future developers see and adhere to the documentation about maintaining the order of the intensity changes.

@Nancy-Salpepi - assuming CT clears up, this is ready for you to test as described above.

@jbphet jbphet removed their assignment May 9, 2024
@Nancy-Salpepi
Copy link
Author

Looks fixed on main.
Not sure if I should close or not, so assigning back to you @jbphet.

@jbphet
Copy link
Contributor

jbphet commented May 13, 2024

I'll leave it open and have it double-checked during the next RC test.

@jbphet jbphet removed their assignment May 13, 2024
@jbphet
Copy link
Contributor

jbphet commented May 13, 2024

This issue can and should be closed once verified by QA on an RC version.

@Nancy-Salpepi
Copy link
Author

Looks good in 1.3.0-rc.1! Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants