Closed jjcasmar closed 9 months ago
I have been doing some testing and the error only happens if I set more than one thread for the device. Is multithreading not allowed in embree running in emscripten?
Embree does not officially support emscripten, we just enabled compiling with it. I would expect multithreading to work though. The simple example above should also not do much multi-threading, it just builds an empty scene.
Even for this simple test code, it still fails with an ASAN error when I use something else than 1 thread for the RTCDevice. If you are interested, I can try to provide a stracktrace, but I totally undersstand if you prefer to close the issue, as Emscripten is not a supported platform.
We would be happy to accept a pull request in case you could localize the issue. I will close the issue for now, please re-open if you know some workaround for the issue.
I am using Embree in Emscripten and I use ASAN to catch leaks in my testing code.
Recently, I found a leak in the way I was using Embree and I solve. However, that fix works in x86_64 but not in wasm, where I get the following error:
I have been able to reproduce the issue with this simple code
If I remove the rtcRelease at the end, I get a memory leak error. However, if I add them, I get the already mentioned error. It doesn't matter the order in which I try to destroy the objects, I get the same error.