Emscripten crash with mappedGlobals.find(name) != mappedGlobals.end()Do the parentheses after the type name make a difference with new?Warning “might be clobbered” on C++ object with setjmpMy Emscripten program crashes on return from a functionStruct operations in Javascript through EmscriptenWebAssembly demo guide fails due missing filesJavascript execution breaks with a TypeError message “Cannot read property 'refcount' of undefined” only if a class method is called inside a loopLinking OpenSSL with webassemblyJavascript cannot find exported WASM functions compiled with emscriptenopencv wasm build fails on windowsEmscripten Link static Library error: wasm steaming compile fail: Import 'env.getTempRet0'

Output Distinct Factor Cuboids

Should I inform my future product owner that there are big chances that a team member will leave the company soon?

Why is the UK still pressing on with Brexit?

Tips for remembering the order of parameters for ln?

Madrid to London w/ Expired 90/180 days stay as US citizen

How To Make Earth's Oceans as Brackish as Lyr's

Impossible Scrabble Words

Asked to Not Use Transactions and to Use A Workaround to Simulate One

Is there a theorem in Real analysis similar to Cauchy's theorem in Complex analysis?

How would you translate Evangelii Nuntiandi?

Can an infinite series be thought of as adding up "infinitely many" terms?

Neta Revai is achzareyos?

What does the Free Recovery sign (UK) actually mean?

Are all men created equal according to Hinduism? Is this predominant western belief in agreement with the Vedas?

Why is belonging not transitive?

What is a "major country" as named in Bernie Sanders' Healthcare debate answers?

Why does an orbit become hyperbolic when total orbital energy is positive?

how to know this integral finite or infinite

How to give my students a straightedge instead of a ruler

Python web-scraper to download table of transistor counts from Wikipedia

Seven Places at Once - Another Google Earth Challenge?

Why does JavaScript convert an array of one string to a string, when used as an object key?

Unpredictability of Stock Market

Did slaves have slaves?



Emscripten crash with mappedGlobals.find(name) != mappedGlobals.end()


Do the parentheses after the type name make a difference with new?Warning “might be clobbered” on C++ object with setjmpMy Emscripten program crashes on return from a functionStruct operations in Javascript through EmscriptenWebAssembly demo guide fails due missing filesJavascript execution breaks with a TypeError message “Cannot read property 'refcount' of undefined” only if a class method is called inside a loopLinking OpenSSL with webassemblyJavascript cannot find exported WASM functions compiled with emscriptenopencv wasm build fails on windowsEmscripten Link static Library error: wasm steaming compile fail: Import 'env.getTempRet0'






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








0















I have a problem when I compiled Emscripten code with -s ASYNCIFY=1 and call an external library class.



_setjmpTable
Assertion failed: mappedGlobals.find(name) != mappedGlobals.end() ? true : (std::cerr << name.str << 'n', false), file C:emslavebuildslavewin-tagbuilderemsdkbinaryentag-1.38.29srcasm2wasm.h, line 1659
shared:ERROR: 'C:/workspace/emsdk/clang/e1.38.29_64bit/binaryenbinasm2wasm hello.temp.asm.js --total-memory=16777216 --trap-mode=allow -O3 --mem-init=hello.js.mem --mem-base=1024 --wasm-only -o hello.wasm --mvp-features' failed (-1073740791)


The problem is mentioned in emscripten github issue here



The problem is because of the




The asyncify pass moves some code out of main, and then it can't find
those local vars




as Emscripten author said



The problem happens when I call other class from external libraries ( .bc ) and compile with ASYNCIFY=1. However when I remove ASYNCIFY everything is alright.



I also found that If I add the code before



jmp_buf env;
if(!setjmp(env))

longjmp(env,1);
emscripten_sleep(1000);



The code can be compiled successfully but it crashes when I ran it on a browser



How to solve the problem since I have to use both ASYNCIFY and a class from external library?










