[TRUNK] Galactic Jump Bug
Moderators: winston, another_commander, Getafix
[TRUNK] Galactic Jump Bug
I'm currently using TRUNK revision 5006 and I've discovered that when jumping to a new galaxy the system is in total darkness - actually it's like you're in the middle of nowhere and can't see anything! However when jumping to another system everything returns to normal. I originally thought I had caused this error with some modifying I was doing that (sucessfully) enabled me to have more than 8 galaxies. However, when I removed the source code, downloaded again and compiled again from scratch to see if it was my own doing the same error happened with the code unmodified.
Is this an issue, or am I the only one with this error?
UPDATE: To make sure this was not because I was playing with the code I completely removed revision 5006 and downloaded it again and complied - same error! I even downloaded the code for 1.76.1 and compiled that to make sure it wasn't the compiler (I'm using MINGW32 on Windows XP SP3) and it worked fine. I even applied my small change to boost galaxy limit to 16 galaxies and it worked fine. Definitely a bug on revision 5006 I think...
Is this an issue, or am I the only one with this error?
UPDATE: To make sure this was not because I was playing with the code I completely removed revision 5006 and downloaded it again and complied - same error! I even downloaded the code for 1.76.1 and compiled that to make sure it wasn't the compiler (I'm using MINGW32 on Windows XP SP3) and it worked fine. I even applied my small change to boost galaxy limit to 16 galaxies and it worked fine. Definitely a bug on revision 5006 I think...
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
- Commander McLane
- ---- E L I T E ----
- Posts: 9520
- Joined: Thu Dec 14, 2006 9:08 am
- Location: a Hacker Outpost in a moderately remote area
- Contact:
Re: [TRUNK] Galactic Jump Bug
Have you by any chance the galactic misjump OXP installed?
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: [TRUNK] Galactic Jump Bug
Confirmed here as-well. No OXPs. Looks like the player ship is being moved to an invalid position on wormhole exit - perhaps something to do with r4989? :d system reports as it should.
> dumpObject(eval("player.ship"))
{
manifest: [object Manifest],
aftShield: 128,
aftShieldRechargeRate: 2,
compassMode: "COMPASS_MODE_BASIC",
compassTarget: [Planet position: (0, 0, 649990) radius: 59090 m],
cursorCoordinates: (21, 184, 0),
cursorCoordinatesInLY: (8.4, 36.8, 0),
docked: false,
dockedStation: null,
forwardShield: 128,
forwardShieldRechargeRate: 2,
fuelLeakRate: 0,
galacticHyperspaceBehaviour: "BEHAVIOUR_STANDARD",
galacticHyperspaceFixedCoords: (96, 96, 0),
galacticHyperspaceFixedCoordsInLY: (38.4, 19.2, 0),
galaxyCoordinates: (21, 184, 0),
galaxyCoordinatesInLY: (8.4, 36.8, 0),
hud: "hud.plist",
hudHidden: false,
laserHeatLevel: 0,
maxAftShield: 128,
maxForwardShield: 128,
price: 150000,
reticleTargetSensitive: false,
scoopOverride: false,
serviceLevel: 95,
specialCargo: null,
targetSystem: 213,
viewDirection: "VIEW_FORWARD",
weaponsOnline: true,
accuracy: 0,
aftWeapon: null,
AI: "oolite-player-AI.plist",
AIState: "GLOBAL",
autoAI: true,
beaconCode: null,
boundingBox: (130, 30, 65),
bounty: 0,
cargoSpaceUsed: 0,
cargoSpaceCapacity: 20,
cargoSpaceAvailable: 20,
contracts: [],
cloakAutomatic: true,
cruiseSpeed: 280,
dataKey: "cobra3-player",
defenseTargets: null,
desiredSpeed: 175,
displayName: "Cobra Mark III",
entityPersonality: 28753,
equipment: [],
escorts: null,
escortGroup: [OOShipGroup "escort group", 1 ships, leader: <PlayerEntity 0xb57d9c0>{"Cobra Mark III"}],
forwardWeapon: [EquipmentInfo EQ_WEAPON_PULSE_LASER "Pulse Laser"],
fuel: 7,
fuelChargeRate: 1,
group: null,
hasHostileTarget: false,
hasHyperspaceMotor: true,
hasSuspendedAI: false,
heatInsulation: 1,
heading: (-0.0244739, 0.0584068, 0.997993),
isBeacon: false,
isCloaked: false,
isCargo: false,
isDerelict: false,
isFrangible: true,
isJamming: false,
isMine: false,
isMissile: false,
isPiloted: true,
isPirate: false,
isPirateVictim: true,
isPolice: false,
isRock: false,
isBoulder: false,
isThargoid: false,
isTrader: true,
isWeapon: false,
lightsActive: true,
maxSpeed: 350,
maxThrust: 32,
missileCapacity: 4,
missileLoadTime: 0,
missiles: [[EquipmentInfo EQ_MISSILE "Missile"], [EquipmentInfo EQ_MISSILE "Missile"], [EquipmentInfo EQ_MISSILE "Missile"]],
name: "Cobra Mark III",
passengerCount: 0,
passengerCapacity: 0,
passengers: [],
pitch: 0,
portWeapon: null,
potentialCollider: null,
primaryRole: "player",
reportAIMessages: false,
roleWeights: {
"[cobra3-player]": 1,
player: 1
},
roles: ["[cobra3-player]", "player"],
roll: 0,
savedCoordinates: (0, 0, 0),
scannerDisplayColor1: null,
scannerDisplayColor2: null,
scannerRange: 25600,
script: [Script "oolite-default-player-script" version 1.77],
scriptedMisjump: false,
scriptInfo: {},
speed: 350,
starboardWeapon: null,
subEntities: [],
subEntityCapacity: 0,
target: null,
temperature: 0.234375,
thrust: 32,
thrustVector: (-8.56588, 20.4424, 349.297),
trackCloseContacts: false,
vectorForward: (-0.0244739, 0.0584068, 0.997993),
vectorRight: (0.985492, 0.169121, 0.0142697),
vectorUp: (-0.167948, 0.983863, -0.0616985),
velocity: (-8.56588, 20.4424, 349.297),
weaponFacings: 15,
weaponRange: 12500,
withinStationAegis: false,
yaw: 0,
collisionRadius: 72.7341079711914,
distanceTravelled: NaN,
energy: 256,
mass: 185580.015625,
maxEnergy: 256,
orientation: (-0.99591 - 0.0301496i - 0.00972569j + 0.0846135k),
owner: null,
position: (-1.#IND, -1.#IND, -1.#IND),
scanClass: "CLASS_PLAYER",
spawnTime: 0,
status: "STATUS_IN_FLIGHT",
isPlanet: false,
isPlayer: true,
isShip: true,
isStation: false,
isSubEntity: false,
isSun: false,
isValid: true,
isVisible: true
}
Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Re: [TRUNK] Galactic Jump Bug
That's the same kind of description that NPC entities get with DockLights and Swarm sometimes.
My OXPs via Boxspace or from my Wiki pages .
Thargoid TV
Dropbox Referral Link
Thargoid TV
Dropbox Referral Link
Re: [TRUNK] Galactic Jump Bug
I do have this OXP installed but I also tried it without any addons and still had the same problem. Thought it was my illicit editing of the code (very naughty!) but I managed to replicate this error even with unmodified code straight from the TRUNK.Commander McLane wrote:Have you by any chance the galactic misjump OXP installed?
Well at least it isn't just me after all!Capt. Murphy wrote:Confirmed here as-well. No OXPs. Looks like the player ship is being moved to an invalid position on wormhole exit - perhaps something to do with r4989? :d system reports as it should.
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: [TRUNK] Galactic Jump Bug
I can't reproduce this. But it could have to do with different handling of undefined variables on different systems. As this seems to be a recent bug, it could be in playerEntity.m lines 5370 till 5405. The code assumes there that the player has a wormhole, but it has none when galactic jumping. On the Mac compile I see no weird results though.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: [TRUNK] Galactic Jump Bug
Umm...I originally modified PlayerEntity.m to play around with the idea that more than 8 galaxies were possible as it has been theorised that it isn't. But I also replicated this error with unmodified code straight from the TRUNK... and the code that I then modified in 1.76.1's source did work without this error, so I think the problem is definitely with the TRUNK...Eric Walch wrote:I can't reproduce this. But it could have to do with different handling of undefined variables on different systems. As this seems to be a recent bug, it could be in playerEntity.m lines 5370 till 5405. The code assumes there that the player has a wormhole, but it has none when galactic jumping. On the Mac compile I see no weird results though.
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Re: [TRUNK] Galactic Jump Bug
I would guess it is this line: flightSpeed = [wormhole exitSpeed];Eric Walch wrote:I can't reproduce this. But it could have to do with different handling of undefined variables on different systems. As this seems to be a recent bug, it could be in playerEntity.m lines 5370 till 5405. The code assumes there that the player has a wormhole, but it has none when galactic jumping. On the Mac compile I see no weird results though.
On some systems that may set the speed to an undefined value, which could then set the position to an undefined value on the next update.
- Eric Walch
- Slightly Grand Rear Admiral
- Posts: 5536
- Joined: Sat Jun 16, 2007 3:48 pm
- Location: Netherlands
Re: [TRUNK] Galactic Jump Bug
That was my guess also. But on testing the current code I had no weird stuff, so I could not test that change eithercim wrote:I would guess it is this line: flightSpeed = [wormhole exitSpeed];
On some systems that may set the speed to an undefined value, which could then set the position to an undefined value on the next update.
One other thing I noticed in CaptMurphys dump. I get after Gal jumping:
Code: Select all
distanceTravelled: 20087.384765625,
position: (-4826.91, 3020.19, 994.167),
scanClass: "CLASS_PLAYER",
distanceTravelled
as it is never reset and should continue in the next galaxy. I did notice, it is never initialised for any ship except missiles. On the mac it defaults to zero and than is updated every frame for every ship. It seems CaptMurphys starts with a NaN and than updating becomes impossible. I wonder if that JS property was ever usable in his system (and windows in general) for ships other than missiles?Unrelated 'harmless bug':
distanceTravelled
only adds traveled distance by speed, not the fraction traveled by velocity. But missiles are launched with an initial velocity. That means an initial part of the traveled distance is missed in the total calculated value. I noticed this behaviour some time ago, when I noticed the
distanceTravelled
for cargo pods is always zero. Pods have no thrust, so they keep their initial velocity although their speed is set to zero.But, also accumulating distance traveled by velocity would increase the overhead on every update with no real gain. At least there is now no code that could benefit from it. And it only affects ships without any thrust, like cargo and rocks.
UPS-Courier & DeepSpacePirates & others at the box and some older versions
Re: [TRUNK] Galactic Jump Bug
Since the purpose of tracking distanceTravelled for missiles is to monitor their limited fuel supply, I think that's probably correct behaviour anyway.Eric Walch wrote:Unrelated 'harmless bug':distanceTravelled
only adds traveled distance by speed, not the fraction traveled by velocity. But missiles are launched with an initial velocity. That means an initial part of the traveled distance is missed in the total calculated value.
-
- Quite Grand Sub-Admiral
- Posts: 6683
- Joined: Wed Feb 28, 2007 7:54 am
Re: [TRUNK] Galactic Jump Bug
wormhole
seems to be nil when the -leaveWitchspace method is entered following a galactic jump. I am not sure where a wormhole is initialized when galjumping (I think it isn't), but I now know that the problem happens because wormhole is nil.Edit: Tentative fix in r5007. Gal jumping now works for me.
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: [TRUNK] Galactic Jump Bug
Just tested r5008 and it seems to be working fine now.
Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: [TRUNK] Galactic Jump Bug
Seems to be (if I understand your meaning).Eric Walch wrote:I wonder if that JS property was ever usable in his system (and windows in general) for ships other than missiles?
> PS.target.distanceTravelled
3996.499267578125
> PS.target.distanceTravelled
4208.4990234375
> PS.target
[Ship "Duma" position: (-50150.5, 52900, 416395) scanClass: CLASS_POLICE status: STATUS_IN_FLIGHT]
Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
Re: [TRUNK] Galactic Jump Bug
Working for me as well now I can explore the new features in the TRUNK. Thanks!
Desktop PC: CPU: Intel i7-4790K Quad Core 4.4GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1080Ti RAM: 32GB DDR3
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
Laptop PC: CPU: Intel i5-10300H Quad Core 4.5GHz (Turbo-Charged) GPU: Nvidia GeForce GTX 1650 RAM: 32GB DDR4
- Capt. Murphy
- Commodore
- Posts: 1127
- Joined: Fri Feb 25, 2011 8:46 am
- Location: UK South Coast.
Re: [TRUNK] Galactic Jump Bug
I think I've found another buglet with the new wormhole code.
In 1.76.1, docking with a carrier (I tested with a Behemoth), giving it an exit.System() command via the console, then launching places the player some distance away from the carrier in the new system (which probably isn't correct behaviour anyway, but....), doing the same in r5008 places the player so close to the carrier and flying in it's direction that collision and death are inevitable.
Edit to add, it doesn't seem to affect launching after using 'the docking with a carrier' route to escaping Interstellar space.
In 1.76.1, docking with a carrier (I tested with a Behemoth), giving it an exit.System() command via the console, then launching places the player some distance away from the carrier in the new system (which probably isn't correct behaviour anyway, but....), doing the same in r5008 places the player so close to the carrier and flying in it's direction that collision and death are inevitable.
Edit to add, it doesn't seem to affect launching after using 'the docking with a carrier' route to escaping Interstellar space.
Capt. Murphy's OXPs
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1
External JavaScript resources - W3Schools & Mozilla Developer Network
Win 7 64bit, Intel Core i5 with HD3000 (driver rev. 8.15.10.2696 - March 2012), Oolite 1.76.1