Skip to content

Uncaught (in promise) TypeError: Cannot convert 1623120 to a BigInt When -sEMULATE_FUNCTION_POINTER_CASTS Is Used #110

@kala7a

Description

@kala7a

I observe following error when I try to use -sEMULATE_FUNCTION_POINTER_CASTS linker option when building with gst.wasm

Initially I observed it in internal project that was using this flag once we intergrated gst.wasm inside
But issue seems to happen also with gst.wasm examples if we add the flag:
I've put the flag in this example:

diff --git a/gst.wasm/subprojects/samples/codecs/meson.build b/gst.wasm/subprojects/samples/codecs/meson.build
index 23bb276..c744719 100644
--- a/gst.wasm/subprojects/samples/codecs/meson.build
+++ b/gst.wasm/subprojects/samples/codecs/meson.build
@@ -19,7 +19,8 @@ executable(executable_name,
       # This is giving problems when running the WebRunner at set_format (RDI-2850)
       '-sPROXY_TO_PTHREAD',
       '-lGL',
-      '-sOFFSCREENCANVAS_SUPPORT'
+      '-sOFFSCREENCANVAS_SUPPORT',
+      '-sEMULATE_FUNCTION_POINTER_CASTS'
     ],
     name_suffix: 'js',
     install: true,
codecs-example.js:1 Uncaught (in promise) TypeError: Cannot convert 1623120 to a BigInt
    at ffi_call_js (codecs-example.js:1:237206)
    at codecs-example.wasm:0x60e012
    at codecs-example.wasm:0x3603b1
    at codecs-example.wasm:0x60e868
    at codecs-example.wasm:0x367132
    at codecs-example.wasm:0x1eef4
    at codecs-example.wasm:0x23df44
    at codecs-example.wasm:0x533cda
    at codecs-example.wasm:0x380433
    at codecs-example.wasm:0x7e6c7

I see also that this EMULATE_FUNCTION_POINTER_CASTS flag is marked deprecated so I have to analyze how to remove it from our internal project.

But might be also something fixable on gst.wasm side?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions