It's back! Take the 2018 Developer Survey today »
0
votes
0answers
32 views

How to load stackoverflow faster? [migrated]

When I access to stackoverflow, I got this sign Stack Overflow requires external JavaScript from another domain, which is blocked or failed to load. on top of the page because of my lovely ...
0
votes
1answer
24 views

Max Stack exceeded error, how would I fix this?

I am making a function that returns true if number in outerfucntion is within innerfunction list <script> function hasMatch(item) { hasMatch(2) function inList() { var List = [...
0
votes
1answer
46 views

org.json - StackOverflowError when attempting to parse JSONArray containing html strings

I have the latest version of org.json - json-20171018. In my application, I must create a JSONArray in Java of various fields, which have been created on the front end (javascript) with the ...
0
votes
1answer
33 views

Javascript recursive call creates range-error

I'm trying to get the following script working, but when it falls into the continueAnimation function it isn't updating the cPreloaderTimeout variable and it runs in a 'Uncaught RangeError: Maximum ...
0
votes
1answer
58 views

Localstorage counter

Here is a JavaScript localstorage counter code: if (typeof(Storage) !== "undefined") { var n = localStorage.getItem('on_load_counter'); if (n === null) { n = 0; } n++; ...
0
votes
0answers
49 views

chrome : Uncaught RangeError: Maximum call stack size exceeded when parsing a small script (=10000 concatenated strings)

I got a css that was previously loaded using htmlhttprequest. For some reason I now preferred to store it in a script. So I double quoted every line of it and chained them with a + var myfile = { "...
1
vote
1answer
92 views

Localstorage not working

I have made some html/JavaScript codes like this: <script> if(window.localStorage!==undefined) { } else{ alert('Your browser is outdated!'); } function myfunction1{ if(localStorage.getItem('...
-2
votes
2answers
31 views

Remove one JavaScript code and attach two JavaScript codes

I have these two JavaScript codes: <script type="text/javascript"> $(document).ready(function(){ $('#patternForm').patternLock({ fieldName: 'password' }); });...
0
votes
1answer
62 views

Save data to localstorage and display it as innerHTML

I've used these codes for making a simple notes app. It have to store the text box value into localStorage, by pressing the remember button. Then display it but pressing the other button. But it's not ...
2
votes
2answers
61 views

How to find out when the Javascript stack gets full?

I have an algorithm, which works recursively relatively deep, such that a maximum stack size exceeded exception eventually occurs (without being an endless recursion!). My algorithm can split itself ...
0
votes
0answers
81 views

Error with Redux Form Multi-field: Maximum Callstack Size Exceeded

I have a wizard form made with React and Redux Form wherein on certain screens, there are multiple inputs. I'm getting the questions from a JSON file, and if the question has "type": "combined" ...
5
votes
1answer
91 views

javascript recursive stack overflow

Is there anybody would explain why the result is different below? // test one function computeMaxCallStackSize() { try { return computeMaxCallStackSize() + 1; } catch (e) { ...
10
votes
2answers
1k views

ES6 Tail Recursion Optimisation Stack Overflow

Having read Dr Rauschmayer's description of recursive tail call optimisation in es6, I've since been trying to recreate the 'zero-stack' execution of the recursive factorial function he details. Using ...
2
votes
2answers
179 views

A range function in Javascript written recursively

For my own learning and practice I tried to implement a function in Javascript which would populate an array with integers from 1 to the argument 'limit'. One way I did it was with a for loop: ...
1
vote
1answer
50 views

Bootstrap 4 JS Throwing Error on SO Embed Snippet Fiddle

Out of curiosity, any clue on why bootstrap 4 js is throwing the following: when embedding the snippet? (Checking same external Fiddle shows no errors) Tried adding tether.js but nothing (left it ...
0
votes
1answer
52 views

Why does this functional version of QuickSort break? And how do I fix it?

This implementation blows the stack on an array of any size: function quickSort(arr){ let pivot = arr[arr.length-1] return quickSort(arr.filter((num) => (num < pivot))) .concat(...
0
votes
1answer
101 views

html2canvas crashes in Internet explorer

I am using html2canvas to convert my charts and download as PDF which is working fine every where except in internet explorer using charts in internet explorer it work fine when there are few charts. ...
0
votes
0answers
88 views

In ES6, how the “Tail Calls” avoid the stack overflow? [duplicate]

In ES6 new features, I cannot understand the "Tail Calls", Calls in tail-position are guaranteed to not grow the stack unboundedly. Makes recursive algorithms safe in the face of unbounded inputs. ...
2
votes
1answer
4k views

react Maximum call stack size exceeded

I trying to redirect the user to the "TrapPage" if he is not logged in. Here is my code: function requireAuth(nextState, replace) { if (!auth.loggedIn()) { replace({ ...
1
vote
0answers
37 views

What influences the stack headroom of IE8?

I'm working on a large scale React app which is required to work in IE8. The DOM reconciliation process of React recurses over the nested components and reaches stack depths of around 125, causing ...
7
votes
2answers
432 views

Will recursively calling a function from a callback cause a stack overflow?

I want to invoke a function after an event gets fired then in the same call back call the function again. This is to create a sort of event listener when the function completes. You'll know what i'm ...
4
votes
2answers
118 views

how does setTimeout prevent potential stackoverflow

An example : var list = readHugeList(); var nextListItem = function() { var item = list.pop(); if (item) { setTimeout( nextListItem, 0); // ^^^^^^^^ this line } }; How ...
4
votes
3answers
2k views

Call asynchronous function recursively

I have an asynchronous function that I want to call multiple times in a row. The problem is that "multiple" can be a few hundred thousand or millions... The obvious way is to call the same function ...
0
votes
2answers
56 views

How to perform url requests one-by-one and not to cause stack overflow? (Node.JS)

Currently i have this code function DownloadPage(uri) { request(uri, function (err, res, body) { if (err) { console.log(err); } else { nextURL = ...
0
votes
1answer
43 views

nodejs JSON.parse() of stack overflow API

Here is my code. var request = require('request'); var API = "https://api.stackexchange.com/2.2/users?page=1&order=desc&sort=reputation&site=stackoverflow"; request(API, function(e//...
0
votes
1answer
388 views

ServiceNow Stack Overflow Error

I am using an onChange() Client Script in Service Now to round the entry of a field to the next highest, even, hundredth upon entry of data into the field. I am running into a stack overflow message, ...
0
votes
2answers
42 views

Stack Overflow in CLI Node App

I'm building a cli Node app for a class. When I run it, I get stuck in an infinite loop which causes a stack overflow. I'm sure it's because prompt doesn't wait until the user enters input before the ...
2
votes
1answer
401 views

Node error stack trace is undefined

I have some long-running node code that will print a [RangeError: Maximum call stack size exceeded] error after a while and continue to do so indefinitely. To track down what recursive call is ...
0
votes
1answer
351 views

Magnific Popup and Bootstrap 3 Modal Call Stack Exceeded

I'm having an interesting issue when combining Boostrap 3 Modal with Magnific Popup. I have a Bootstrap Modal that contains a list of videos, and each video has a view link that opens up a Magnific ...
4
votes
1answer
129 views

Maximum call stack size exceeded when split

Trying to duplicate Agar's splitting function but when I call it, the maximum call stack size is exceeded. (JSFiddle) [note: don't click the canvas because that will trigger the split function) This ...
2
votes
3answers
103 views

Will using setTimeout prevent the stack from growing?

Lets say I'm runnin some kind of long operation for a set of values. The function that starts this operation is startNext() and the very last line executed in it is to itself so its a recursive call ...
4
votes
2answers
94 views

How to trap stack overflow error

I have an recursive function with asynchronous interface that will likely exceed stack depth limits when called: function f(x, cb) { if (x === 0) { cb(); } else { f(x - 1, cb);...
0
votes
2answers
863 views

Uncaught RangeError: Maximum call stack size exceeded - jQuery Error

I am working with jQuery, I am trying to add a click trigger inside the click function for a different link. Heres what I have: $('.details .banner .banner_link').on("click", function(e){ ...
0
votes
1answer
198 views

Getting RangeError: Maximum call stack size exceeded on setTimeout even when the function being called is wrapped in a closure

I have the following code, which when called repeatedly is throwing this error - RangeError: Maximum call stack size exceeded var timeout = window.setTimeout(function() { onAnimationEnd(null)...
-2
votes
1answer
59 views

Form reset Stack overflow at line IE 10, 8 [closed]

i am using a form like below and getting error in IE Stack overflow at line: 367 <form id="appointmentForm" onreset="resetAppointmentForm()" action="" method="post" novalidate class="...
1
vote
3answers
143 views

Deferred chain crashing browser

This is small function that should be able to open and close a box. Opening and closing needs to take into account some CSS transitions, so I figured I can use $.Deferred. Here's relevant code: ...
0
votes
1answer
11k views

Uncaught RangeError: Maximum call stack size exceeded when I use google maps

I am trying to write simple example with google maps and markers but i faces with error: Uncaught RangeError: Maximum call stack size exceeded js: $(document).ready(function() { var map; ...
4
votes
1answer
263 views

Node.js - Diagnose “(node) warning: Recursive process.nextTick detected.”

My application has a situation in which an operation takes a very long time to complete, and then a couple hundred instances of the following message is printed: (node) warning: Recursive process....
0
votes
5answers
165 views

While vs setTimeout in Javascript

I'm trying to figure out whether it is better to write a while loop (which will run for a long period of time) or a setTimeout function in Javascript. From what I understand, since JavaScript is ...
1
vote
1answer
98 views

jQuery resize() function causes stack overflow exception

I need to handle div resizing on my web page. The problem is that I have not idea why resize function cause stackoverflow exception. Can you explain me what am I doing wrong? Here is a jsfiddle ...
1
vote
0answers
19 views

Firebug and Bootsrap3 tab, conflict

I am using that kind of tab to built my website, everything works but as soon as I open Firebug I can not click on the tabs anymore, they do not seem to switch anymore (I don't get any errors) (Chrome ...
0
votes
1answer
62 views

stack overflow error creating markers

I am using google maps javascript api V3 to create maps in our adobe flex based application. I am using flex iframes to communicate between flex and javascript api. I am having two issues. I call a ...
5
votes
1answer
65 views

Unrecoverable stackoverflow error when making upcalls from JavaScript to Java

I've encountered an "unrecoverable stack overflow error" that I can't figure out. From the docs : you need to create an interface object (of any class) and make it known to JavaScript by calling ...
1
vote
3answers
1k views

asynchronously iterate over massive array in JavaScript without triggering stack size exceeded

My environment is NodeJS, although this could be a web related problem as well. I have a large set of data from a database which I am attempting to enumerate over. However, for the sake of argument ...
0
votes
1answer
277 views

How does `process.nextTick` keep my stack from blowing up?

I've stubled upon a function (here on SO) which writes a file, but makes sure to not overwrite a file: function writeFile(i){ var i = i || 0; var fileName = 'a_' + i + '.jpg'; fs.exists(...
0
votes
1answer
115 views

How to make infinite calls for a div reload through Ajax synchronously

I'm kind of new to javascript and seriously, this async thing is driving me crazy. I'm working on a project for displaying a div (which occupies all the screen) that reloads everytime with a ...
0
votes
2answers
84 views

JavaScript - returning from functions

Is it a requirement to expressly return from a JavaScript function? In other languages, we tend to get a stack overflow error when functions don't return, but this does not seem to be the case with ...
-2
votes
1answer
555 views

How to load only the content area, skip header and footer loading again in new pages over clicking links

Im using Basecamp, and when I click on the menu links, it just loads the inner body content alone, but still the URL changes, I wonder, Ive examined in network tab, and I see there for each link click ...
0
votes
0answers
41 views

Getting a stack overflow in this array merge

I've written a short recursive function to add blank entries every 30 minutes to a dataset. As far as I can tell, the function should be tail-recursive, but it seems to cause a stack overflow. Just ...
27
votes
3answers
869 views

Node.js / Server.js socket implementation problems

Having a hard time implementing a node.js/server.js setup I'm a bit stuck right now, and hoping someone can shed some light. I'm relatively new to sockets in general, but have been programming in ...