When putting in very long strings (larger than around 1MB) into text input fields (Molfile, InChI/AuxInfo, RXN/RD file, RInChI and RAuxInfo fields) the Wasm module call drops a RuntimeError with the message:
- in Firefox: index out of bounds
- in Chromium: memory access out of bounds
In further function calls the Wasm module stays unresponsive dropping the same exception, thus the application is not usable anymore. All Wasm modules (the two InChI modules and the RInChI module) are loaded when the page loads, so the only way to get a usable application back is to reload the page.
What doesn't help is to build the Wasm module with the ALLOW_MEMORY_GROWTH linker flag.
What can help is to build the Wasm module with a bigger stack size. The linker flag STACK_SIZE is set to 1 MB at the moment, so that explains my "larger than around 1MB". According to Emscripten's documentation JavaScript strings are passed via the C stack (see note in ccall documentation and implementation).
Needs more investigation ...
When putting in very long strings (larger than around 1MB) into text input fields (Molfile, InChI/AuxInfo, RXN/RD file, RInChI and RAuxInfo fields) the Wasm module call drops a RuntimeError with the message:
In further function calls the Wasm module stays unresponsive dropping the same exception, thus the application is not usable anymore. All Wasm modules (the two InChI modules and the RInChI module) are loaded when the page loads, so the only way to get a usable application back is to reload the page.
What doesn't help is to build the Wasm module with the
ALLOW_MEMORY_GROWTHlinker flag.What can help is to build the Wasm module with a bigger stack size. The linker flag
STACK_SIZEis set to 1 MB at the moment, so that explains my "larger than around 1MB". According to Emscripten's documentation JavaScript strings are passed via the C stack (see note inccalldocumentation and implementation).Needs more investigation ...