Re: (BETA) Station Dock Control OXP
Posted: Wed Jun 15, 2016 12:00 am
Version 0.13.6 has just been released, which fixes a critical bug that was causing docking ships to dock at non-existent stations.
For information and discussion about Oolite.
https://bb.oolite.space/
Code: Select all
09:16:44.542 [script.javaScript.timeLimit]: ***** ERROR: Script "StationDockControl" ran for 3.25673 seconds and has been terminated.
09:16:44.542 [script.javaScript.stackTrace]: 0 (stationdockcontrol.js:2881) <anonymous function>
09:16:44.542 [script.javaScript.stackTrace]: this: [Script "StationDockControl" version 1.0.6]
09:16:44.542 [script.javaScript.stackTrace]: max: 210
09:16:44.542 [script.javaScript.stackTrace]: 1 (stationdockcontrol.js:3644) <anonymous function>
09:16:44.542 [script.javaScript.stackTrace]: this: [Script "StationDockControl" version 1.0.6]
09:16:44.542 [script.javaScript.stackTrace]: allowAbort: true
09:16:44.542 [script.javaScript.stackTrace]: slots: 2
09:16:44.542 [script.javaScript.stackTrace]: idx: 1
09:16:44.542 [script.javaScript.stackTrace]: station: [Station "S-A1 Coriolis Station" "S-A1 Coriolis Station" position: (-2.41766e+06, 706449, 932715) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT]
09:16:44.542 [script.javaScript.stackTrace]: check_depart: undefined
09:16:44.542 [script.javaScript.stackTrace]: check: undefined
09:16:44.542 [script.javaScript.stackTrace]: tries: 0
09:16:44.542 [script.javaScript.stackTrace]: band_num: 0
09:16:44.542 [script.javaScript.stackTrace]: free: false
09:16:44.542 [script.javaScript.stackTrace]: i: undefined
09:16:44.542 [script.javaScript.stackTrace]: band: [2, 2, 2, 2, ... <210 items total>]
09:16:44.542 [script.javaScript.stackTrace]: depart: 0
09:16:44.543 [script.javaScript.stackTrace]: 2 (stationdockcontrol.js:1832) <anonymous function>
09:16:44.543 [script.javaScript.stackTrace]: this: [Script "StationDockControl" version 1.0.6]
09:16:44.543 [script.javaScript.stackTrace]: station: [Station "S-A1 Coriolis Station" "S-A1 Coriolis Station" position: (-2.41766e+06, 706449, 932715) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT]
09:16:44.543 [script.javaScript.stackTrace]: mbr_pilot: undefined
09:16:44.543 [script.javaScript.stackTrace]: mbr_type: undefined
09:16:44.543 [script.javaScript.stackTrace]: mbr_name: undefined
09:16:44.543 [script.javaScript.stackTrace]: mbr_bounty: undefined
09:16:44.543 [script.javaScript.stackTrace]: esc_pilot: null
09:16:44.543 [script.javaScript.stackTrace]: esc_type: "Gecko"
09:16:44.543 [script.javaScript.stackTrace]: esc_name: "Starboat Capable"
09:16:44.543 [script.javaScript.stackTrace]: esc_bounty: 0
09:16:44.543 [script.javaScript.stackTrace]: leader: undefined
09:16:44.543 [script.javaScript.stackTrace]: groupSize: 3
09:16:44.543 [script.javaScript.stackTrace]: destLoc: "RRS Waystation|1"
09:16:44.543 [script.javaScript.stackTrace]: j: 5
09:16:44.543 [script.javaScript.stackTrace]: ext_equip: "FORE:EQ_WEAPON_BEAM_LASER,EQ_FUEL_INJECTION,X:EQ_ESCAPE_POD,"
09:16:44.543 [script.javaScript.stackTrace]: ext_pilot: null
09:16:44.543 [script.javaScript.stackTrace]: ext_shpName: "Sibyl\'s Buckler II"
09:16:44.543 [script.javaScript.stackTrace]: ext_shpDataKey: "deepspace_cobramk1"
09:16:44.543 [script.javaScript.stackTrace]: ext_shpType: "Cobra Mark I"
09:16:44.543 [script.javaScript.stackTrace]: ext_role: "assassin-light"
09:16:44.543 [script.javaScript.stackTrace]: numext: 3
09:16:44.543 [script.javaScript.stackTrace]: g: 8
09:16:44.543 [script.javaScript.stackTrace]: maxcargo: undefined
09:16:44.543 [script.javaScript.stackTrace]: escortInfo: {...}
09:16:44.543 [script.javaScript.stackTrace]: groupInfo: undefined
09:16:44.543 [script.javaScript.stackTrace]: dest: {...}
09:16:44.543 [script.javaScript.stackTrace]: alleg: "galcop"
09:16:44.543 [script.javaScript.stackTrace]: selHunter: 0.3339305338520647
09:16:44.543 [script.javaScript.stackTrace]: selPirate: 0.032422824222514746
09:16:44.543 [script.javaScript.stackTrace]: i: 109
09:16:44.543 [script.javaScript.stackTrace]: actualCount: 60
09:16:44.543 [script.javaScript.stackTrace]: selection: 0
09:16:44.543 [script.javaScript.stackTrace]: choose: 0.08588330610581334
09:16:44.543 [script.javaScript.stackTrace]: groupData: []
09:16:44.543 [script.javaScript.stackTrace]: escorts: []
09:16:44.543 [script.javaScript.stackTrace]: isLeader: false
09:16:44.543 [script.javaScript.stackTrace]: escortGroupName: ""
09:16:44.543 [script.javaScript.stackTrace]: groupName: ""
09:16:44.543 [script.javaScript.stackTrace]: goods: ""
09:16:44.543 [script.javaScript.stackTrace]: equip: ""
09:16:44.543 [script.javaScript.stackTrace]: heat: 0
09:16:44.543 [script.javaScript.stackTrace]: weapons: 0
09:16:44.543 [script.javaScript.stackTrace]: skill: 0
09:16:44.543 [script.javaScript.stackTrace]: aiName: ""
09:16:44.543 [script.javaScript.stackTrace]: shipDockTime: 180265899876.11978
09:16:44.543 [script.javaScript.stackTrace]: species: ""
09:16:44.543 [script.javaScript.stackTrace]: destHidden: false
09:16:44.543 [script.javaScript.stackTrace]: destSystem: -1
09:16:44.543 [script.javaScript.stackTrace]: home: 193
09:16:44.543 [script.javaScript.stackTrace]: insurance: 0
09:16:44.543 [script.javaScript.stackTrace]: bounty: 0
09:16:44.543 [script.javaScript.stackTrace]: pilot: null
09:16:44.543 [script.javaScript.stackTrace]: depart: 180265925436.11978
09:16:44.543 [script.javaScript.stackTrace]: role: "shuttle"
09:16:44.543 [script.javaScript.stackTrace]: shpName: "S.S. Elegant"
09:16:44.544 [script.javaScript.stackTrace]: shpDataKey: "griff_worm-NPC"
09:16:44.544 [script.javaScript.stackTrace]: shpType: "Worm"
09:16:44.544 [script.javaScript.stackTrace]: ships: 113
09:16:44.544 [script.javaScript.stackTrace]: min: 61
09:16:44.544 [script.javaScript.stackTrace]: max: 183
09:16:44.544 [script.javaScript.stackTrace]: curr: 0
09:16:44.544 [script.javaScript.stackTrace]: factor: 55
09:16:44.544 [script.javaScript.stackTrace]: calctype: 0
09:16:44.544 [script.javaScript.stackTrace]: countGroupMembers: 0
09:16:44.544 [script.javaScript.stackTrace]: countEscorts: 0
09:16:44.544 [script.javaScript.stackTrace]: countHunterHeavy: 0
09:16:44.544 [script.javaScript.stackTrace]: countHunterMedium: 2
09:16:44.544 [script.javaScript.stackTrace]: countHunterLight: 1
09:16:44.544 [script.javaScript.stackTrace]: countPirateHeavy: 0
09:16:44.544 [script.javaScript.stackTrace]: countPirateMedium: 0
09:16:44.544 [script.javaScript.stackTrace]: countPirateLight: 0
09:16:44.544 [script.javaScript.stackTrace]: countPirateInd: 0
09:16:44.544 [script.javaScript.stackTrace]: countShuttle: 29
09:16:44.544 [script.javaScript.stackTrace]: countAssassin: 4
09:16:44.544 [script.javaScript.stackTrace]: countTraderSmuggler: 0
09:16:44.544 [script.javaScript.stackTrace]: countTraderCourier: 0
09:16:44.544 [script.javaScript.stackTrace]: countTraderFreighter: 27
09:16:44.544 [script.javaScript.stackTrace]: stationkey: "S-A1 Coriolis Station_1"
09:16:44.544 [script.javaScript.stackTrace]: stnIndex: 1
09:16:44.544 [script.javaScript.stackTrace]: 3 (stationdockcontrol.js:2534) <anonymous function>
09:16:44.544 [script.javaScript.stackTrace]: this: [Script "StationDockControl" version 1.0.6]
09:16:44.544 [script.javaScript.stackTrace]: timeRange: 1440
09:16:44.544 [script.javaScript.stackTrace]: stns: [[Station "GRS Buoy Factory" "GRS Buoy Factory" position: (72536.3, 72536.8, 502723) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT], [Station "S-A1 Coriolis Station" "S-A1 Coriolis Station" position: (-2.41766e+06, 706449, 932715) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT], [Station "Coriolis Station" "Coriolis Station" position: (-27688.6, 100648, 512819) scanClass: CLASS_STATION status: STATUS_ACTIVE], [Station "Rock Hermit" "Rock Hermit" position: (167189, 2.9081e+06, -203724) scanClass: CLASS_ROCK status: STATUS_IN_FLIGHT], ... <12 items total>]
09:16:44.544 [script.javaScript.stackTrace]: hunterMax: 0.40578703703703706
09:16:44.544 [script.javaScript.stackTrace]: rangeHunterHeavy: [0.02962962962962963, 0.03518518518518519]
09:16:44.544 [script.javaScript.stackTrace]: rangeHunterMedium: [0.007407407407407407, 0.02962962962962963]
09:16:44.544 [script.javaScript.stackTrace]: rangeHunterLight: [0, 0.007407407407407407]
09:16:44.544 [script.javaScript.stackTrace]: pirateMax: 0.8208838013838013
09:16:44.544 [script.javaScript.stackTrace]: rangePirateHeavy: [0.026104751729751723, 0.026104751729751723]
09:16:44.544 [script.javaScript.stackTrace]: rangePirateMedium: [0.026104751729751723, 0.026104751729751723]
09:16:44.544 [script.javaScript.stackTrace]: rangePirateLight: [0.026104751729751723, 0.026104751729751723]
09:16:44.544 [script.javaScript.stackTrace]: rangePirateInd: [0, 0.026104751729751723]
09:16:44.544 [script.javaScript.stackTrace]: traderMax: 0.09405946648552849
09:16:44.544 [script.javaScript.stackTrace]: rangeShuttle: [0.049059466485528495, 0.09405946648552849]
09:16:44.544 [script.javaScript.stackTrace]: rangeAssassin: [0.04821345321345322, 0.049059466485528495]
09:16:44.544 [script.javaScript.stackTrace]: rangeTradeSmuggl: [0.04796092796092796, 0.04821345321345322]
09:16:44.544 [script.javaScript.stackTrace]: rangeTradeCourier: [0.044786324786324785, 0.04796092796092796]
09:16:44.544 [script.javaScript.stackTrace]: rangeTradeFreight: [0, 0.044786324786324785]
09:16:44.544 [script.javaScript.stackTrace]: base: 0.03518518518518519
09:16:44.544 [script.javaScript.stackTrace]: logging: 0
09:16:44.544 [script.javaScript.stackTrace]: slots: 2
09:16:44.545 [script.javaScript.stackTrace]: w: null
09:16:44.545 [script.javaScript.stackTrace]: compare: function compare
09:16:44.545 [script.javaScript.stackTrace]: 4 (stationdockcontrol.js:750) <anonymous function>
09:16:44.545 [script.javaScript.stackTrace]: this: [Script "StationDockControl" version 1.0.6]
09:16:44.545 [script.javaScript.stackTrace]: i: 1
Thanks for that, Day. I've been meaning to come back to SDC and work on performance, as I've occasionally seen those timeout errors as well. And thanks also for the OXP performance thread. Some nice tips in there to get me started!Day wrote:Second, I often have this in my logs:
That was adventurous! SDC was one of those projects where several times I thought I'd gotten to the bottom of things, only to find out the hole was quite a bit deeper than I expected!Day wrote:i tried twice to begin working on refactoring the Station Dock oxp initialization to offer you a patch
Code: Select all
11:41:16.424 [script.javaScript.timeLimit]: ***** ERROR: Script "StationDockControl" ran for 5.54578 seconds and has been terminated.
11:41:16.425 [script.javaScript.stackTrace]: 0 (stationdockcontrol.js:4999) <anonymous function>
11:41:16.425 [script.javaScript.stackTrace]: this: [Script "StationDockControl" version 1.1.0]
11:41:16.425 [script.javaScript.stackTrace]: shipdata: {...}
11:41:16.425 [script.javaScript.stackTrace]: j: 29
11:41:16.425 [script.javaScript.stackTrace]: shipKeys: ["deepspace_cobramk1-alt", "escortdeck-ghavial", "staer9_mw-asp", "hornet_alt_npc", ... <31 items total>]
11:41:16.425 [script.javaScript.stackTrace]: i: 21
11:41:16.425 [script.javaScript.stackTrace]: stn: 8
11:41:16.425 [script.javaScript.stackTrace]: stns: [[Station "DS-A1 Coriolis Station" "DS-A1 Coriolis Station" position: (1.40425e+06, -1.50753e+06, -2.04441e+06) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT], [Station "Star Con Store" "Star Con Store" position: (5599.63, 5390.87, -29360.1) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT], [Station "S-A1 Coriolis Station" "S-A1 Coriolis Station" position: (-2.41766e+06, 706449, 932715) scanClass: CLASS_STATION status: STATUS_IN_FLIGHT], [Station "Rock Hermit" "Rock Hermit" position: (167189, 2.9081e+06, -203724) scanClass: CLASS_ROCK status: STATUS_IN_FLIGHT], ... <10 items total>]
11:41:16.425 [script.javaScript.stackTrace]: 1 (stationdockcontrol.js:413) <anonymous function>
11:41:16.425 [script.javaScript.stackTrace]: this: [Script "StationDockControl" version 1.1.0]
Code: Select all
11:28:41.267 [script.javaScript.timeLimit]: ***** ERROR: Script "StationDockControl" ran for 0.304032 seconds and has been terminated.
11:28:41.268 [script.javaScript.stackTrace]: 0 (stationdockcontrol.js:4994) <anonymous function>
11:28:41.268 [script.javaScript.stackTrace]: this: [Script "StationDockControl" version 1.1.1]
11:28:41.268 [script.javaScript.stackTrace]: stn: [Station "Coriolis Station" "Coriolis Station" position: (-27688.6, 100648, 512819) scanClass: CLASS_STATION status: STATUS_ACTIVE]
11:28:41.268 [script.javaScript.stackTrace]: shipdata: {...}
11:28:41.268 [script.javaScript.stackTrace]: j: 71
11:28:41.268 [script.javaScript.stackTrace]: shipKeys: ["rhs_mark_gnat_shipset", "noshaders_Smivs_Cobra-S9-pirate", "ferdelance3G_hardPirate", "staer9_mw-asp", ... <103 items total>]
11:28:41.268 [script.javaScript.stackTrace]: i: 7
11:28:41.268 [script.javaScript.stackTrace]: 1 (stationdockcontrol.js:1856) $runPopulation()
11:28:41.268 [script.javaScript.stackTrace]: this: [Script "StationDockControl" version 1.1.1]
11:28:41.268 [script.javaScript.stackTrace]: esc_pilot: undefined
11:28:41.268 [script.javaScript.stackTrace]: esc_type: undefined
11:28:41.268 [script.javaScript.stackTrace]: esc_autoAI: undefined
11:28:41.268 [script.javaScript.stackTrace]: esc_name: undefined
11:28:41.268 [script.javaScript.stackTrace]: esc_bounty: undefined
11:28:41.268 [script.javaScript.stackTrace]: esc_key: undefined
11:28:41.268 [script.javaScript.stackTrace]: esc_role: undefined
11:28:41.268 [script.javaScript.stackTrace]: dta: undefined
11:28:41.268 [script.javaScript.stackTrace]: leader: undefined
11:28:41.268 [script.javaScript.stackTrace]: groupSize: undefined
11:28:41.268 [script.javaScript.stackTrace]: destLoc: undefined
11:28:41.268 [script.javaScript.stackTrace]: j: undefined
11:28:41.268 [script.javaScript.stackTrace]: ext_equip: undefined
11:28:41.268 [script.javaScript.stackTrace]: ext_pilot: undefined
11:28:41.268 [script.javaScript.stackTrace]: ext_shpName: undefined
11:28:41.268 [script.javaScript.stackTrace]: ext_shpDataKey: undefined
11:28:41.268 [script.javaScript.stackTrace]: ext_shpType: undefined
11:28:41.268 [script.javaScript.stackTrace]: ext_role: undefined
11:28:41.268 [script.javaScript.stackTrace]: numext: undefined
11:28:41.268 [script.javaScript.stackTrace]: g: undefined
11:28:41.268 [script.javaScript.stackTrace]: maxcargo: undefined
11:28:41.268 [script.javaScript.stackTrace]: escortInfo: undefined
11:28:41.268 [script.javaScript.stackTrace]: groupInfo: undefined
11:28:41.268 [script.javaScript.stackTrace]: hasAutoAI: undefined
11:28:41.268 [script.javaScript.stackTrace]: dest: undefined
11:28:41.268 [script.javaScript.stackTrace]: alleg: undefined
11:28:41.268 [script.javaScript.stackTrace]: choose: undefined
11:28:41.268 [script.javaScript.stackTrace]: autoAI: undefined
11:28:41.268 [script.javaScript.stackTrace]: groupData: undefined
11:28:41.268 [script.javaScript.stackTrace]: escorts: undefined
11:28:41.268 [script.javaScript.stackTrace]: goods: undefined
11:28:41.268 [script.javaScript.stackTrace]: escortGroupName: undefined
11:28:41.268 [script.javaScript.stackTrace]: equip: undefined
11:28:41.268 [script.javaScript.stackTrace]: isLeader: undefined
11:28:41.268 [script.javaScript.stackTrace]: groupName: undefined
11:28:41.268 [script.javaScript.stackTrace]: heat: undefined
11:28:41.268 [script.javaScript.stackTrace]: weapons: undefined
11:28:41.268 [script.javaScript.stackTrace]: skill: undefined
11:28:41.268 [script.javaScript.stackTrace]: aiName: undefined
11:28:41.268 [script.javaScript.stackTrace]: destHidden: undefined
11:28:41.268 [script.javaScript.stackTrace]: destSystem: undefined
11:28:41.268 [script.javaScript.stackTrace]: insurance: undefined
11:28:41.268 [script.javaScript.stackTrace]: shipDockTime: undefined
11:28:41.269 [script.javaScript.stackTrace]: species: undefined
11:28:41.269 [script.javaScript.stackTrace]: home: undefined
11:28:41.269 [script.javaScript.stackTrace]: bounty: undefined
11:28:41.269 [script.javaScript.stackTrace]: pilot: undefined
11:28:41.269 [script.javaScript.stackTrace]: depart: undefined
11:28:41.269 [script.javaScript.stackTrace]: selHunter: undefined
11:28:41.269 [script.javaScript.stackTrace]: selPirate: undefined
11:28:41.269 [script.javaScript.stackTrace]: selection: undefined
11:28:41.269 [script.javaScript.stackTrace]: role: undefined
11:28:41.269 [script.javaScript.stackTrace]: shpName: undefined
11:28:41.269 [script.javaScript.stackTrace]: shpDataKey: undefined
11:28:41.269 [script.javaScript.stackTrace]: shpType: undefined
11:28:41.269 [script.javaScript.stackTrace]: i: undefined
11:28:41.269 [script.javaScript.stackTrace]: actualCount: undefined
11:28:41.269 [script.javaScript.stackTrace]: ships: undefined
11:28:41.269 [script.javaScript.stackTrace]: min: undefined
11:28:41.269 [script.javaScript.stackTrace]: max: undefined
11:28:41.269 [script.javaScript.stackTrace]: curr: undefined
11:28:41.269 [script.javaScript.stackTrace]: factor: undefined
11:28:41.269 [script.javaScript.stackTrace]: calctype: undefined
11:28:41.269 [script.javaScript.stackTrace]: countHunterHeavy: undefined
11:28:41.269 [script.javaScript.stackTrace]: countHunterMedium: undefined
11:28:41.269 [script.javaScript.stackTrace]: countHunterLight: undefined
11:28:41.269 [script.javaScript.stackTrace]: countPirateHeavy: undefined
11:28:41.269 [script.javaScript.stackTrace]: countPirateMedium: undefined
11:28:41.269 [script.javaScript.stackTrace]: countPirateLight: undefined
11:28:41.269 [script.javaScript.stackTrace]: countPirateInd: undefined
11:28:41.269 [script.javaScript.stackTrace]: countShuttle: undefined
11:28:41.269 [script.javaScript.stackTrace]: countAssassin: undefined
11:28:41.269 [script.javaScript.stackTrace]: countTraderSmuggler: undefined
11:28:41.269 [script.javaScript.stackTrace]: countTraderCourier: undefined
11:28:41.269 [script.javaScript.stackTrace]: countTraderFreighter: undefined
11:28:41.269 [script.javaScript.stackTrace]: stationkey: undefined
11:28:41.269 [script.javaScript.stackTrace]: stnIndex: undefined
11:28:41.269 [script.javaScript.stackTrace]: slots: undefined
11:28:41.269 [script.javaScript.stackTrace]: station: undefined
11:28:41.269 [script.javaScript.stackTrace]: logging: undefined
11:28:41.269 [script.javaScript.stackTrace]: trueValues: undefined