phetsims / decaf

PhET Java Simulations converted to HTML5 using CheerpJ
1 stars 0 forks source link

Sound fails to load, due to missing N4jass6render12SourcePlayerX #26

Open loganbraywork opened 4 years ago

loganbraywork commented 4 years ago

For https://github.com/phetsims/QA/issues/489 https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/

Sound fails to load in both Chrome and Firefox when tested on a lower performance windows laptop and high performance windows PC.

2020-04-01DecafSound

KatieWoe commented 4 years ago

Likely same as https://github.com/phetsims/decaf/issues/9

loganbraywork commented 4 years ago

Below is the console and errors for the sim in Windows Firefox:

CheerpJ is initializing loader.js:2838:11 unreachable code after return statement loader.js:4:183 unreachable code after return statement loader.js:4:741 unreachable code after return statement loader.js:4:183 unreachable code after return statement loader.js:4:741 unreachable code after return statement loader.js:4:283 unreachable code after return statement loader.js:4:183 unreachable code after return statement loader.js:4:741 unreachable code after return statement loader.js:4:183 unreachable code after return statement loader.js:4:741 unreachable code after return statement loader.js:4:183 unreachable code after return statement loader.js:4:741 unreachable code after return statement loader.js:4:183 unreachable code after return statement loader.js:4:741 unreachable code after return statement loader.js:4:183 unreachable code after return statement loader.js:4:741 unreachable code after return statement loader.js:4:183 unreachable code after return statement loader.js:4:741 Reporting error: ReferenceError: _f4VaNOSEerZaruTnBbsrC6cagrniG7cWTYAsioJassE0 is not defined/N4jass6render12SourcePlayerX@https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:31:318 cjG@https://cjrtnc.leaningtech.com/2.1/loader.js:2553:7 _c4FW9eS_atbDZa$KtdbERtdbNTxn@https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:73:929 _c4FW9eS_atTDZqDpBueQKaYYcWKtu6cagreNThn@https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:69:296 _c4V93edu8colorado4phet5sound4view19WavefrontOscillatorC2E0@https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:707:226 _c4_23edu8colorado4phet5sound11SezWYModuleXXE17@https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:517:6855 N3edu8colorado4phet5sound11SoundModuleX@https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:506:1443 cjG@https://cjrtnc.leaningtech.com/2.1/loader.js:2553:7 N3edu8colorado4phet5sound18SingleSourceModuleX@https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:914:257 cjG@https://cjrtnc.leaningtech.com/2.1/loader.js:2553:7 N3edu8colorado4phet5sound24SingleSourceListenModuleX@https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:639:282 cjG@https://cjrtnc.leaningtech.com/2.1/loader.js:2553:7 anonymous@https://cjrtnc.leaningtech.com/2.1/loader.js line 115 > Function:3:168 runContinuationStack@https://cjrtnc.leaningtech.com/2.1/loader.js:387:10 cheerpjSchedule@https://cjrtnc.leaningtech.com/2.1/loader.js:1110:25 loader.js:3054:10 ReferenceError: _f4VaNOSEerZaruTnBbsrC6cagrniG7cWTYAsioJassE0 is not defined sound_all.jar.js:31:318 N4jass6render12SourcePlayerX https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:31 cjG https://cjrtnc.leaningtech.com/2.1/loader.js:2553 _c4FW9eS_atbDZa$KtdbERtdbNTxn https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:73 _c4FW9eS_atTDZqDpBueQKaYYcWKtu6cagreNThn https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:69 _c4V93edu8colorado4phet5sound4view19WavefrontOscillatorC2E0 https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:707 _c4_23edu8colorado4phet5sound11SezWYModuleXXE17 https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:517 N3edu8colorado4phet5sound11SoundModuleX https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:506 cjG https://cjrtnc.leaningtech.com/2.1/loader.js:2553 N3edu8colorado4phet5sound18SingleSourceModuleX https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:914 cjG https://cjrtnc.leaningtech.com/2.1/loader.js:2553 N3edu8colorado4phet5sound24SingleSourceListenModuleX https://phet-dev.colorado.edu/decaf/sound/1.0.0-dev.2/sound_all.jar.js:639 cjG https://cjrtnc.leaningtech.com/2.1/loader.js:2553 anonymous https://cjrtnc.leaningtech.com/2.1/loader.js line 115 > Function:3 runContinuationStack https://cjrtnc.leaningtech.com/2.1/loader.js:387 cheerpjSchedule https://cjrtnc.leaningtech.com/2.1/loader.js:1110 Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at https://docs.google.com/forms/d/e/1FAIpQLScErDRKZvSy1JAdiRSZfAsjf711VWdSdkczuSYHfIHQbtyFXA/formResponse. (Reason: CORS header ‘Access-Control-Allow-Origin’ missing).

samreid commented 4 years ago

The failure is that this sound player is not supported N4jass6render12SourcePlayerX

samreid commented 4 years ago

I tried commenting out the part that loads the system library and forces to use javasound, but ran into downstream problems.

Index: simulations-java/simulations/sound/src/jass/render/SourcePlayer.java
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
--- simulations-java/simulations/sound/src/jass/render/SourcePlayer.java    (revision 75154)
+++ simulations-java/simulations/sound/src/jass/render/SourcePlayer.java    (date 1589553344874)
@@ -83,6 +83,7 @@
      * @param audioAPI - either "something", or "ASIO".
      */
     public void setUseNativeSound( boolean value, String audioAPI ) {
+        value = false;
         this.useNativeSound = value;
         if( ( audioAPI.equals( "ASIO" ) ) && value == true ) {
             this.audioAPI = audioAPI;
@@ -96,6 +97,7 @@
      * @param value value
      */
     public void setUseNativeSound( boolean value ) {
+        value = false;
         this.useNativeSound = value;
         if( this.useNativeSound == true ) {
             this.audioAPI = "notASIO";
loader.js:401 Uncaught ReferenceError: _f4VaNOSEerZaruTnBbsrC6cagrniG7cWTYAsioJassE0 is not defined
    at N4jass6render12SourcePlayerX (sound_all.jar.js:3189)
    at cjG (loader.js:2553)
    at _c4FW9eS_atbDZa$KtdbERtdbNTxn (sound_all.jar.js:3197)
    at _c4FW9eS_atTDZqDpBueQKaYYcWKtu6cagreNThn (sound_all.jar.js:3194)
    at _c4V93edu8colorado4phet5sound4view19WavefrontOscillatorC2E0 (sound_all.jar.js:2870)
    at _c4_23edu8colorado4phet5sound11SezWYModuleXXE17 (sound_all.jar.js:2598)
    at N3edu8colorado4phet5sound11SoundModuleX (sound_all.jar.js:2594)
    at cjG (loader.js:2553)
    at N3edu8colorado4phet5sound18SingleSourceModuleX (sound_all.jar.js:2532)
    at cjG (loader.js:2553)
samreid commented 3 years ago

I ran into this in https://github.com/phetsims/decaf/issues/128, I'll remove it from the project list for now.