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

Assertion occurs after completing a level and starting a new one #185

Open
jbphet opened this issue Apr 24, 2018 · 4 comments
Open

Assertion occurs after completing a level and starting a new one #185

jbphet opened this issue Apr 24, 2018 · 4 comments
Labels

Comments

@jbphet
Copy link
Contributor

jbphet commented Apr 24, 2018

If the user plays a level, completes it, then starts a new one, the following assertion occurs:

Assertion failed: challenges should be cleared before starting a new game

As of this writing, the SHA for the master version is 7dd6e27, and this problem is coming from line 190 of BAAGameModel.js.

I believe this problem is closely related to work that was being done on the game in order to instrument it for PhET-iO. That effort is being tracked in #156. The two most relevant commits are f77898e and 55983a7. The problem had to do with making sure that the game challenges were being disposed, but only once, because otherwise something went south with PhET-iO.

I'm going to comment out the assertion so that the game can be played and assign this to @samreid for investigation. It's possible that this may cause some breakage in automated test of the phet-io version.

@jbphet
Copy link
Contributor Author

jbphet commented Apr 24, 2018

By the way, I stumbled on this while working to address phetsims/vegas#68.

@zepumph
Copy link
Member

zepumph commented Jul 6, 2018

The commented out assertion from c85709a seems to have only moved to downstream errors in the phet-io state wrapper. Today @chrisklus and I found an error when completing a level the following error:

Assertion failed: Cannot register two different instances to the same id: buildAnAtom.gameScreen.view.levelCompletedNode.continueButton.textNode.visibleProperty

basically it seems like LevelCompletedNode isn't being disposed correctly.

@zepumph
Copy link
Member

zepumph commented Jul 7, 2018

@chrisklus and I were able to get the LevelCompletedNode and BAARewardNode to be properly disposed when restarting the state to "Choose you level." From here this exposed an error that I think links up pretty well to @jbphet's first comment in the issue:

Assertion failed: Impossible set state:
buildAnAtom.gameScreen.model.challengeSets_0.challenges_0
buildAnAtom.gameScreen.model.challengeSets_0.challenges_0.challengeStateProperty
buildAnAtom.gameScreen.model.challengeSets_0.challenges_0.numSubmissionsProperty

so from here I think we are a bit closer to getting BAA game running in phet-io fuzz, but not yet.

@ariel-phet ariel-phet assigned chrisklus and unassigned samreid Aug 9, 2018
@ariel-phet
Copy link

@samreid does not have time to work on this right now. @chrisklus this seems like a good task for your iO learning, and since this is a @jbphet sim he can help where needed.

@chrisklus chrisklus removed their assignment May 1, 2023
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

5 participants