Skip to content

WrapJavaScriptRuntimeException hides the stack-trace from log #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
ashkansiroos opened this issue Jun 26, 2017 · 2 comments
Closed

WrapJavaScriptRuntimeException hides the stack-trace from log #420

ashkansiroos opened this issue Jun 26, 2017 · 2 comments

Comments

@ashkansiroos
Copy link

Hi Daniel,

First, Thanks a lot for the great library. It is just awesome, specially that it works very well with the engine switcher.
Secondly, I've tried to do some stress testing on my website and I've got an exception saying:

JavaScriptEngineSwitcher.Core.JsRuntimeException: Out of memory.
Line: 0
Column:0
at React.ReactEnvironment.Execute[T](String code)

I've looked it up and ended up in WrapJavaScriptRuntimeException where it hides the stack-trace. Could you please let the exception come up, or log it so we can see what is causing the error?

Since the log says that JavaScriptEngineSwitcher is throwing the exception, I've opened an issue here:
Taritsyn/JavaScriptEngineSwitcher#35

but I cannot be sure that JavaScriptEngineSwitcher is the one causing the problem specially since the error is more like if the memory is not released with concurrent threads which can be caused by something else like JSPool. :(

@Taritsyn
Copy link
Contributor

Taritsyn commented Jul 2, 2017

@ashkansiroos @Daniel15 In principle, now there is no need to use the WrapJavaScriptRuntimeException method, because since version 2.4.0 of the JavaScript Engine Switcher in error message displays a information about error location:

------------------------------------------------------------
ChakraCoreJsEngine
------------------------------------------------------------
ReferenceError: 'n' is not defined
   at f (temp.js:9:4)
   at Global code (temp.js:16:2)

------------------------------------------------------------
JintJsEngine
------------------------------------------------------------
ReferenceError: n is not defined
    at temp.js:9:4

------------------------------------------------------------
JurassicJsEngine
------------------------------------------------------------
ReferenceError: n is not defined
    at f (temp.js:9)
    at temp.js:16

------------------------------------------------------------
MsieJsEngine
------------------------------------------------------------
ReferenceError: 'n' is undefined
   at f (temp.js:9:4)
   at Unknown script code (temp.js:16:2)

------------------------------------------------------------
V8JsEngine
------------------------------------------------------------
ReferenceError: n is not defined
    at f (temp.js:9:4) ->                       n();
    at temp.js:16:2

------------------------------------------------------------
VroomJsEngine
------------------------------------------------------------
temp.js: Uncaught ReferenceError: n is not defined at line: 9 column: 4.

@dustinsoftware
Copy link
Member

Closing issues older than a year, please re-open if you think this is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants