phetsims / circuit-construction-kit-common

"Circuit Construction Kit: Basics" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
10 stars 10 forks source link

voltage number control not working properly in Studio and State Wrappers #840

Closed Nancy-Salpepi closed 1 year ago

Nancy-Salpepi commented 2 years ago

Test device MacBook Air (m1 chip)

Operating System 12.0.1

Browser Safari

Problem description For https://github.com/phetsims/qa/issues/772 in the lab screen only:

In State: After building a circuit, clicking on the battery causes the voltage to change in the downstream sim. Changing the voltage in the upstream sim doesn't change the voltage in the downstream sim unless you are in the 100-120V range.

Steps to reproduce In State:

  1. Go to the lab screen
  2. Build a simple circuit (switch, battery, bulb) and close switch
  3. Attach ammeter (either kind) and voltmeter
  4. Click on the battery-- The voltage will read 100V in downstream sim
  5. Change voltage using slider or increment/decrement buttons--the slider will not move and the voltage will not change in the downstream sim until the 100-120V range

In Studio:

  1. Go to the lab screen
  2. Build a simple circuit (switch, battery, bulb) and close switch
  3. Attach ammeter (either kind) and voltmeter
  4. Click on the battery
  5. Launch sim--The voltage will read 100V If the sim is launched without the battery selected, the voltage reading is correct.

Visuals battery

batterystudio

Nancy-Salpepi commented 2 years ago

The same thing seems to be happening with resistors (both types) and lightbulbs (both types) on the lab screen in both studio and state. As with the battery, if the resistor or lightbulb is not selected when the sim is launched, it launches properly. resistors

KatieWoe commented 2 years ago

I'm also reproducing this by flipping the battery around and launching the sim in the lab screen. 9to100

arouinfar commented 2 years ago

@samreid this looks like a bug that can negatively impact the client's usage. I recommend we try fixing this before sending the client another version, but if that's not feasible it should be documented as a known bug.

samreid commented 2 years ago

@arouinfar can you reproduce this bug? I set up this case and saw that the value was transmitted properly:

image
Nancy-Salpepi commented 2 years ago

@samreid you need to be on the lab screen.

samreid commented 2 years ago

Thanks, that helped me reproduce and correct the problem. Ready for next round of testing.

samreid commented 2 years ago

Can you please test/review this on master using phettest? Please close if it seems corrected.

Nancy-Salpepi commented 2 years ago

Looks fixed on master.

KatieWoe commented 2 years ago

Reopening as I managed to reproduce this in https://github.com/phetsims/qa/issues/774. It was seen with the bill, eraser, hand, and dog. It also happened in the intro screen as well as the lab screen. It could be seen if there was a circuit, or, more easily, if values were on.

money hand dog eraser
KatieWoe commented 2 years ago

This may also happen with the non-ohmic bulb at high resistance. The value in the gif bellow seems to stutter each time state is set before going to the correct value. (May be a bit hard to see in the gif) stutternumber

samreid commented 2 years ago

Is there an uninstrumented property in the realistic bulb that has a correction step?

We agreed to move this to the 2nd milestone.

samreid commented 1 year ago

@matthew-blackman and I tested this behavior, we were able to recreate the buggy behavior on the dev version listed in https://github.com/phetsims/qa/issues/774, but not in the current state of master. @KatieWoe can you please double check on phettest? Please close if all is well.

KatieWoe commented 1 year ago

Something froze the downstream sim while I was attempting to test this:

notest

It seems to happen when trying to take the ammeter out of the toolbox

KatieWoe commented 1 year ago

The non-ohmic bulb now seems to read 1000 ohms no matter what the current, making that aspect hard to test. The rest of the objects (dog, etc.) seem to be fixed.

samreid commented 1 year ago

I fixed the ammeter problem. I'm also seeing varying values in the non-ohmic bulb

image

Can you please specify how to reproduce the problem?

KatieWoe commented 1 year ago

I was mixing up bulbs in my previous testing, sorry. The non-ohmic bulb looks ok.

matthew-blackman commented 1 year ago

@KatieWoe are there any remaining issues with the ohmic bulb, or can we close this issue?

KatieWoe commented 1 year ago

I think this can be closed.