-
Notifications
You must be signed in to change notification settings - Fork 6
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
some sims are briefly unresponsive after computer has been idle (Safari) #140
Comments
Assigned to @jonathanolson for testing on Scenery 0.2. If this doesn't resolve it, he should assign to @samreid to explore workarounds. |
@pixelzoom will try this on a desktop Mac, in case this is somehow related to laptop power management. |
I reproduced the problem on my Macbook Air 10.9.4 + Safari 7.0.5, while it was plugged in, using Graphing Lines (master). No problems appear in Energy Skate Park: Basics. |
I tested times for the configuration above (my Macbook Air 10.9.4 + Safari 7.0.5, while it was plugged in, using Graphing Lines (master)) and found the following data points: |
I tested this with scenery/ohtwo branch (on my configuration otherwise as above) and the problem is still there. May be good for @jonathanolson to investigate, but I'm going to look into this as well. Reassigned to @samreid for now. |
With the Web Inspector open but without profiling or recording timeline, the problem goes away. |
If I enable the profiler with a keystroke (Shift+option+command), it "truncates" the long pause time. |
In scenery/master if I set all of the |
I added this line after an event is added to the batch events callbacks: console.log( input.batchedCallbacks.length ); During normal sim usage, this number is between 1-4 or so. During the error occurrence, I saw this in the console.
This seems related to the problem. |
I published a gist here that shows the event as a function of time: When the user tries to interact with the sim (in this case around 111 sec) the addBatchedEvent starts adding up. Then around 113 sec they stop adding up and there is a 5 second pause. At 118 sec it invokes all of the callbacks. |
Just a reminder that we could try some sort of "heartbeat" workaround to keep the sim alive when it is not in use. |
Reopening. There is a bug with VoiceOver in Safari that causes the virtual cursor to move to the heartbeat div when the innerHTML changes. Found in phetsims/john-travoltage#235. Adding |
Supported Apple platforms as of 5/1/17
A check means it was tested without the heartbeat div and did not exhibit this issue. |
Was not able to reproduce on blackbody spectrum. Either the rc or on master. |
@KatieWoe and I met to try get information out of the developer tool "timeline" but we could not see the bug when the developer tools were open. Here is a summary in order of what we tried, all tests were with blackbody-spectrum off of master, using Jordan 10.14 partition.
After the first three tests, we thought that that this indicated a11y was the cause. But the following tests make this seem random. EDIT: Since this shows up unpredictably, I tried again several times to reproduce this issue on Dirac with ohms-law, with and without a11y, with and without dev tools open. I couldn't get it to happen. |
Adding developer meeting label in case anyone else has ideas for what to try next. Also assigning to @ariel-phet so he is aware of this issue and to confirm that this is a priority that needs to be worked on further. |
Does the "classic" style heartbeat div fix the issue? (Not that we would go back to it). There could be something visual that Scenery changes instead of a div changing. |
This sounds a bit like the delays that we were seeing in phetsims/scenery#621. @samreid will check to see if this is related. |
@jessegreenberg - @jonathanolson and I have a couple of suggestions above, and we discussed in dev meeting and no other immediate ideas came up. Back to you for now. |
I set to integrated graphics card and was still not able to reproduce the problem, even when waiting 2 minutes between interactions. |
Thanks for reviewing all. I am able to see this issue on a macOS Mojave 10.14.5 at https://phet-dev.colorado.edu/html/ohms-law/1.4.0-rc.3/phet/ohms-law_en_phet.html. I will try the "classic" heartbeat div recommended in #140 (comment). I think that means removing UPDATE: I tried moving the div to the body and removing |
I am able to see this very consistently with ?a11y enabled and I am never able to see this without it, so I am pretty convinced this is caused by a11y somehow. I confirmed that even with a11y enabled the problem does not happen when recording with the "Timelines" Safari tool. |
I found two ways to fix this issue in AccessibleSiblingStyle.js: Add
|
I asked @KatieWoe to try to produce the bug with this version with the fix and she could not: https://phet-dev.colorado.edu/html/ohms-law/1.5.0-dev.3/phet/ohms-law_en_phet.html. This issue is fixed again, closing. This was caused by relatively recent changes to AccessibleSiblingStyle so we are confident that no sims have been published with a11y and this issue. |
Reopening. phetsims/scenery#981 identifies why 'fixed' positioning is important for a11y, PDOM elements are positioned relative to the viewport. So we either need to go with the I am going with the z-index solution for now, I don't think it is worth changing our approach since this workaround is available and reasonable. Change made in the following commit, I will verify once more tomorrow that this does actually fix the issue. |
I verified several times on macOS 10.14.5 that this is fixed. |
Affected platform: Mac OS with Safari 7 or 8-beta
To reproduce:
When you do step 4, the sim will be unresponsive for a few seconds. This is a concern because students may not touch their computer for a few minutes while listening to the teacher. And when they resume work with the sim, this interrupts the activity and is disconcerting.
This was first reported in phetsims/graphing-lines#42, but has been demonstrated with other sims. It occurs on Mac OS with Safari 7 and 8-beta. It does NOT occur with all sims, or with Safari on iOS, or with Chrome or Firefox on Mac OS.
See the above issue for details on discussion and prior investigation.
The text was updated successfully, but these errors were encountered: