Oolite Bulletins

For information and discussion about Oolite.
It is currently Sun Feb 18, 2018 9:01 am

All times are UTC




Post new topic  Reply to topic  [ 35 posts ]  Go to page Previous 1 2 3

Would you get an improved HUD?
Poll ended at Mon Jun 10, 2013 5:57 pm
Yes 40%  40%  [ 2 ]
No 60%  60%  [ 3 ]
Total votes: 5
Author Message
PostPosted: Mon Mar 13, 2017 10:04 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2446
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Quote:
Just to be clear, the two events (escapePodSequenceOver and shipReleasedEquipment) have been in the game for a long time (at least v1.75). It's just that the Wiki pages didn't have any mention of them, so they were kind of invisible.
Ok so the last LogEvents update added about a dozen of new and two older events. Thanks phkb for fixing the wiki!

_________________
OXPs by Norby


Top
   
PostPosted: Sat Jun 24, 2017 1:52 am 
Offline
Dangerous
Dangerous

Joined: Fri Mar 17, 2017 1:49 am
Posts: 64
LogEvents is throwing an error: cyclic object value (don't ask me, I've never seen it before!)
This occurs when cycling the compass in a heavily populated system, eg. 4 orbs (planet,moon or sun), 4 stations, 3 buoys
Code:
Exception: TypeError: cyclic object value
    Active script: logevents 1.1
    logevents.js, line 487:
    			n = JSON.stringify(target); // ** this is now line 487 **, sometimes get  TypeError: cyclic object value
To narrow it down, I modified $LogEvents_TargetName and got:
Code:
in LogEvents_TargetName, caught error: TypeError: cyclic object value

target = [VisualEffect position: (-2235.38, 170098, 753921) scanClass: CLASS_VISUAL_EFFECT status: STATUS_EFFECT]

*** TypeError: cyclic object value
*** line: 487 in file: ../AddOns/Norby.LogEvents.oxp/Scripts/logevents.js
 line: 487 in function: ([object VisualEffect]) in ../AddOns/Norby.LogEvents.oxp/Scripts/logevents.js
> line: 416 in function: ("compass targeted",[object VisualEffect],"in mode COMPASS_MODE_BEACONS") in ../AddOns/Norby.LogEvents.oxp/Scripts/logevents.js
>> line: 334 in function: ([object VisualEffect],"COMPASS_MODE_BEACONS") in ../AddOns/Norby.LogEvents.oxp/Scripts/logevents.js
Here's how I modified $LogEvents_TargetName;
Code:
this.$LogEvents_TargetName = function( target ) { //support for ShipVersion OXP to log ship version also
	if( !target ) return("lost target");
	var n = "";
	if( target.name ) n = target.name;
	else {
		try {
			n = JSON.stringify(target); // ** this is now line 487 **, sometimes get  TypeError: cyclic object value
		} catch( err ) {
			log(this.name, '**************************************************************************************' );
			log(this.name, 'in LogEvents_TargetName, caught error: ' + err );
			log(this.name, '    target = ' + target );
			if( err /*instanceof TypeError*/ ) this._rpt_error( err );
			log(this.name, '**************************************************************************************' );
			throw err;
		}
	}
	if( target.script && target.script.$Detectors_Origname )
		n = target.script.$Detectors_Origname;
	return( n + " " + target.entityPersonality );
Here's a dump of the offending entity:
Code:
{
    beaconCode: "Thoth",
    beaconLabel: "Thoth (Moon)",
    dataKey: "planetaryCompass_moon",
    isBreakPattern: false,
    scaleX: 1,
    scaleY: 1,
    scaleZ: 1,
    scannerDisplayColor1: null,
    scannerDisplayColor2: null,
    hullHeatLevel: 0.234375,
    script: [Script "oolite-default-effect-script" version 1.84],
    scriptInfo: {},
    shaderFloat1: 0,
    shaderFloat2: 0,
    shaderInt1: 0,
    shaderInt2: 0,
    shaderVector1: (0, 0, 0),
    shaderVector2: (0, 0, 0),
    subEntities: null,
    vectorForward: (0.731917, 0.21657, 0.646061),
    vectorRight: (-0.616752, 0.613644, 0.493009),
    vectorUp: (-0.28968, -0.759302, 0.582706),
    collisionRadius: 0.00502493791282177,
    distanceTravelled: 0,
    energy: 0,
    heading: (0.731917, 0.21657, 0.646061),
    mass: 0,
    maxEnergy: 0,
    orientation: (0.259811 - 0.35231i - 0.229885j - 0.869212k),
    owner: null,
    position: (-2235.38, 170098, 753921),
    scanClass: "CLASS_VISUAL_EFFECT",
    spawnTime: 2.4590001106262207,
    status: "STATUS_EFFECT",
    isPlanet: false,
    isPlayer: false,
    isShip: false,
    isDock: false,
    isStation: false,
    isSubEntity: false,
    isSun: false,
    isValid: true,
    isInSpace: true,
    isVisible: true,
    isVisualEffect: true,
    isWormhole: false
}

_________________
"Better to be thought a fool, boy, than to open your trap and remove all doubt." - Grandma [over time, just "Shut your trap... fool"]
"The only stupid questions are the ones you fail to ask." - Dad
How do I...? Nevermind.


Top
   
PostPosted: Sat Jun 24, 2017 12:15 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2446
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
Thank you cag for the report. LogEvents 1.2 is up with support for additional planets and moons in compass.

The "cyclic object value" happen in the core when I try to stringify a VisualEffect. It is odd but the try-catch is useful as a workaround, thank you for the idea.

_________________
OXPs by Norby


Top
   
PostPosted: Mon Jan 29, 2018 3:32 pm 
Offline
---- E L I T E ----
---- E L I T E ----
User avatar

Joined: Mon May 20, 2013 9:53 pm
Posts: 2446
Location: Budapest, Hungary (Mainly Agricultural Democracy, TL10)
LogEvents v1.3 uses the new events of Oolite 1.86 and got some minor fixes by cag.

_________________
OXPs by Norby


Top
   
PostPosted: Wed Jan 31, 2018 11:22 am 
Offline
Dangerous
Dangerous
User avatar

Joined: Thu Mar 30, 2017 9:57 pm
Posts: 75
I will definitely be giving this oxp a whirl

The amount of times that I have had police ships open fire and swarm after me (even though I'm clean), well I've lost count of how many times but it's a lot.
Anything that can help shed light on what's going on sure will be appreciated.
Can't believe that I have never noticed this oxp before.

Cheers to you Norby :D


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 35 posts ]  Go to page Previous 1 2 3

All times are UTC


Who is online

Users browsing this forum: BlackWolf and 14 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Powered by phpBB® Forum Software © phpBB Limited