jsprime icon indicating copy to clipboard operation
jsprime copied to clipboard

JS Prime Browserversion Crashing

Open prasanna-in opened this issue 10 years ago • 8 comments

Hi,

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

PK

prasanna-in avatar Apr 02 '14 06:04 prasanna-in

Please provide the JS code to reproduce.

dpnishant avatar Apr 02 '14 07:04 dpnishant

Hey

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

PK

prasanna-in avatar Apr 02 '14 08:04 prasanna-in

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.

naderchehab avatar Oct 06 '15 21:10 naderchehab

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.

12shivaniaggarwal avatar Jun 18 '17 11:06 12shivaniaggarwal

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

TejaswiniU avatar Dec 28 '18 06:12 TejaswiniU

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

dpnishant avatar Dec 28 '18 06:12 dpnishant

I will push the code by Monday.

On Fri, Dec 28, 2018, 12:06 Nishant Das Patnaik <[email protected] wrote:

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

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/dpnishant/jsprime/issues/12#issuecomment-450300207, or mute the thread https://github.com/notifications/unsubscribe-auth/AsCvET71WNq2lvruZnV1bwlR_tFVFzcqks5u9bvZgaJpZM4Bu5Cn .

TejaswiniU avatar Dec 29 '18 16:12 TejaswiniU

@TejaswiniU Thank you so much! 👍

dpnishant avatar Dec 29 '18 21:12 dpnishant