I receive a Run error* for a large WASM Ap because of too large of a constant Array[0…236, 0…2] of String. Reducing the number of strings to 216 solves the problem. No string is large, just names of City, State, & County.

It appears to be a memory problem with run error “local count too large” since it is only memory going from a table size of 236 to 216.

Is this a problem with the way WASM stores Strings or would it apply to any vars, say too many integers?

WASM does not support Ansistring which would reduce the memory footprint by 2 & probably solve the problem for now. Does anyone have a class I could include to support Ansistrings to try it?

If I have a String-memory problem but would not have a byte/integer memory problem can I can solve it by encoding my strings as bytes & convert to Strings for display?

*Run Time Error Msg:
Uncaught (in promise) CompileError: WebAssembly.instantiate(): Compiling function #5922:“ms_t16_AIANFPA285_1AIANFPA2858__d_cctor” failed:
local count too large @+2687485

Thanks for any help


–texstrong text

One way to find out :wink:

I don’t think that’s the roper solution here, but:

…that would be one way to do it, yes, use the Encoding class to get, say UTF-8 byte representation of the strings for storage, and expand them back to (wide)strings for display purposes.

That said, 700 (short-ish) strings don’t sound like it should be too much memory-wise, so this might be a genuine bug worth investigating. Any chance you could send us a simple test case that illustrates this so we can have a look?