Comments (14)
Example 1: jrouwe/JoltPhysics#929
Example 2: jrouwe/JoltPhysics#952
from emscripten.
There are no known issues in that area. To investigate this we'd need a small testcase.
However, first thing I would try some debug tools that can catch common errors, like sanitizers. Some compiler settings can help too.
from emscripten.
Are you suggesting running the program with a sanitizer in the browser?
I don't think it will help anyway.
I'll make a test case for you. I'm pretty sure it's not a problem with my c++ code or Jolt's C++ code btw, it's most likely an emscripten problem.
from emscripten.
A test would be great, the smaller the better.
We do have a lot of tests for basic usage of threads and atomics, including with memory growth, but you could be using something in a way that we don't have coverage for yet.
Can you share the full set of link flags you are using?
If possible, can you narrow down the those flags to just ones needed to reproduce crash? For example can you confirm for sure if removing memory growth makes the problem go away?
What kind of atomics are you using? e.g. are you using basic C _Atomic
or something higher level?
from emscripten.
Are you suggesting running the program with a sanitizer in the browser?
Yes, that is what I was suggesting. It's usually very simple to do, just add -fsanitize=address
for example in your compile and link stages, and then run the application normally. Sanitizer errors then show up in the dev console. It's a quick and easy way to make sure there is no memory corruption.
from emscripten.
Are you suggesting running the program with a sanitizer in the browser?
Yes, that is what I was suggesting. It's usually very simple to do, just add
-fsanitize=address
for example in your compile and link stages, and then run the application normally. Sanitizer errors then show up in the dev console. It's a quick and easy way to make sure there is no memory corruption.
Nice idea but address sanitizer is just running out of memory:
==42==ERROR: AddressSanitizer: out of memory: allocator is trying to allocate 0x295800 bytes
from emscripten.
Actually what I am seeing now with memory growth is table index out of bounds errors, for example:
gui_client.js:2908 Uncaught RuntimeError: table index is out of bounds
at gui_client.wasm.__cxxabiv1::scan_eh_tab(/__cxxabiv1::(anonymous namespace)::scan_results&, _Unwind_Action, bool, _Unwind_Exception*, _Unwind_Context*) (http://localhost/webclient/gui_client.wasm)
at gui_client.wasm.__gxx_personality_wasm0 (gui_client.wasm:0x56ae1d)
at gui_client.wasm._Unwind_CallPersonality (gui_client.wasm:0x56b60f)
at gui_client.wasm.OpenGLEngine::getProgramWithFallbackOnError(/ProgramKey const&) (http://localhost/webclient/gui_client.wasm)
at gui_client.wasm.OpenGLEngine::assignShaderProgToMaterial(/OpenGLMaterial&, bool, bool, bool, bool) (http://localhost/webclient/gui_client.wasm)
at gui_client.wasm.OpenGLEngine::buildObjectData(/Reference<GLObject> const&) (http://localhost/webclient/gui_client.wasm)
at gui_client.wasm.OpenGLEngine::addObject(/Reference<GLObject> const&) (http://localhost/webclient/gui_client.wasm)
at gui_client.wasm.GUIClient::loadPresentObjectGraphicsAndPhysicsModels(/WorldObject*, Reference<MeshData> const&, Reference<PhysicsShapeData> const&, int, int) (http://localhost/webclient/gui_client.wasm)
at gui_client.wasm.GUIClient::loadModelForObject(/WorldObject*) (http://localhost/webclient/gui_client.wasm)
at gui_client.wasm.GUIClient::checkForLODChanges(/) (http://localhost/webclient/gui_client.wasm)
from emscripten.
Actually all kinds of errors, when memory growth is enabled:
gui_client.js:2908 Uncaught RuntimeError: memory access out of bounds
(None of which happen without memory growth)
from emscripten.
I haven't manage to write a simple test case yet. Not sure what the magic ingredient is that is needed.
from emscripten.
Related Issues (20)
- loading-workers error HOT 2
- emprofile generates an HTML with a syntax error HOT 1
- WebGPU: Missing enumeration(s) in WGPUBlendFactor compared to Dawn HOT 1
- SAFE_HEAP should default maximum memory to 1 block less than 2GB HOT 4
- Uncaught TypeError: Failed to execute 'uniform4fv' on 'WebGL2RenderingContext': Overload resolution failed. HOT 9
- /dev/zero is missing HOT 1
- undefined symbol `__cpp_exception` without enabled exceptions HOT 2
- emscripten_dlopen fails on Safari HOT 12
- std::vector<MyBoundType> returns UnboundTypeError HOT 5
- dlopen + pthreads with FS not working HOT 1
- CGAL freezes on boolean operations HOT 1
- WebSerial not getting enough time to write to SerialPort HOT 5
- put_time returning time zone as "Easter" HOT 8
- sphinx==2.4.4 is imcompatatible with some dependencies after installing requirements-dev.txt
- Invalid assertion in acorn-optimizer - firebaseui web sdk HOT 2
- No transitive dependency with emscripten ports HOT 6
- Template Instantiation Error in system/lib/libcxx/include/__memory/pointer_traits.h HOT 1
- File-related syscalls, like readdir, can not handle empty directories properly HOT 2
- C++ exceptions caught in JavaScript leak stack memory even when documented instructions are followed HOT 4
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 emscripten.