# \`shutdown\` crash site in web sdk

**URL:** <https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412>\
**Category:** Bugs\
**Tags:** web, web-sdk\
**Created:** [September 5, 2023, 7:53am UTC](https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412 "2023-09-05T07:53:21Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Daniil\_Gavrilikhin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/daniil_gavrilikhin/32/587_2.png) [@Daniil\_Gavrilikhin](https://forum.deepar.ai/u/Daniil_Gavrilikhin)\
**Post date:** [September 5, 2023, 7:53am UTC](https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412/1 "2023-09-05T07:53:21Z")

</div>

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

```auto
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)

```

---

<div class="post-metadata">

**Author:** ![Daniil\_Gavrilikhin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/daniil_gavrilikhin/32/587_2.png) [@Daniil\_Gavrilikhin](https://forum.deepar.ai/u/Daniil_Gavrilikhin)\
**Post date:** [September 5, 2023, 7:58am UTC](https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412/2 "2023-09-05T07:58:10Z")

</div>

Is it possible to change `canvas` without reinitializing DeepAR?

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 5, 2023, 3:06pm UTC](https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412/3 "2023-09-05T15:06:49Z")

</div>

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

> [@Web SDK Memory Out Of Bounds exception](https://forum.deepar.ai/t/web-sdk-memory-out-of-bounds-exception/31):
>
> If you get this error while using DeepAR on your domain, you should check the metadata header settings (Content-Encoding and Content-Type) for .js, .wasm, model and effect files on your server. These are explained in the [getting started guide](https://docs.deepar.ai/deepar-sdk/deep-ar-sdk-for-web/getting-started) You can also Inspect your page and compare the metadata headers to one of our [demo examples](https://sdk.developer.deepar.ai/virtualTryOn/index.html). This should make it any mismatches easier to spot.

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

---

<div class="post-metadata">

**Author:** ![Daniil\_Gavrilikhin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/daniil_gavrilikhin/32/587_2.png) [@Daniil\_Gavrilikhin](https://forum.deepar.ai/u/Daniil_Gavrilikhin)\
**Post date:** [September 6, 2023, 7:36am UTC](https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412/4 "2023-09-06T07:36:36Z")

</div>

We use npm package for DeepAR.

`node_modules_deepar_js_deepar_esm_js.js` has:

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

```

`deepar.wasm` has:

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

```

And there is no `deepar.js` in network requests

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 8, 2023, 12:11pm UTC](https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412/5 "2023-09-08T12:11:07Z")

</div>

Thanks for the info we are looking into it

---

<div class="post-metadata">

**Author:** ![Daniil\_Gavrilikhin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/daniil_gavrilikhin/32/587_2.png) [@Daniil\_Gavrilikhin](https://forum.deepar.ai/u/Daniil_Gavrilikhin)\
**Post date:** [September 25, 2023, 4:55am UTC](https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412/6 "2023-09-25T04:55:05Z")

</div>

Fixed in recent `5.4.3` version

---

<div class="post-metadata">

**Author:** ![Daniil\_Gavrilikhin](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/daniil_gavrilikhin/32/587_2.png) [@Daniil\_Gavrilikhin](https://forum.deepar.ai/u/Daniil_Gavrilikhin)\
**Post date:** [September 25, 2023, 4:56am UTC](https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412/7 "2023-09-25T04:56:15Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![jelena](https://dub1.discourse-cdn.com/flex017/user_avatar/forum.deepar.ai/jelena/32/14_2.png) [@jelena](https://forum.deepar.ai/u/jelena)\
**Post date:** [September 25, 2023, 2:47pm UTC](https://forum.deepar.ai/t/shutdown-crash-site-in-web-sdk/412/8 "2023-09-25T14:47:53Z")

</div>

Hi, we have the changelog here

> **[Changelog | DeepAR](https://docs.deepar.ai/deepar-sdk/deep-ar-sdk-for-web/changelog/)**
>
> Web SDK version changelog
