Closed brooklynlash closed 4 years ago
Managed to reproduce this on Mac 10.15.7 Chrome and noting that when speeds get this high there is a massive amount of slowdown.
Also noting that step 8:
Change masses of disappeared balls
brings back the balls even if they have left in a non-buggy manner. @arouinfar, @jonathanolson not sure if this is buggy behavior in itself. Let me know if it needs an issue.
I'm curious about what should be done for the increasing energy in the system. The main issue definitely happens mainly at higher energies, but it's possible to continue increasing them until the sim breaks due to overflow:
It also seems to be related to "resizing a mass while it's close to a border", otherwise I wouldn't be able to get to such high velocities.
Since things will break anyway at high-enough velocities, what should we do about the general problem?
brings back the balls even if they have left in a non-buggy manner
It seems like if the mass is already outside of the boundary, we shouldn't push it back in the boundary? Thoughts @arouinfar on everything?
Also, this has taken a lot of debugging effort, and I'm still not quite sure why it's happening. Happy to continue though.
To ease reproduction of increasing energy, the following in stepManual:
// const bestBall = _.sortBy( this.ballSystem.balls, b => -b.velocityProperty.value.magnitude )[ 0 ];
// this.ballSystem.balls.forEach( ball => {
// if ( bestBall === ball && ball.massProperty.value !== 3 ) {
// console.log( 'set high' );
// ball.massUserControlledProperty.value = true;
// ball.massProperty.value = 3;
// this.ballSystem.bumpBallAwayFromOthers( ball );
// ball.massUserControlledProperty.value = false;
// }
// else if ( bestBall !== ball && ball.massProperty.value !== 0.1 ) {
// console.log( 'set low' );
// ball.massUserControlledProperty.value = true;
// ball.massProperty.value = 0.1;
// ball.massUserControlledProperty.value = false;
// }
// } );
Design decision: do nothing, it's worked well in other sims in cases like this.
Test device Lenovo ThinkPad
Operating System Windows 10
Browser Chrome
Problem description This is for https://github.com/phetsims/QA/issues/562 When observing the problem created in https://github.com/phetsims/collision-lab/issues/176, when the kinetic energy gets to a certain level and you add extra masses to the space, they end up disappearing off screen. If you change their masses, they appear for a few seconds and then fly off screen again. Eventually there is usually only one mass left on the screen.
Steps to reproduce
Visuals
Troubleshooting information: !!!!! DO NOT EDIT !!!!! Name: Collision Lab URL: https://phet-dev.colorado.edu/html/collision-lab/1.1.0-dev.10/phet/collision-lab_all_phet.html Version: 1.1.0-dev.10 2020-10-15 01:57:00 UTC Features missing: applicationcache, applicationcache, touch Flags: pixelRatioScaling User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/86.0.4240.75 Safari/537.36 Language: en-US Window: 1707x818 Pixel Ratio: 2.25/1 WebGL: WebGL 1.0 (OpenGL ES 2.0 Chromium) GLSL: WebGL GLSL ES 1.0 (OpenGL ES GLSL ES 1.0 Chromium) Vendor: WebKit (WebKit WebGL) Vertex: attribs: 16 varying: 30 uniform: 4095 Texture: size: 16384 imageUnits: 16 (vertex: 16, combined: 32) Max viewport: 32767x32767 OES_texture_float: true Dependencies JSON: {}