Wormholes, sometimes broken - r.364

For test results, bug reports, announcements of new builds etc.

Moderators: winston, another_commander, Getafix

Post Reply
oO
Competent
Competent
Posts: 32
Joined: Sat Oct 15, 2005 8:51 pm

Wormholes, sometimes broken - r.364

Post by oO »

To reproduce
- wait outside station
- follow the first ship that exits it
- in a while that ship will create a wormhole
- try to enter the wormhole
- if it was the only AI ship around the wormhole will work, if there are another AI ships around the wormhole won't work and the other AI ships will try to get inside the wormhole, sometimes getting "stuck" to it somehow.

version: svn://svn.berlios.de/oolite-linux/trunk rev. 364
Addons: behemouth, deposed, eagle2, impcourier, pirate coves, supercobra, thargoidwars.


EDIT: hmm doesn't seem reproducible without addons, will do more testing

EDIT2: only could reproduce it 3 times... out of a lot of tries, i don't know what could be the problem.
oO
Competent
Competent
Posts: 32
Joined: Sat Oct 15, 2005 8:51 pm

Post by oO »

I noticed this bug today again:

I went through a wormhole and nothing happened, 2 other AIs (escorts to the wormhole opener) got stuck to the wormhole like flies into sticking paper. And then after a while they got sucked into it, and i could use it too... weird

Couldn't find a way to reproduce it :(

EDIT: ah yes i could reproduce this twice (but tried more times, so it's not sure), i had enabled a pair of NSLogs when this happened and disabled the random selection of worlds as you can see in the svn diff:

Code: Select all

> svn diff
Index: src/Core/ShipEntity (AI).m
===================================================================
--- src/Core/ShipEntity (AI).m  (revision 366)
+++ src/Core/ShipEntity (AI).m  (working copy)
@@ -788,13 +788,14 @@
        // select one at random
        int i = 0;
        if (n_dests > 1)
-               i = ranrot_rand() % n_dests;
+               i = 10;
+               //i = ranrot_rand() % n_dests;

        NSString* systemSeedKey = [(NSDictionary*)[dests objectAtIndex:i] objectForKey:@"system_seed"];
        Random_Seed targetSystem = [Entity seedFromString:systemSeedKey];
        fuel -= 10 * [[(NSDictionary*)[dests objectAtIndex:i] objectForKey:@"distance"] doubleValue];

-//     NSLog(@"DEBUG %@ leaving this system for  %@", self, [universe getSystemName:targetSystem]);
+       NSLog(@"DEBUG %@ leaving this system for  %@", self, [universe getSystemName:targetSystem]);

        // create wormhole
        whole = [[[WormholeEntity alloc] initWormholeTo: targetSystem fromShip: self] autorelease];
Index: src/Core/Universe.m
===================================================================
--- src/Core/Universe.m (revision 366)
+++ src/Core/Universe.m (working copy)
@@ -5410,7 +5410,7 @@
                }
        }

-//     NSLog(@"DEBUG found possible destinations: %@", result);
+       NSLog(@"DEBUG found possible destinations: %@", result);

        return result;
 }

The one at the end of [universe nearbyDestinationsWithinRange:] was:

2006-03-26 05:11:34.000 oolite[17056] DEBUG found possible destinations: ({distance = 4; name = Terea; system_seed = "128 109 32 69 13 156"; }, {distance = 5.2; name = Oresri; system_seed = "24 85 164 58 237 249"; }, {distance = 5.600000000000001; name = Usle; system_seed = "138 99 232 85 83 136"; }, {distance = 5.600000000000001; name = Uscela; system_seed = "138 117 236 70 219 72"; }, {distance = 6.4; name = Maregeis; system_seed = "74 121 200 73 83 139"; }, {distance = 0.8; name = Laenin; system_seed = "128 87 160 69 13 21"; }, {distance = 6.800000000000001; name = Reinen; system_seed = "56 102 172 55 125 142"; }, {distance = 2; name = Esbeus; system_seed = "186 94 16 75 179 41"; }, {distance = 3.2; name = Lerelace; system_seed = "64 72 112 69 45 97"; }, {distance = 4.4; name = Tibionis; system_seed = "250 108 176 65 179 215"; }, {distance = 3.2; name = Xeoner; system_seed = "128 78 96 78 141 66"; })


