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

Getting Uncaught Error when using Keyboard Navigation around a disabled soccer ball #351

Closed
Tracked by #1138
Ashton-Morris opened this issue Aug 21, 2024 · 7 comments
Labels
status:ready-for-qa type:bug Something isn't working

Comments

@Ashton-Morris
Copy link
Contributor

Test Device
MacBook Pro (16-inch, 2019)

OS
Monterey 12.7.6

Browser
Chrome 127.0.6533.120

Problem Description
Getting an error "Error from sim: Uncaught Error: Assertion failed: reentry detected, value=[object Object], oldValue=[object Object]" when using keyboard navigation in PhET-iO-Studio on the Balance screen.

Steps to Reproduce

  1. Navigate to In studio on Balance Point Screen
  2. Kick the maximum number of balls
  3. Option/Alt click a ball on top (this worked with balls 2 high)
  4. Under that ball deselect the enabledProperty
  5. Use keyboard navigation to move another ball on top of or over the ball that is not enabled
  6. Get a pop up with this error "Error from sim: Uncaught Error: Assertion failed: should not change both the selection and the value when sorting"
  7. If you hit ok and try to use the arrow keys with keyboard navigation again, the same error tends to pop up elsewhere.

Visuals

Kapture.2024-08-21.at.15.03.35.mp4

Screen Shot 2024-08-21 at 2 38 10 PM
Screen Shot 2024-08-21 at 2 43 19 PM

Code from my Console

mean-share-and-balan…yEvents=false:15996 Uncaught 
Error: Assertion failed: should not change both the selection and the value when sorting
    at window.assertions.assertFunction (mean-share-and-balan…nts=false:15996:780)
    at mean-share-and-balan…false:16008:2213478
    at a.notifyLoop (mean-share-and-balan…s=false:16008:31333)
    at a.emit (mean-share-and-balan…s=false:16008:30786)
    at r._notifyListeners (mean-share-and-balan…s=false:16008:23075)
    at r.unguardedSet (mean-share-and-balan…s=false:16008:22440)
    at r.set (mean-share-and-balan…s=false:16008:22244)
    at set value (mean-share-and-balan…s=false:16008:18802)
    at mean-share-and-balan…false:16008:4516154
    at p.notifyLoop (mean-share-and-balan…s=false:16008:31333)
    at p.emit (mean-share-and-balan…s=false:16008:31188)
    at y.emit (mean-share-and-balan…s=false:16008:10119)
    at Sx.reorganizeStack (mean-share-and-balan…false:16008:4458592)
    at mean-share-and-balan…false:16008:4454447
    at a.notifyLoop (mean-share-and-balan…s=false:16008:31333)
    at a.emit (mean-share-and-balan…s=false:16008:30786)
    at nx._notifyListeners (mean-share-and-balan…s=false:16008:23075)
    at nx.unguardedSet (mean-share-and-balan…s=false:16008:22440)
    at nx.set (mean-share-and-balan…s=false:16008:22244)
    at nx.set (mean-share-and-balan…s=false:16008:18859)
@Ashton-Morris Ashton-Morris added the type:bug Something isn't working label Aug 21, 2024
@Nancy-Salpepi
Copy link

tagging phetsims/qa#1137

@Nancy-Salpepi
Copy link

I was also able to reproduce with macOS 14.6.1.

@Nancy-Salpepi
Copy link

This error happens in rc.3. but not in rc.2, although in rc.2 the focus randomly changes between balls when following the above steps.

@KatieWoe
Copy link

I'm not getting this in Win 11 Chrome for some reason.

@KatieWoe
Copy link

With help from @jbphet I was able to reproduce this on Win 11 Chrome. It seems to hinge on two things from what I can tell. First, the ball on top of the 2 stack has to have been kicked after the one on the bottom. Second, the ball moving over the tower and causing the error must have been kicked before the top ball and be coming from the left. Using the dev query parameter can help with the set up. These conditions may not be exact, but hopefully can narrow things down.

@jbphet jbphet assigned jbphet and unassigned marlitas Aug 22, 2024
jbphet referenced this issue in phetsims/soccer-common Aug 22, 2024
@jbphet
Copy link
Contributor

jbphet commented Aug 22, 2024

I tracked down the area of code where the problem was occurring and then enlisted @zepumph to help me figure out what was missing from the RC, since the problem is not reproducible on the main branch. We (mostly he) found what we think was the culprit and I've cherry picked that only the needed branch on soccer-common, and the problem is not longer occurring on that branch. This should be ready for the next round of testing.

@KatieWoe
Copy link

I am no longer able to reproduce this using the steps from #351 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status:ready-for-qa type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants