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

CT: Assertion failed: cannot start a drag when already userControlled #195

Closed
zepumph opened this issue Apr 10, 2024 · 2 comments
Closed
Assignees

Comments

@zepumph
Copy link
Member

zepumph commented Apr 10, 2024

No description provided.

@zepumph zepumph closed this as completed Apr 10, 2024
@zepumph zepumph reopened this Apr 10, 2024
@zepumph zepumph self-assigned this Apr 10, 2024
zepumph added a commit to phetsims/density-buoyancy-common that referenced this issue Apr 10, 2024
zepumph added a commit that referenced this issue Apr 10, 2024
@zepumph zepumph closed this as completed Apr 12, 2024
@jessegreenberg
Copy link
Contributor

jessegreenberg commented Apr 25, 2024

I started seeing this with ?fuzzBoard during phetsims/scenery#1570. But I think it may be an issue with how Masses are reset. Here is what I am seeing:

  1. MassView.focusablePath has a focus listener that calls mass.start. This sets userControlledProperty to true. The path receives focus.
  2. Somehow (maybe the ResetAllButton) calls Mass.reset and sets the userControlledProperty to false.
  3. Then, the MassView.focusablePath gets a blur event. There is a blur event listener that tries to call mass.endDrag. Since userControlledProperty.value has been reset, this causes the assertion.

If the order of operations with KeyboardDragListener seems wrong, let me know and I would be happy to keep looking.

zepumph added a commit to phetsims/density-buoyancy-common that referenced this issue Apr 25, 2024
@zepumph
Copy link
Member Author

zepumph commented Apr 25, 2024

Ahh goodness, sorry that I made you investigate. This is totally on my side. I'm not really sure how this code path is occurring, but I'm thinking it is just because of how keyboard fuzzing is applying many keyboard events in the same frame. I added grace above and I cannot reproduce now. Closing

@zepumph zepumph closed this as completed Apr 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants