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

Too many calls to getContainer() cause an out-of-memory error from Emscripten #25

Open
NyuBlara opened this issue Mar 27, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@NyuBlara
Copy link
Collaborator

NyuBlara commented Mar 27, 2024

The Chronology class's getContainer() accessor returns a reference to the chronology's container. Despite the lightweight nature of references, and even though no allocation takes place, running the library in some environments, such as Emscripten, will, after too many calls to this accessor, raise an out-of-memory error. The following screenshot is from the Web-MFP console :

image

The most likely hypothesis (provided after a discussion with a friend, @CLOVIS-AI) might be that this is actually a stack overflow, reported as an OOM because WebAssembly's memory object is a single buffer containing both stack and heap.

Even so, this gives very few leads as to how to mitigate the issue, since returning a copy of the container would occupy more space and thus lead to an even faster overflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant