Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasm error - integer overflow/"Cannot enlarge memory arrays" #106

Open
Pharmhaus-2 opened this issue Apr 14, 2019 · 0 comments
Open

wasm error - integer overflow/"Cannot enlarge memory arrays" #106

Pharmhaus-2 opened this issue Apr 14, 2019 · 0 comments

Comments

@Pharmhaus-2
Copy link

Original Author: DruggedBunny

Been dabbling with wasm after the recent announcement, and my project crashes occasionally.

If you take the current version from GitHub and update Const TERRAIN_SIZE to 1024 in the main file, after a random number of level loads (skip using N), it dies, throwing a JS exception. Can take anywhere from single-figures to a couple of dozen, though happened after ~3 just now...

It doesn't seem to happen with my new size of 256, but I'd seen this before and only just got to trying to recreate.

Testing in latest Firefox on Windows 7 -- just tried it with Debug enabled and I get:

Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value 536870912, (2) compile with -s ALLOW_MEMORY_GROWTH=1 which allows increasing the size at runtime, or (3) if you want malloc to return NULL (0) instead of this abort, compile with -s ABORTING_MALLOC=0
Seems to be during/at end of level loading.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant