`shutdown` crash site in web sdk

Trying to shutdown deepAR to reuse it on another screen. However, it just crashes.

Uncaught RuntimeError: memory access out of bounds
    at deepar.wasm:0x5003
    at deepar.wasm:0xdb56f
    at deepar.wasm:0x91926
    at deepar.wasm:0x12907b
    at deepar.wasm:0x13bfba
    at r._shutdownEngine (deepar.esm.js:1:1030115)
    at r.shutdown (deepar.esm.js:1:917512)
    at e.shutdown (deepar.esm.js:1:1971250)
    at Object.shutdown (index.ts:62:11)
    at eval (index.tsx:53:28)
    at safelyCallDestroy (react-dom.development.js:22932:1)
    at commitHookEffectListUnmount (react-dom.development.js:23100:1)
    at invokePassiveEffectUnmountInDEV (react-dom.development.js:25207:1)
    at invokeEffectsInDev (react-dom.development.js:27351:1)
    at commitDoubleInvokeEffectsInDEV (react-dom.development.js:27324:1)
    at flushPassiveEffectsImpl (react-dom.development.js:27056:1)
    at flushPassiveEffects (react-dom.development.js:26984:1)
    at commitRootImpl (react-dom.development.js:26935:1)
    at commitRoot (react-dom.development.js:26682:1)
    at performSyncWorkOnRoot (react-dom.development.js:26117:1)
    at flushSyncCallbacks (react-dom.development.js:12042:1)
    at eval (react-dom.development.js:25651:1)

Is it possible to change canvas without reinitializing DeepAR?

Hi, you do typically need to shutdown deepar to reinitialize with a different canvas

Can you check the metadata headers settings (Content-Encoding and Content-Type) for .js, .wasm, model and effect files on your server. This error usually happens on startup, but try checking out the thread dedicated to it

If that doesn’t help, can you share some of your shutdown code so we can check for potential issues?

We use npm package for DeepAR.

node_modules_deepar_js_deepar_esm_js.js has:

content-type: application/javascript; charset=UTF-8
content-encoding: gzip

deepar.wasm has:

content-type: application/wasm
content-encoding: br

And there is no deepar.js in network requests

Thanks for the info we are looking into it

Fixed in recent 5.4.3 version

Could you, please, add CHANGELOG.md for your repo to track changes between versions?

Hi, we have the changelog here

1 Like