Maximum Call Back Size Exceeded



  • Moving units from room to room gave the following error when using

    var roomExits = Game.map.describeExits(unit.room.name);

    Error:
    [7:57:16 PM]RangeError: Maximum call stack size exceeded
    at String.match (native)
    at Object.exports.calcCreepCost.exports.checkConstructionSite.structureType.rampart._.any.exports.getDiff.exports.checkControllerAvailability.exports.roomNameToXY (/opt/engine/dist/utils.js:344:22)
    at Object.describeExits (/opt/engine/dist/game/map.js:169:46)
    at getRoomForExit (Defense:174:27)



  • This issue is reproducible if you call this function several times. If you stop calling and resume it willl go away and then come back. Is there a fix for this?

    Not sure if the full error helps but:

    [3:59:59 PM]RangeError: Maximum call stack size exceeded
    at String.match (native)
    at Object.exports.calcCreepCost.exports.checkConstructionSite.structureType.rampart._.any.exports.getDiff.exports.checkControllerAvailability.exports.roomNameToXY (/opt/engine/dist/utils.js:344:22)
    at Object.describeExits (/opt/engine/dist/game/map.js:169:46)
    at getRoomForExit (Defense:174:27)
    at findNextRoom (Defense:234:17)
    at findNextRoom (Defense:248:12)
    at findNextRoom (Defense:248:12)
    at findNextRoom (Defense:248:12)
    at findNextRoom (Defense:248:12)



  • This is still a problem, are the devs aware of this? Any particular information that would help?


  • Dev Team

    Try to debug those findNextRoom calls, it seems to be a problem in the recursion in your code.