After fixing the raw pointer issue I asked about in another thread, a new problem has cropped up. Whenever my app tries to call a native function on the created module I get the subject error.
Here is a typical stack trace
Uncaught (in promise) TypeError: handle is undefined
__emval_get_property http://192.168.50.139:8080/libktx.js:7
anonymous http://192.168.50.139:8080/libktx.js line 7 > Function:9
testCreate http://192.168.50.139:8080/libktx-webgl/libktx-test.js:802
I am using -sMODULARIZE and I instantiate the module with
createKtxModule({preinitializedWebGLContext: gl}).then(instance => {
window.ktx = instance;
// Make existing WebGL context current for Emscripten OpenGL.
ktx.GL.makeContextCurrent(
ktx.GL.createContext(document.getElementById("glcanvas"),
{ majorVersion: 2.0 })
);
main()
});
where createKtxModule is the export name. That call to
ktx.GL.makeContextCurrent is working but I suppose that is not a native
function.
Everything was working on 4.0.7.
I read https://emscripten.org/docs/compiling/Modularized-Output.html but can’t
see any change required when continuing to use -sMODULARIZE.
Does anyone know how to fix this?
I am horrified by the number of breakages these supposedly minor patch releases
(4.0.8 and 4.0.9) have caused in my code. I have spent 2 days on fixes so far.
--
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].
To view this discussion visit
https://groups.google.com/d/msgid/emscripten-discuss/AEC5B023-EDF3-48E3-9F5F-70B9C6C454DB%40callow.im.
signature.asc
Description: Message signed with OpenPGP