share|improve this question
































    0















    I have a problem when I compiled Emscripten code with -s ASYNCIFY=1 and call an external library class.



    _setjmpTable
    Assertion failed: mappedGlobals.find(name) != mappedGlobals.end() ? true : (std::cerr << name.str << 'n', false), file C:emslavebuildslavewin-tagbuilderemsdkbinaryentag-1.38.29srcasm2wasm.h, line 1659
    shared:ERROR: 'C:/workspace/emsdk/clang/e1.38.29_64bit/binaryenbinasm2wasm hello.temp.asm.js --total-memory=16777216 --trap-mode=allow -O3 --mem-init=hello.js.mem --mem-base=1024 --wasm-only -o hello.wasm --mvp-features' failed (-1073740791)


    The problem is mentioned in emscripten github issue here



    The problem is because of the




    The asyncify pass moves some code out of main, and then it can't find
    those local vars




    as Emscripten author said



    The problem happens when I call other class from external libraries ( .bc ) and compile with ASYNCIFY=1. However when I remove ASYNCIFY everything is alright.



    I also found that If I add the code before



    jmp_buf env;
    if(!setjmp(env))

    longjmp(env,1);
    emscripten_sleep(1000);



    The code can be compiled successfully but it crashes when I ran it on a browser



    How to solve the problem since I have to use both ASYNCIFY and a class from external library?










    share|improve this question




























      0












      0








      0


      1






      I have a problem when I compiled Emscripten code with -s ASYNCIFY=1 and call an external library class.



      _setjmpTable
      Assertion failed: mappedGlobals.find(name) != mappedGlobals.end() ? true : (std::cerr << name.str << 'n', false), file C:emslavebuildslavewin-tagbuilderemsdkbinaryentag-1.38.29srcasm2wasm.h, line 1659
      shared:ERROR: 'C:/workspace/emsdk/clang/e1.38.29_64bit/binaryenbinasm2wasm hello.temp.asm.js --total-memory=16777216 --trap-mode=allow -O3 --mem-init=hello.js.mem --mem-base=1024 --wasm-only -o hello.wasm --mvp-features' failed (-1073740791)


      The problem is mentioned in emscripten github issue here



      The problem is because of the




      The asyncify pass moves some code out of main, and then it can't find
      those local vars




      as Emscripten author said



      The problem happens when I call other class from external libraries ( .bc ) and compile with ASYNCIFY=1. However when I remove ASYNCIFY everything is alright.



      I also found that If I add the code before



      jmp_buf env;
      if(!setjmp(env))

      longjmp(env,1);
      emscripten_sleep(1000);



      The code can be compiled successfully but it crashes when I ran it on a browser



      How to solve the problem since I have to use both ASYNCIFY and a class from external library?










      share|improve this question
















      I have a problem when I compiled Emscripten code with -s ASYNCIFY=1 and call an external library class.



      _setjmpTable
      Assertion failed: mappedGlobals.find(name) != mappedGlobals.end() ? true : (std::cerr << name.str << 'n', false), file C:emslavebuildslavewin-tagbuilderemsdkbinaryentag-1.38.29srcasm2wasm.h, line 1659
      shared:ERROR: 'C:/workspace/emsdk/clang/e1.38.29_64bit/binaryenbinasm2wasm hello.temp.asm.js --total-memory=16777216 --trap-mode=allow -O3 --mem-init=hello.js.mem --mem-base=1024 --wasm-only -o hello.wasm --mvp-features' failed (-1073740791)


      The problem is mentioned in emscripten github issue here



      The problem is because of the




      The asyncify pass moves some code out of main, and then it can't find
      those local vars




      as Emscripten author said



      The problem happens when I call other class from external libraries ( .bc ) and compile with ASYNCIFY=1. However when I remove ASYNCIFY everything is alright.



      I also found that If I add the code before



      jmp_buf env;
      if(!setjmp(env))

      longjmp(env,1);
      emscripten_sleep(1000);



      The code can be compiled successfully but it crashes when I ran it on a browser



      How to solve the problem since I have to use both ASYNCIFY and a class from external library?







      c++ emscripten






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Mar 27 at 10:26







      MooMoo

















      asked Mar 27 at 9:46









      MooMooMooMoo

      3584 silver badges14 bronze badges




      3584 silver badges14 bronze badges

























          3 Answers
          3






          active

          oldest

          votes


















          1
















          I have the same problem when I use emscripten_wget(...) with -s ASYNCIFY=1.
          I have to use emscripten_async_wget instead, it need not ASYNCIFY.



          P.s. I use emscripten version 1.38.29.






          share|improve this answer


































            0
















            ASYNCIFY is a known bug according to this




            There are some known bugs with ASYNCIFY on things like exceptions and
            setjmp. The emterpreter has not been tested on those feature yet, so
            it's unclear if it would work. Update: there are known issues with
            doing and async operation when there is a try-catch (llvm invoke) on
            the stack.




            use EMTERPRETIFY instead of ASYNCIFY



            FLAGS += -s EMTERPRETIFY_FILE="data.binary"
            FLAGS += -s EMTERPRETIFY=1
            FLAGS += -s EMTERPRETIFY_ASYNC=1


            instead






            share|improve this answer
































              0
















              Also when I disable webassembly with WASM=0

              it works fine too






              share|improve this answer



























                Your Answer






                StackExchange.ifUsing("editor", function ()
                StackExchange.using("externalEditor", function ()
                StackExchange.using("snippets", function ()
                StackExchange.snippets.init();
                );
                );
                , "code-snippets");

                StackExchange.ready(function()
                var channelOptions =
                tags: "".split(" "),
                id: "1"
                ;
                initTagRenderer("".split(" "), "".split(" "), channelOptions);

                StackExchange.using("externalEditor", function()
                // Have to fire editor after snippets, if snippets enabled
                if (StackExchange.settings.snippets.snippetsEnabled)
                StackExchange.using("snippets", function()
                createEditor();
                );

                else
                createEditor();

                );

                function createEditor()
                StackExchange.prepareEditor(
                heartbeatType: 'answer',
                autoActivateHeartbeat: false,
                convertImagesToLinks: true,
                noModals: true,
                showLowRepImageUploadWarning: true,
                reputationToPostImages: 10,
                bindNavPrevention: true,
                postfix: "",
                imageUploader:
                brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
                contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/4.0/"u003ecc by-sa 4.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
                allowUrls: true
                ,
                onDemand: true,
                discardSelector: ".discard-answer"
                ,immediatelyShowMarkdownHelp:true
                );



                );














                draft saved

                draft discarded
















                StackExchange.ready(
                function ()
                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374124%2femscripten-crash-with-mappedglobals-findname-mappedglobals-end%23new-answer', 'question_page');

                );

                Post as a guest















                Required, but never shown

























                3 Answers
                3






                active

                oldest

                votes








                3 Answers
                3






                active

                oldest

                votes









                active

                oldest

                votes






                active

                oldest

                votes









                1
















                I have the same problem when I use emscripten_wget(...) with -s ASYNCIFY=1.
                I have to use emscripten_async_wget instead, it need not ASYNCIFY.



                P.s. I use emscripten version 1.38.29.






                share|improve this answer































                  1
















                  I have the same problem when I use emscripten_wget(...) with -s ASYNCIFY=1.
                  I have to use emscripten_async_wget instead, it need not ASYNCIFY.



                  P.s. I use emscripten version 1.38.29.






                  share|improve this answer





























                    1














                    1










                    1









                    I have the same problem when I use emscripten_wget(...) with -s ASYNCIFY=1.
                    I have to use emscripten_async_wget instead, it need not ASYNCIFY.



                    P.s. I use emscripten version 1.38.29.






                    share|improve this answer















                    I have the same problem when I use emscripten_wget(...) with -s ASYNCIFY=1.
                    I have to use emscripten_async_wget instead, it need not ASYNCIFY.



                    P.s. I use emscripten version 1.38.29.







                    share|improve this answer














                    share|improve this answer



                    share|improve this answer








                    edited Mar 28 at 13:00









                    gdgr

                    1,0242 gold badges10 silver badges29 bronze badges




                    1,0242 gold badges10 silver badges29 bronze badges










                    answered Mar 28 at 12:25









                    Tim WongTim Wong

                    92 bronze badges




                    92 bronze badges


























                        0
















                        ASYNCIFY is a known bug according to this




                        There are some known bugs with ASYNCIFY on things like exceptions and
                        setjmp. The emterpreter has not been tested on those feature yet, so
                        it's unclear if it would work. Update: there are known issues with
                        doing and async operation when there is a try-catch (llvm invoke) on
                        the stack.




                        use EMTERPRETIFY instead of ASYNCIFY



                        FLAGS += -s EMTERPRETIFY_FILE="data.binary"
                        FLAGS += -s EMTERPRETIFY=1
                        FLAGS += -s EMTERPRETIFY_ASYNC=1


                        instead






                        share|improve this answer





























                          0
















                          ASYNCIFY is a known bug according to this




                          There are some known bugs with ASYNCIFY on things like exceptions and
                          setjmp. The emterpreter has not been tested on those feature yet, so
                          it's unclear if it would work. Update: there are known issues with
                          doing and async operation when there is a try-catch (llvm invoke) on
                          the stack.




                          use EMTERPRETIFY instead of ASYNCIFY



                          FLAGS += -s EMTERPRETIFY_FILE="data.binary"
                          FLAGS += -s EMTERPRETIFY=1
                          FLAGS += -s EMTERPRETIFY_ASYNC=1


                          instead






                          share|improve this answer



























                            0














                            0










                            0









                            ASYNCIFY is a known bug according to this




                            There are some known bugs with ASYNCIFY on things like exceptions and
                            setjmp. The emterpreter has not been tested on those feature yet, so
                            it's unclear if it would work. Update: there are known issues with
                            doing and async operation when there is a try-catch (llvm invoke) on
                            the stack.




                            use EMTERPRETIFY instead of ASYNCIFY



                            FLAGS += -s EMTERPRETIFY_FILE="data.binary"
                            FLAGS += -s EMTERPRETIFY=1
                            FLAGS += -s EMTERPRETIFY_ASYNC=1


                            instead






                            share|improve this answer













                            ASYNCIFY is a known bug according to this




                            There are some known bugs with ASYNCIFY on things like exceptions and
                            setjmp. The emterpreter has not been tested on those feature yet, so
                            it's unclear if it would work. Update: there are known issues with
                            doing and async operation when there is a try-catch (llvm invoke) on
                            the stack.




                            use EMTERPRETIFY instead of ASYNCIFY



                            FLAGS += -s EMTERPRETIFY_FILE="data.binary"
                            FLAGS += -s EMTERPRETIFY=1
                            FLAGS += -s EMTERPRETIFY_ASYNC=1


                            instead







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Mar 27 at 12:21









                            MooMooMooMoo

                            3584 silver badges14 bronze badges




                            3584 silver badges14 bronze badges
























                                0
















                                Also when I disable webassembly with WASM=0

                                it works fine too






                                share|improve this answer





























                                  0
















                                  Also when I disable webassembly with WASM=0

                                  it works fine too






                                  share|improve this answer



























                                    0














                                    0










                                    0









                                    Also when I disable webassembly with WASM=0

                                    it works fine too






                                    share|improve this answer













                                    Also when I disable webassembly with WASM=0

                                    it works fine too







                                    share|improve this answer












                                    share|improve this answer



                                    share|improve this answer










                                    answered Mar 27 at 13:36









                                    MooMooMooMoo

                                    3584 silver badges14 bronze badges




                                    3584 silver badges14 bronze badges































                                        draft saved

                                        draft discarded















































                                        Thanks for contributing an answer to Stack Overflow!


                                        • Please be sure to answer the question. Provide details and share your research!

                                        But avoid …


                                        • Asking for help, clarification, or responding to other answers.

                                        • Making statements based on opinion; back them up with references or personal experience.

                                        To learn more, see our tips on writing great answers.




                                        draft saved


                                        draft discarded














                                        StackExchange.ready(
                                        function ()
                                        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55374124%2femscripten-crash-with-mappedglobals-findname-mappedglobals-end%23new-answer', 'question_page');

                                        );

                                        Post as a guest















                                        Required, but never shown





















































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown

































                                        Required, but never shown














                                        Required, but never shown












                                        Required, but never shown







                                        Required, but never shown







                                        Popular posts from this blog

                                        How to preserve electronics (computers, tablets and phones) for hundreds of years Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) The network's official Twitter account is up and running again. What content…How might modern humans leave a message for 50,000 years?How would an aquatic race develop computers?How do we make computers care for human life?Keeping supplies for 1000 yearsWhat will cell phones become in 100 years?What body armor protects against a laser?Could a society attain 1800s technology if limited to using copper and bronze?Electricity power (magic) and electronicsScavenging metal resources in post-apocalypse after 100 yearsWhy would precursors create devices that can survive and still work after hundreds of years?

                                        155 수학 과학 기타 둘러보기 메뉴eh추가해eh문서를 완성해

                                        Convert JSON to MapSimplest way to convert a string representing JSON array into Java array List of key value pairsHow to take String JSON values into HashMapConvert a JSON String to a HashMapCreating BSON object from JSON stringJSONObject - How to get a value ?Better Map ConstructorReading JSON from Url javaUpdate columns if input values are not null otherwise ignore and keep the existing values of column in databaseHow to store object represented as Json string into Couchbase Lite?Go JSON into MapHow do I efficiently iterate over each entry in a Java Map?Sort a Map<Key, Value> by valuesHow to round a number to n decimal places in JavaCan comments be used in JSON?How do I read / convert an InputStream into a String in Java?How can I pretty-print JSON in a shell script?What is the correct JSON content type?How can I deserialize JSON to a simple Dictionary<string,string> in ASP.NET?Why does Google prepend while(1); to their JSON responses?Parse JSON in JavaScript?