The other NSLog at performHyperSpaceExit:

2006-03-26 05:11:34.000 oolite[17056] DEBUG
<ShipEntity Python 207 (trader) BEHAVIOUR_IDLE on target 0> leaving this system for Xeoner


When the 2 escorts were comming, i paused and hit "0", the result was:

2006-03-26 05:24:13.000 oolite[17056] DEBUG ENTITY DUMP: [entities count] = 60, n_entities = 60
2006-03-26 05:24:13.000 oolite[17056] -> Ent:0
<ShipEntity Cobra Mark III 100 (player) BEHAVIOUR_IDLE on target 0> mass 253500.00 <AI with stateMachine: 'dockingAI.plist' in state: 'GLOBAL'>
2006-03-26 05:24:13.000 oolite[17056] -> Ent:1 <DustEntity: 84b5ed0> mass 0.00 (nil)
2006-03-26 05:24:13.000 oolite[17056] -> Ent:2 <WormholeEntity to Xeoner ttl: 892.50s> mass 0.00 (nil)
2006-03-26 05:24:13.000 oolite[17056] -> Ent:3
<ShipEntity Sidewinder Scout Ship 209 (escort) BEHAVIOUR_FLY_TO_DESTINATION on target 0> mass 34125.00 <AI with stateMachine: 'escortAI.plist' in state: 'ENTER_WORMHOLE'>
2006-03-26 05:24:13.000 oolite[17056] -> Ent:4
<ShipEntity Sidewinder Scout Ship 210 (escort) BEHAVIOUR_FLY_TO_DESTINATION on target 0> mass 34125.00 <AI with stateMachine: 'escortAI.plist' in state: 'ENTER_WORMHOLE'>
2006-03-26 05:24:13.000 oolite[17056] -> Ent:5 <StationEntity Dodecahedron Station 147 (dodecahedron) (rotating)> mass 704132352.00 <AI with stateMachine: 'stationAI.plist' in state: 'IDLE'>
2006-03-26 05:24:13.000 oolite[17056] -> Ent:6
<ShipEntity Navigation Buoy 195 (buoy) BEHAVIOUR_IDLE on target 0> mass 1000000.00 <AI with stateMachine: 'buoyAI.plist' in state: 'GLOBAL'>


When the 2 escorts were stuck:

2006-03-26 05:35:39.000 oolite[17056] DEBUG ENTITY DUMP: [entities count] = 60, n_entities = 60
2006-03-26 05:35:39.000 oolite[17056] -> Ent:0
<ShipEntity Cobra Mark III 100 (player) BEHAVIOUR_IDLE on target 0> mass 253500.00 <AI with stateMachine: 'dockingAI.plist' in state: 'GLOBAL'>
2006-03-26 05:35:39.000 oolite[17056] -> Ent:1 <DustEntity: 45ab8010> mass 0.00 (nil)
2006-03-26 05:35:39.000 oolite[17056] -> Ent:2
<ShipEntity Sidewinder Scout Ship 225 (escort) BEHAVIOUR_IDLE on target 224> mass 34125.00 <AI with stateMachine: 'escortAI.plist' in state: 'LOOK_FOR_BUSINESS'>
2006-03-26 05:35:39.000 oolite[17056] -> Ent:3
<ShipEntity Witchpoint Beacon 264 (buoy-witchpoint) BEHAVIOUR_IDLE on target 0> mass 1000000.00 <AI with stateMachine: 'buoyAI.plist' in state: 'GLOBAL'>
2006-03-26 05:35:39.000 oolite[17056] -> Ent:4
<ShipEntity Sidewinder Scout Ship 226 (escort) BEHAVIOUR_IDLE on target 224> mass 34125.00 <AI with stateMachine: 'escortAI.plist' in state: 'LOOK_FOR_BUSINESS'>
User avatar
johnsmith
Deadly
Deadly
Posts: 141
Joined: Fri Sep 22, 2006 10:32 am
Location: Teance
Contact:

Post by johnsmith »

Can anyone tell me what the "mass" means in the entity dump?
Post Reply