-
Notifications
You must be signed in to change notification settings - Fork 5
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
PhET-iO State: support UserMovableModelElement.supportingSurface #424
Comments
There is a new CT error that is now popping up occasionally. The trace is below. It seems like a distinct possibility that the cause of this is that the supporting surface isn't being cleared, so things can essentially get recursively stacked on top of one another.
|
@jbphet and I worked on this today and got to a commit point for instrumenting When we get to this next time, we will want to instrument Also noting though that all actual assertions we hit were because the At one point this was helpful debug code: // Debug code. To use, set phet.preloads.phetio.jb to either 'brick' or 'iron' from the console.
if ( phet.preloads.phetio.queryParameters.frameTitle === 'destination' ) {
if ( window.parent.phet.jb === undefined ) {
window.parent.phet.jb = '';
}
if ( ( window.parent.phet.jb === 'brick' && this.blockType.toString() === 'BRICK' ) ||
( window.parent.phet.jb === 'iron' && this.blockType.toString() === 'IRON' ) ) {
console.log( '-----------------------' );
console.log( `this.id = ${this.id}` );
console.log( `this.blockType = ${this.blockType}` );
const elementOnTopSurface = this.topSurface.elementOnSurfaceProperty.value;
if ( elementOnTopSurface ) {
console.log( `elementOnTopSurface.id = ${elementOnTopSurface.id}` );
console.log( `elementOnTopSurface.blockType = ${elementOnTopSurface.blockType}` );
}
else {
console.log( 'Nothing on top surface.' );
}
window.parent.phet.jb = '';
}
} |
This is being marked as deferred and we will give it more attention when we decide to upgrade this sim to the Hydrogen level of phet-io. |
From #423, HorizontalSurface likely needs to support serialization in some form. We were able to bypass a CT error over there with deep comprison of Vector2s, but we will want supportingSurface to maintain the right pointer through PhET-iO state, even if a lack of this doesn't currently cause behavioral or assertion problems. I am not planning to work on this right now. Marking deferred until next iO release of this sim.
The text was updated successfully, but these errors were encountered: