Hi, I have compiled Csound to a javascript library, it runs fine until it calls its deinitialise opcode function and I get this error:
uncaught exception: abort() at jsStackTrace@http://0.0.0.0:8000/javascripts/libcsound.js:978:13 stackTrace@http://0.0.0.0:8000/javascripts/libcsound.js:995:22 abort@http://0.0.0.0:8000/javascripts/libcsound.js:623651:25 nullFunc_iii@http://0.0.0.0:8000/javascripts/libcsound.js:8163:1498 b22220@http://0.0.0.0:8000/javascripts/libcsound.js:596343:49 _csoundDeinitialiseOpcodes@http://0.0.0.0:8000/javascripts/libcsound.js:50608:12 _deact@http://0.0.0.0:8000/javascripts/libcsound.js:88727:4 _xturnoff@http://0.0.0.0:8000/javascripts/libcsound.js:88658:3 _xturnoff_now@http://0.0.0.0:8000/javascripts/libcsound.js:87742:2 _csoundCleanup@http://0.0.0.0:8000/javascripts/libcsound.js:9797:6 _CsoundObj_reset@http://0.0.0.0:8000/javascripts/libcsound.js:9026:3 asm._CsoundObj_reset@http://0.0.0.0:8000/javascripts/libcsound.js:621675:10 CsoundObj/this.start/audioProcessNode.onaudioprocess@http://0.0.0.0:8000/javascripts/CsoundObj.js:80:5 "processing" CsoundObj.js:72 "Csound: B 0.000 .. 1.000 T 0.998 TT 0.998 M: 0.19998 0.19998" libcsound.js:125 "Csound: Score finished in csoundPerformKsmps()." libcsound.js:125 "Invalid function pointer '0' called with signature 'iii'. Perhaps this is an invalid value (e.g. caused by calling a virtual method on a NULL pointer)? Or calling a function with an incorrect type, which will fail? (it is worth building your source files with -Werror (warnings are errors), as warnings can indicate undefined behavior which can cause this)" libcsound.js:128 "This pointer might make sense in another type signature: ii: 0 iiii: 0 iiid: 0 i: 0 iiiii: 0 iiiiii: 0 iiiiiiii: 0 iiiiiiiii: 0 iiiiiiiiii: 0 iiiiiiiiiii: 0 iiiiiiiiiidii: 0 diii: 0 viii: 0 vii: 0 iid: 0 dii: 0 vi: 0 di: 0 viiid: 0 viiii: 0 vid: 0 ddi: 0 did: 0 viiiii: 0 v: 0 viiiiid: 0 viiiiiii: 0 “ This looks like it is related to function pointer casting, csounds 'deinitialise opcodes' function does seem to cast each individual opcodes deinit function to call it. It says on the emscripten website that there are a number of ways to approach fixing this problem, other than refactoring it says you can compile with EMULATE_FUNCTION_POINTER_CASTS, unfortunately this does not seem to be an option any more. Is there any other way of fixing this without rewriting code? Thanks Ed -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
