If you don't have a main() function, then you don't need that flag.

Note that you'll also get a warning if that was the problem (of the runtime
exiting), in a build with ASSERTIONS=1.

- Alon



On Wed, Jun 25, 2014 at 2:02 PM, Stéphane Letz <[email protected]> wrote:

> I have a unique entry point in the library, exported with
> EXPORTED_FUNCTIONS=['_createAsmCDSPFactoryFromString']. Should I still use
> the NO_EXIT_RUNTIME=1  then?
>
> Thanks.
>
> Stéphane
>
> Le mercredi 25 juin 2014 19:42:32 UTC+2, Alon Zakai a écrit :
>>
>> First thing, is this running after main() finished? See NO_EXIT_RUNTIME
>> in src/settings.js regarding that.
>>
>> Otherwise, hopefully the full stack trace tells you where the error
>> happens, and you can add some debug statements. You can also run with more
>> assertions and checks to catch some types of errors, see SAFE_HEAP etc. in
>> https://github.com/kripken/emscripten/wiki/Debugging
>>
>> - Alon
>>
>>
>>
>> On Wed, Jun 25, 2014 at 2:05 AM, Stéphane Letz <[email protected]> wrote:
>>
>>> Hi,
>>>
>>> We have successfully ported a C++ library in JS using emscripten. Our
>>> library uses a global memory management model where all classes derive from
>>> a "garbageable" class that keeps all allocated pointers in a static STL
>>> list to be deallocated when the code finishes. We get this kind of error at
>>> soon at the global allocate/deallocate model is used twice.
>>>
>>>
>>> delete 1414828 libfaust.js:111
>>>
>>>    1. Uncaught abort() at Error at stackTrace (
>>>    file:///Documents/faust-sf/compiler/libfaust.js:1043:15) at
>>>    Object.abort (file:///Documents/faust-sf/
>>>    compiler/libfaust.js:10322:25) at _abort (file:///Documents/faust-sf/
>>>    compiler/libfaust.js:7605...<omitted>...n.
>>>
>>>
>>>
>>> How could we better trace what happens?
>>>
>>> Thanks.
>>>
>>> Stéphane Letz
>>>
>>> --
>>> 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.
>>>
>>
>>  --
> 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.
>

-- 
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.

Reply via email to