Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error initializing custom build #163

Open
MattFerraro opened this issue Aug 12, 2022 · 2 comments
Open

Error initializing custom build #163

MattFerraro opened this issue Aug 12, 2022 · 2 comments

Comments

@MattFerraro
Copy link
Contributor

I followed the instructions here for building my own custom build, but I used the build definition given here.

The build went fine, but then when I go to use it:

import initOpenCascade from "opencascade.js"
import opencascade from './customBuild/customBuild.examples.js';
import opencascadeWasm from './customBuild/customBuild.examples.wasm';

initOpenCascade({
      mainJs: opencascade,
      mainWasm: opencascadeWasm,
    }).then((newOC) => {
      console.log("wasm is initialized!")
    })

The console shows me an error:

Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'buffer')
    at receiveInstance (opencascade.full.js:9:1)
    at receiveInstantiationResult (opencascade.full.js:9:1)

Expected behavior is that opencascade initializes properly. It does init properly if I omit my custom mainJs and mainWasm, it just takes 5 seconds or so, hence my need for a custom build.

@martinRenou
Copy link

martinRenou commented Nov 14, 2023

@MattFerraro I can reproduce this error when using - -sDISABLE_EXCEPTION_CATCHING=0 in the custom build emccFlags, when setting this to -sDISABLE_EXCEPTION_CATCHING=1 it does work. I'm unsure what is going on though.

@ketanvariya
Copy link

Hello @MattFerraro,
Have you been able to resolve this problem?

The same error is appearing for me on the same line.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants