Comments (3)
This is going to be hard to diagnose without more information about the usage.
The Yoga wasm binary allows heap growth (
yoga/javascript/CMakeLists.txt
Line 37 in 58aa090
Without knowing more, out of memory seems like the consuming library might not be freeing resources, or that there is an irregularly large tree.
from yoga.
Not sure if this is relevant, but in my (browser based) benchmarking scripts where I was constructing, measuring and then destructing Yoga trees in a loop, I was hitting a similar crash. It took quite high iteration count (>10000) to hit it, but it was with a script that in theory shouldn't have increased heap size at all. This also occurred with a similar Taffy-based benchmark at similar iteration counts.
It could perhaps be due to heap fragmentation? Or immaturity of WASM implementations? Although I must admit that I haven't investigated this thoroughly enough to rule out user error.
As a workaround, if this is only occurring after repeated PDF generation, then you could try the following steps (in order):
- Catch the exception
- Deinitialise the WASM module
- Reinitialise the WASM module
- Retry your call into Yoga
from yoga.
Related Issues (20)
- wasm-sync file index error in package.json HOT 2
- [website-next] Replace Yoga Node Editor with `@theme/CodeBlock` HOT 8
- Add `YGNodeStyleSet<Property>CSS` for CSS values as strings HOT 1
- Add `yoga::Style::resolve()` for ahead-of-time computed whole style HOT 2
- Try using explicit modulemap in CocoaPods build HOT 1
- Typo in recent module.modulemap change that breaks Swift PM-based builds HOT 1
- [JS] Move from embind to manual bindings HOT 1
- Flex shorthand in UseWebDefaults should set basis to 0 instead of auto HOT 3
- React Native iOS build failed HOT 1
- top position is wrong when previous item's height is 0.5, on 3x scale screen HOT 1
- API proposal to get the computed measure size of a node HOT 9
- Proposal: Integrate with google/oss-fuzz for continuous fuzz testing? HOT 9
- Can a Yoga Node have multiple owners? HOT 3
- [JS] Reduce WASM call overhead HOT 6
- Add App Privacy Manifest? HOT 1
- `flexBasis` doesn't recalculate when rotating the screen HOT 1
- __dirname is not defined in ES module scope HOT 3
- Why can't we round node width/height directly in roundLayoutResultsToPixelGrid()? HOT 3
- The typescript definitions link in the standalone documentation is incorrect HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from yoga.