One step closer to the error once again. I tried the console trick and took it further on. I put console.logs all over the UnityConfig.js and fileloader.js files and was able to locate one kind of source where it comes from. Here is the fileloader.js
function runWithFS() {
console.log("Fileloader 24");
function assert(check, msg) {
console.log("Fileloader 25");
if (!check) throw msg + new Error().stack;
}
Module['FS_createPath']('/', 'Resources', true, true);
console.log("Fileloader 26");
function DataRequest(start, end, crunched, audio) {
this.start = start;
this.end = end;
this.crunched = crunched;
this.audio = audio;
console.log("Fileloader 27");
}
DataRequest.prototype = {
requests: {},
open: function(mode, name) {
console.log("Fileloader 28");
this.name = name;
this.requests[name] = this;
Module['addRunDependency']('fp ' + this.name);
},
send: function() {},
onload: function() {
console.log("Fileloader 29");
var byteArray = this.byteArray.subarray(this.start, this.end);
this.finish(byteArray);
},
finish: function(byteArray) {
console.log("Fileloader 30");
var that = this;
Module['FS_createPreloadedFile'](this.name, null, byteArray, true, true, function() {
Module['removeRunDependency']('fp ' + that.name);
}, function() {
if (that.audio) {
console.log("Fileloader 31");
Module['removeRunDependency']('fp ' + that.name); // workaround for chromium bug 124926 (still no audio with this, but at least we don't hang)
} else {
console.log("Fileloader 32");
Module.printErr('Preloading file ' + that.name + ' failed');
}
}, false, true); // canOwn this data in the filesystem, it is a slide into the heap that will never change
this.requests[this.name] = null;
},
};
console.log("Fileloader 33");
new DataRequest(0, 31356, 0, 0).open('GET', '/mainData');
new DataRequest(31356, 31588, 0, 0).open('GET', '/methods_pointedto_by_uievents.xml');
new DataRequest(31588, 4403916, 0, 0).open('GET', '/sharedassets0.assets');
new DataRequest(4403916, 4410113, 0, 0).open('GET', '/sharedassets0.resource');
new DataRequest(4410113, 5985149, 0, 0).open('GET', '/Resources/unity_default_resources');
new DataRequest(5985149, 6485625, 0, 0).open('GET', '/Resources/unity_builtin_extra');
console.log("Fileloader 34");
function processPackageData(arrayBuffer) {
console.log("Fileloader 35");
Module.finishedDataFileDownloads++;
assert(arrayBuffer, 'Loading data file failed.');
var byteArray = new Uint8Array(arrayBuffer);
var curr;
console.log("Fileloader 36");
// Reuse the bytearray from the XHR as the source for file reads.
DataRequest.prototype.byteArray = byteArray;
DataRequest.prototype.requests["/mainData"].onload();
DataRequest.prototype.requests["/methods_pointedto_by_uievents.xml"].onload();
DataRequest.prototype.requests["/sharedassets0.assets"].onload();
DataRequest.prototype.requests["/sharedassets0.resource"].onload();
DataRequest.prototype.requests["/Resources/unity_default_resources"].onload();
DataRequest.prototype.requests["/Resources/unity_builtin_extra"].onload();
Module['removeRunDependency']('datafile_CatchTheNumber.data');
console.log("Fileloader 37");
};
Module['addRunDependency']('datafile_CatchTheNumber.data');
console.log("Fileloader 38");
if (!Module.preloadResults) Module.preloadResults = {};
console.log("Fileloader 39");
Module.preloadResults[PACKAGE_NAME] = {fromCache: false};
if (fetched) {
console.log("Fileloader 40");
processPackageData(fetched);
fetched = null;
} else {
console.log("Fileloader 41");
fetchedCallback = processPackageData;
}
console.log("Fileloader 42");
}
if (Module['calledRun']) {
console.log("Fileloader 43");
runWithFS();
} else {
console.log("Fileloader 44");
if (!Module['preRun']) Module['preRun'] = [];
Module["preRun"].push(runWithFS); // FS is not initialized yet, wait for it
}
Now I get the error somewhere around here:
(This is from my browsers console prints)
Fileloader 24
Fileloader 26
Fileloader 33
Fileloader 27
Fileloader 28
Fileloader 27
Fileloader 28
Fileloader 27
Fileloader 28
Fileloader 27
Fileloader 28
Fileloader 27
Fileloader 28
Fileloader 27
Fileloader 28
Fileloader 34
Fileloader 38
Fileloader 39
Fileloader 40
Fileloader 35
Fileloader 25
Fileloader 36
Fileloader 29
Fileloader 30
Fileloader 29
Fileloader 30
Fileloader 29
Fileloader 30
Fileloader 29
Fileloader 30
Fileloader 29
Fileloader 30
Fileloader 29
Fileloader 30
Fileloader 37
Fileloader 42
Invoking error handler due to
Uncaught RangeError: Maximum call stack size exceeded
Attached the console logs to different files, so it’s clearer to see the differents
2161282–142855–From js file.txt (1.34 KB)
2161282–142856–from iframe and index file.txt (3.26 KB)