Open theofred opened 8 years ago
Just to note that I also encountered this problem.
The issue appears to be fixed in Firefox 48.
The number of Maximum call stack is not the same in nodejs or in a browser (https://stackoverflow.com/a/7828803/6126329)
This also appears in nodejs when you are trying to run a query on huge number of data. async.whilst(function(){ ^ RangeError: Maximum call stack size exceeded
This can be fixed by fixing the whilst function in utils.js (see https://stackoverflow.com/a/20999077/6126329). This fix will let node or the browser free the stack when needed.
var whilst = function (test, iterator, callback) {
if (test()) {
iterator(function (err) {
if (err) {
return callback(err);
}
setTimeout(() => {
whilst(test, iterator, callback)
}, 0)
});
}
else {
callback();
}
};
This fixed my problem.
Maximum call stack size exceeded
rdf_store_min_formated.js:3046 RangeError: Maximum call stack size exceeded
at Function.map (jquery.min.js:2)
at i (jquery.tmpl.min.js:1)
at jquery.tmpl.min.js:1
at Function.map (jquery.min.js:2)
at i (jquery.tmpl.min.js:1)
at Function.tmpl (jquery.tmpl.min.js:1)
at ko.jqueryTmplTemplateEngine.renderTemplate (semko.min.js:96)
at a (semko.min.js:82)
at Object.ko.dependentObservable.disposeWhen [as read] (semko.min.js:84)
at ko.subscription.f [as callback] (semko.min.js:42)
My rdf_store_min_formated.js
$.RDFLoader.prototype.tryToParse = function(a, b, e, d) {
try {
if (typeof e === "string" && (e = s.normalizeUnicodeLiterals(e)),
a.async)
a.parse(e, b, d);
else {
var i = a.parse(e, b);
i != null ? d(!0, i) : d(!1, "parsing error")
}
} catch (h) {
console.log(h.message),//3045
console.log(h.stack),//3046
d(!1, "parsing error with mime type : " + h)
}
}
;
I modified this json-ld-macros example
I have about 5000 items/rows in my data.
I use rdfstore for a client-side js application. It is part of a bigger app and it's only used to read a RDF-file and then converting it to an array.
This is the part in my code:
This is the console output:
My system: Windows 7 Ultimate 64 Bit Firefox 47.0
also tested on: Ubuntu 14.04 Firefox 47.0
Windows 7 Pro 32 Bit Firefox 47.0
they all produced this error.
There is no error when Firefox is in safe-mode. But if Firefox is in normal-mode and all addons are disabled, the error is still there. So no addons fault. I also reseted my Firefox and started with a new profile but nothing worked.