Main room unresponsive



  •  Hi All!

    I'm experiencing strange behaviour on my main room - W71N4. Both steam client and browser client became unresponsive whenever I want to check that room. Chrome browser even wanted to kill that tab.

    Console logs stop or  missing several (10+) game ticks. I switched of creep chat, flags. 

    I have this also on my local private server (launched from steam client). 
    I checked it on booth my PC and laptop. The same. 

    All other rooms fine, simulation is fine.
    It's annoying to check the central room via memory watch and console log watching a nearly empty neighbour room.

    Any idea, advice?

    TJ

     edit: typos


  • YP

    I don't know.. but I have one room where the roads will disappear if you zoom in chrome .. I tried it on different pcs.

     

    maybe you could try the chrome dev tools to check what happens.


  • Culture

    Most of my rooms have disappearing roads when zoomed in. I even have one room that has roads that shouldn't exist but do.



  • Followups:

    chrome devtools become unresponsive too, tab running screeps hangs, devtools shows lots of error in 1 minute: 

    these:

    Uncaught Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
    Watchers fired in the last 5 iterations: [[{"msg":"fn: g","newVal":{},"oldVal":{}},{"msg":"fn: g","newVal":{},"oldVal":{}}],[{"msg":"fn: g","newVal":{},"oldVal":"..."},{"msg":"fn: g","newVal":{},"oldVal":"..."}],[{"msg":"fn: g","newVal":{},"oldVal":"..."},{"msg":"fn: g","newVal":{},"oldVal":"..."}],[{"msg":"fn: g","newVal":{},"oldVal":"..."},{"msg":"fn: g","newVal":{},"oldVal":"..."},{"msg":"fn: function (c,e,f,g){var h=d&&g?g[0]:a(c,e,f,g);return b(h,c,e)}","newVal":"35:55:54","oldVal":"35:55:55"}],[{"msg":"fn: g","newVal":{},"oldVal":"..."},{"msg":"fn: g","newVal":{},"oldVal":"..."}]]
    http://errors.angularjs.org/1.5.8/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22ms…22fn%3A%20g%22%2C%22newVal%22%3A%7B%7D%2C%22oldVal%22%3A%22...%22%7D%5D%5D
    at angular.js?bust=1482851136401":1
    at o.$digest (angular.js?bust=1482851136401":3)
    at o.$apply (angular.js?bust=1482851136401":3)
    at angular.js?bust=1482851136401":3
    at f (angular.js?bust=1482851136401":1)
    at angular.js?bust=1482851136401":1

     

    I'm javascript rookie so no idea. 

     

     

    Private server CLI shows these:


    CLI listening on localhost:21026
    [127.0.0.1:50034] Incoming CLI connection
    Running cronjob 'sendNotifications'
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'genPowerBanks'
    Running cronjob 'genInvaders'
    Running cronjob 'purgeTransactions'
    Running cronjob 'recreateNpcOrders'
    Running cronjob 'calcMarketStats'
    Running cronjob 'roomsForceUpdate'
    Sign in: myname (numbers), IP=127.0.0.1, steamid=numbers2
    GET /socket/info 3ms 200
    GET /socket/938/vdh3w0w2/websocket 3ms (unfinished)
    Unhandled rejection: Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
    at ServerResponse.header (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\express\lib\response.js:719:10)
    at ServerResponse.send (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\express\lib\response.js:164:12)
    at ServerResponse.json (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\express\lib\response.js:250:15)
    at E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q-json-response\q-json-response.js:17:14
    at _rejected (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:844:24)
    at E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:870:30
    at Promise.when (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:1122:31)
    at Promise.promise.promiseDispatch (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:788:41)
    at E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:604:44
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'sendNotifications'
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'sendNotifications'
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'sendNotifications'
    Running cronjob 'roomsForceUpdate'
    GET /socket/info 2ms 200
    GET /socket/202/hgb54idu/websocket 4ms (unfinished)
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'roomsForceUpdate'
    invalid room <<< edit: this happened when I changed from the unresponsive room to world view
    Unhandled rejection: Error: Can't set headers after they are sent.
    at ServerResponse.OutgoingMessage.setHeader (_http_outgoing.js:344:11)
    at ServerResponse.header (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\express\lib\response.js:719:10)
    at ServerResponse.send (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\express\lib\response.js:164:12)
    at ServerResponse.json (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\express\lib\response.js:250:15)
    at E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q-json-response\q-json-response.js:17:14
    at _rejected (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:844:24)
    at E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:870:30
    at Promise.when (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:1122:31)
    at Promise.promise.promiseDispatch (E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:788:41)
    at E:\SteamLibrary\steamapps\common\Screeps\server\node_modules\q\q.js:604:44
    Running cronjob 'sendNotifications'
    Running cronjob 'roomsForceUpdate'
    Running cronjob 'roomsForceUpdate'

     

    reinstalling screeps, firewall/antivirus were not help


  • Culture

    What happens if you use the browser instead of the steam client? I'm able to view your room that way.



  • The browser tab stops, even worse than the steam client. It's probably not about the room, but some local computer issue. 
    What is the way to use the private server via browser?



  • well.
    bug/feature/user error - a dev will decide 😉

    In the early development of my colony I assigned a flag to every creep, and modified the creep move line to show the target by re-positioning the respective flag:

    extra spawn code:
    Game.rooms[current_room_name].createFlag(10,10,roleName + '-' + id);

    extra code in the roles:
    creep.moveTo(source);
    if(Game.flags[creep.name]) {Game.flags[creep.name].setPosition(source.pos);}

    actually i was carefully to modify the memory garbage collector to remove the flag of the died creep
    delete Memory.creeps[n]; if(Game.flags[n]) {Game.flags[n].remove();}    

    Showing the flag around helped me to visualize and analyze creep move behavior.


    As my code expanded I got run out of CPU. The profiler showed insane amount of CPU spent of flag re-positioning, like 3. 3 whole CPU. 
    Well disabled the flag creation and as creeps gave way to new generations I disabled the flag remove in the garbage collector.
    I had an disabled fail-safe in the main loop also:
    // for(var name in Game.flags) { console.log("Removing: " + name); Game.flags[name].remove();}

    I had to disable it because my expansion code still need flags set by me manualy.

    End of week, I had time to tend the colony. I noticed that while my expansion flag in invisible in the expansion room, a main room has some flags laying around. Some.... 20+ on the same position
    Because all my creep and flags is timestamped, I could check them against each other. Current creeps has no flag as inteded (timestamp: around 1485411503053) Flags timestamps around: 1485003747282.
    My time stamp is based on Game time:
    var timestamp = new Date().getTime();

    So somewhere beetween 14 and 16 days before my code forgot to remove the flags.

    The first run of the all flag remover:
    for(var name in Game.flags) { console.log("Removing: " + name); Game.flags[name].remove();}
    made the situation better, but still left 4 flag on the map. After the second run I see no extra flags around.

    TLDR;
    Do not out put too many flag in one room.
    I have no idea why the too many (??) flag affected on my client and not tedivm's who also checked my room.
    The all flag remover has limits.

    This was my story with flags.

    And here is an other one 😉 

    ps: edit: lot of typo


  • YP

    Others have no problems with your rooms because only you can see your flags 🙂