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

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

Closed
Nancy-Salpepi opened this issue Feb 4, 2022 · 18 comments
Closed

Comments

@Nancy-Salpepi
Copy link

Test device
MacBook Air (m1 chip)

Operating System
12.0.1

Browser
Safari

Problem description
For phetsims/qa#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
Copy link
Author

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
Copy link
Contributor

KatieWoe commented Feb 4, 2022

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

@arouinfar
Copy link
Contributor

@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.

@arouinfar arouinfar added this to the PhET-iO: DC | Client Preview milestone Feb 7, 2022
@samreid
Copy link
Member

samreid commented Feb 11, 2022

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

image

@samreid samreid assigned arouinfar and unassigned samreid Feb 11, 2022
@Nancy-Salpepi
Copy link
Author

@samreid you need to be on the lab screen.

@samreid samreid assigned samreid and unassigned arouinfar Feb 11, 2022
samreid added a commit that referenced this issue Feb 11, 2022
@samreid
Copy link
Member

samreid commented Feb 11, 2022

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

@samreid
Copy link
Member

samreid commented Feb 11, 2022

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

@Nancy-Salpepi
Copy link
Author

Looks fixed on master.

@KatieWoe
Copy link
Contributor

Reopening as I managed to reproduce this in phetsims/qa#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
Copy link
Contributor

KatieWoe commented Feb 15, 2022

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
Copy link
Member

samreid commented Feb 17, 2022

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

We agreed to move this to the 2nd milestone.

@samreid
Copy link
Member

samreid commented Nov 21, 2022

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

@samreid samreid assigned KatieWoe and unassigned samreid Nov 21, 2022
@KatieWoe
Copy link
Contributor

KatieWoe commented Nov 21, 2022

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
Copy link
Contributor

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.

@KatieWoe KatieWoe assigned samreid and unassigned KatieWoe Nov 21, 2022
samreid added a commit that referenced this issue Nov 22, 2022
@samreid
Copy link
Member

samreid commented Nov 22, 2022

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?

@samreid samreid assigned KatieWoe and unassigned samreid Nov 22, 2022
@KatieWoe
Copy link
Contributor

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

@KatieWoe KatieWoe assigned samreid and unassigned KatieWoe Nov 22, 2022
@matthew-blackman
Copy link

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

@matthew-blackman matthew-blackman assigned KatieWoe and unassigned samreid Nov 28, 2022
@KatieWoe
Copy link
Contributor

I think this can be closed.

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

No branches or pull requests

5 participants