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

Runtime error thrown from WASM part when encoding KTX #77

Closed
javagl opened this issue Oct 22, 2023 · 2 comments
Closed

Runtime error thrown from WASM part when encoding KTX #77

javagl opened this issue Oct 22, 2023 · 2 comments

Comments

@javagl
Copy link
Contributor

javagl commented Oct 22, 2023

The KtxUtility class is a thin convenience layer around the BinomialLLC Basis Universal encoder. It mainly offers that function convertImageData, where the caller can throw in some arbitrary image data, and receive the resulting KTX image data. This is hiding all the nitty-gritty bits of (compiling!)/loading/initializing/configuring the underlying WASM module.

When calling this method many (many) times, it eventually causes a RuntimeError to be thrown from the WASM part:

RuntimeError: Aborted(). Build with -sASSERTIONS for more info.

(+ some stack trace into the WASM). The tooling and debugging possibilities around WASM are ... ... ... have a lot of room for improvement. But the observed behavior is a hint at ~"some sort of memory leak".

The WASM module has a delete() function. The documentation of this function is:

/*
 * Just kidding. It is not documented...
 */

But calling this function at the right place and time might resolve this issue.

@javagl
Copy link
Contributor Author

javagl commented Oct 22, 2023

From a quick test, the commit c0315a0 that is part of #75 should fix this issue.

@lilleyse
Copy link
Contributor

Fixed in #75

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

No branches or pull requests

2 participants