opendesigndev / octopus

Monorepository for Octopus 3+ converters and related tools
Apache License 2.0
4 stars 7 forks source link

wasm memory error in octopus-psd dependency @opendesign/image-icc-profile-converter #91

Open alexspevak opened 1 year ago

alexspevak commented 1 year ago

After processing new set of 1000 files we found 2 errors which seem to me like wasm memory error. I do not know if I am correct or not, but I have suspicion that this can be fixed in wasm settings by enlarging memory. @scoiatael could have more ideas how to fix this.

error message: Error: Aborted(Cannot enlarge memory arrays to size 2762356976 bytes (OOM). Either (1) compile with -sINITIAL_MEMORY=X with X higher than the current… at h (file:///var/task/node_modules/@opendesign/image-icc-profile-converter/wasm/lcms/build/lcms.mjs:48:429)

Links to failing tasks:

  1. https://kraken-dev.pc.avocode.com/admin/designs/designversion/0f4208e8-9ed5-4963-a911-b0f51b18e2d8/change/
  2. https://kraken-dev.pc.avocode.com/admin/designs/designversion/c9608743-d4cf-4544-aa46-72bf5fb7a62f/change/
scoiatael commented 1 year ago

2762356976 bytes you really think we should allocate more than 2gbytes of memory? ;) There are some changes in C/JS glue code we could do to reduce amount of memory needed, but I definitely wouldn't blindly require more than 2GBs of memory from user :)