Closed jonathanolson closed 8 years ago
@jonathanolson Details? Is this a build or runtime error? With which sim(s)?
The built 'vibe' runnable, with URL /vibe/build/vibe_en.html. Might be tricky to reproduce OR fixed, as I haven't seen this the last few times.
Still failing, Mac OS 10.10.5 + Chrome. This is failing in some sims too (e.g. Ohm's Law), so it's a little concerning. Poking @jbphet.
I just ran the RequireJS version on both Chrome+OSX 10.9.5 and Chrome+Win 7 with fuzzMouse=100
and the failure did not occur, so it may be specific to the built version. I did notice that after roughly ~1/2 hr of the fuzz testing the demo sim would crash with Chrome's "Aw snap..." message, so I should profile and make sure that this isn't leaking memory.
As @jonathanolson said in https://github.com/phetsims/vibe/issues/20#issuecomment-152377434, it's the built version.
Yes, I know, I was just noting that it does not appear to be reproducible on the RequireJS version, and I wanted to record that there may be an issue with leaking memory.
This issue is due to a race condition where the loading of the audio has not completed by the time the fuzz test starts pressing buttons. It only happens right after startup if it happens at all, so running the fuzz test for a long period doesn't help to reproduce it. I've added an if
clause that skips playback if the audio data is not finished loading. I verified this solution by loading the built version a number of times with some additional console logging in place, and could see the instances when the data hadn't yet loaded. This would occur roughly 1 out of 8 loads on a MacBook Air OSX 10.9.5 ("Jordan"). It was less frequent on Win7, but would happen occasionally.
The debug code is now removed, and the automated testing has been run several times for both vibe and ohms-law, and no failures were observed.
Assigning to @pixelzoom to verify.
In Chrome/Win7: