Skip to content
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

JS Prime Browserversion Crashing #12

Open
prasanna-in opened this issue Apr 2, 2014 · 8 comments
Open

JS Prime Browserversion Crashing #12

prasanna-in opened this issue Apr 2, 2014 · 8 comments

Comments

@prasanna-in
Copy link

Hi,

I was testing the browser version with 300 lines of JS code. after few minutes the Tab crashed.

PK

@dpnishant
Copy link
Owner

Please provide the JS code to reproduce.

@prasanna-in
Copy link
Author

Hey

as this is production code so could be difficult sharing over a public, we would have to work a way around it.

PK

@naderchehab
Copy link

Here's an example of public JS code that crashes jsprime: http://www.google-analytics.com/analytics.js

Any idea why this happens? I am suspecting a memory issue or some sort of infinite recursion.

@12shivaniaggarwal
Copy link

Hey, even I am facing an Maximum Call Stack exceeded error on the Chrome browser in the function checkFunctionAsReturns in engine.js. Is there any workaround for this, I need to check this tool on a very large file around 1000 lines of code.

@TejaswiniU
Copy link

In engine.js at asignFunctionReturnValue() repetitive variable declaration made the loop run infinite times and caused heap out of memory . To overcome this loop optimisation is done by for (var j = 0; j < real_func_names.length ; j++)
to
var real_fun_name_length = real_func_names.length;
for (var j = 0; j < real_fun_name_length ; j++)
Hope this can help you

@dpnishant
Copy link
Owner

Hey @TejaswiniU, Would create a pull request if you have fix? I can review and merge.

@TejaswiniU
Copy link

TejaswiniU commented Dec 29, 2018 via email

@dpnishant
Copy link
Owner

@TejaswiniU Thank you so much! 👍

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

5 participants