Error on shard1 after my code processes


  • Culture

    I'm getting an error every tick on shard1 (but not shard0). This is happening after my "kernel" finishes processing and has logged its last message.

    TypeError: Cannot read property '13' of undefined
        at addObjectToRegister (/opt/engine/dist/game/game.js:72:141)
        at EventEmitter.makeGameObject (/opt/engine/dist/game/game.js:241:17)
        at Object.exports.runCode (/opt/engine/dist/game/game.js:436:63)
        at connectPromise.then.then.e (/opt/engine/dist/core/runtime/runtime.js:370:31)
        at _fulfilled (/opt/engine/dist/core/node_modules/q/q.js:834:54)
        at self.promiseDispatch.done (/opt/engine/dist/core/node_modules/q/q.js:863:30)
        at Promise.promise.promiseDispatch (/opt/engine/dist/core/node_modules/q/q.js:796:13)
        at /opt/engine/dist/core/node_modules/q/q.js:604:44
        at runSingle (/opt/engine/dist/core/node_modules/q/q.js:137:13)
        at flush (/opt/engine/dist/core/node_modules/q/q.js:125:13)
    

  • Culture

    Actually I take that back- it appears my code isn't running at all on shard1 and is just giving the error. I had confused the closing logs from shard0 with shard1. Right now it seems my code isn't running at all on shard1 due to this error (not super urgent as my creeps are just gathering market and other intel data and have not actually claimed a room).


  • Dev Team

    I can see that your shard1 console looks fine currently, so the problem is problably gone by now.

    According to the stacktrace you provided, it seems that some of your creeps happened to be at invalid coordinates in the room, like x:-1. It is probably related to intershard portal mechanics, we'll look into it, thanks for the info.