Hi Brion, I was able to create this test project: https://drive.google.com/open?id=1VrlVQE0By1klvfmkQTIK2v4gJfwqmCFk <https://drive.google.com/open?id=1VrlVQE0By1klvfmkQTIK2v4gJfwqmCFk>
There is a makefile (wasm.mk) in the root of the project. Let me know if this is still too big. -------------------------------------- Scott > On May 11, 2018, at 11:25 AM, Scott Watson <[email protected]> wrote: > > Thanks for your help Brion, > > This is happening during the initial setup of Module on main thread. > > I’ll see if I can create a smaller test project that breaks the same way. > > -------------------------------------- > Scott > >> On May 11, 2018, at 10:38 AM, Brion Vibber <[email protected] >> <mailto:[email protected]>> wrote: >> >> On Fri, May 11, 2018 at 9:54 AM Scott Watson <[email protected] >> <mailto:[email protected]>> wrote: >> I've been struggling with an issue with embind. I have a media player that >> I am building with emscripten. Ultimately I need this to run as WASM, but I >> need pthreads. While I've been waiting for pthread support in WASM, I've >> been building to asm.js and debugging. Everything seems to be working, >> although the performance isn't great but that was expected. >> >> I'm not too sure how embind is handled in multiple threads, will take a peek >> shortly and refresh my memory... >> >> I'm getting to the point now where I want to test out WASM. I am using the >> incoming branch of emscripten and the firefox nightly build. However, when >> I use -s WASM=1 I get >> >> uncaught exception: BindingError: Cannot register public name '' twice >> >> The call stack looks like this: >> >> throwBindingError <- exposePublicSymbol <- __embind_register_enum >> >> So it looks like it trying to setup the binding for one of my enums. I have >> a few enums. The name of the enum is blank (""), so I can't tell which one >> it's crapping out on. >> [snip] >> >> >> >> EMSCRIPTEN_BINDINGS(MediaPlayer) { >> >> using namespace emscripten; >> >> enum_<Arris::MediaPlayerState>("MediaPlayerState") >> .value("PlayerStateStopped", >> Arris::MediaPlayerState::PlayerStateStopped) >> [snip] >> >> Hmm, the 'name' seen in exposePublicSymbol should be the exported name >> passed in explicitly from the bindings, which for these enum bindings is >> 'MediaPlayerState' etc. If you're seeing '' there, it's most likely that >> there's a failure to extract the string from the heap, for instance by >> having a pointer to a null byte, and it's happening multiple times (hence >> discovering the conflict on the second symbol). >> >> Is this happening on the main thread, in a worker, or both? >> >> I'd recommend trimming down the code to try to produce a minimal test case >> if you can; I can't seem to reproduce the error with just the bindings given >> above, building for pthreads and starting a worker pool but not actually >> running anything on them yet. >> >> -- brion >> >> -- >> You received this message because you are subscribed to a topic in the >> Google Groups "emscripten-discuss" group. >> To unsubscribe from this topic, visit >> https://groups.google.com/d/topic/emscripten-discuss/Uv2rB72I9QI/unsubscribe >> <https://groups.google.com/d/topic/emscripten-discuss/Uv2rB72I9QI/unsubscribe>. >> To unsubscribe from this group and all its topics, send an email to >> [email protected] >> <mailto:[email protected]>. >> For more options, visit https://groups.google.com/d/optout >> <https://groups.google.com/d/optout>. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
