PDA

View Full Version : Exception Error in logs.txt


Flashman
05-24-2011, 06:06 PM
Hi In one of my missions I keep getting the following error report in the log

[17:43:06] =================================================
[17:43:06] System.NullReferenceException: Object reference not set to an instance of an object.
[17:43:06] at 0wGnrS0e1a7ZqAqXO6j.UITxF60QVwgwlPQXAcW.AuPvaOP4yk C(UITxF60QVwgwlPQXAcW , 38MMBxgwCu38OHqSLEw )
[17:43:06] at 0wGnrS0e1a7ZqAqXO6j.UITxF60QVwgwlPQXAcW.AuPvaOP4yk C(UITxF60QVwgwlPQXAcW , 38MMBxgwCu38OHqSLEw )
[17:43:06] at 0wGnrS0e1a7ZqAqXO6j.UITxF60QVwgwlPQXAcW.kvTvadI6s6 M(UITxF60QVwgwlPQXAcW )
[17:43:06] at 0wGnrS0e1a7ZqAqXO6j.UITxF60QVwgwlPQXAcW.EO2va3Vr62 Y(ScdHjOUJBMsyRT6OvZD , UITxF60QVwgwlPQXAcW )
[17:43:06] at Wjdw8vGQgM2CbARrrHO.PZPwMcGvZu0eJO3waWk.yHocNjJfJ6 0(72WEqJi564FpliSUo0W , g5pop36OQg04BHqFc5 , g5pop36OQg04BHqFc5 , 0bsSZHGeTSLAX4AGUPt , Int32 )
[17:43:06] at Wjdw8vGQgM2CbARrrHO.PZPwMcGvZu0eJO3waWk.ay5trAhElU ExB8n06Tc2(Object , Object , Object , 0bsSZHGeTSLAX4AGUPt , Int32 )
[17:43:06] at Wjdw8vGQgM2CbARrrHO.PZPwMcGvZu0eJO3waWk.sBRcNcsLj0 I(0bsSZHGeTSLAX4AGUPt , g5pop36OQg04BHqFc5 , Int32 , Int32 , g5pop36OQg04BHqFc5 , Int32 , Boolean , yeWKS0AbVSHpdcr8mPB[] )
[17:43:06] at Wjdw8vGQgM2CbARrrHO.PZPwMcGvZu0eJO3waWk.6R0cN7tjvT Q(ScdHjOUJBMsyRT6OvZD , Int32 , yeWKS0AbVSHpdcr8mPB[] )
[17:43:06] at Wjdw8vGQgM2CbARrrHO.PZPwMcGvZu0eJO3waWk.X23cJmkrrm 1(ScdHjOUJBMsyRT6OvZD )
[17:43:06] at MO25PeflGZ6sfm7hKtI.ZwCaZ4fsAJtWN2AMS3D.h0v1h6VwYG 3CnPPBYxi.q0FZQwdDt0BE7drPxIP(Object )
[17:43:06] at MO25PeflGZ6sfm7hKtI.ZwCaZ4fsAJtWN2AMS3D.h0v1h6VwYG 3CnPPBYxi.BrpixIFsF72(Double )
[17:43:06] at MO25PeflGZ6sfm7hKtI.ZwCaZ4fsAJtWN2AMS3D.MJHk5FuuM3 (Double )
[17:43:06] at MO25PeflGZ6sfm7hKtI.ZwCaZ4fsAJtWN2AMS3D.BrpixIFsF7 2(Double )
[17:43:06] at dWndyLfEQH0UC1PXdcp.gYcwUPfXwn2M7XBfjum.NCX1oKDEZq (Double )
[17:43:06] at K4ZI21U89QhE9aljqxH.ScdHjOUJBMsyRT6OvZD.iKsHC6RUnP I1qNhKerh.c2YOMHhY1855Spa4TUtt(Object , Double )
[17:43:06] at K4ZI21U89QhE9aljqxH.ScdHjOUJBMsyRT6OvZD.iKsHC6RUnP I1qNhKerh.tick()
[17:43:06] at IGB2xnaGkE3NRbIFDgX.HC2eD9a6w1P0N0U4KUK.iyAKMhWJAM 2()
[17:43:06] at Ox3usQGbNcZhWujWC2.g5pop36OQg04BHqFc5.Uc4Mssh5ydT4 Pdq05ya(Object )
[17:43:06] at Ox3usQGbNcZhWujWC2.g5pop36OQg04BHqFc5.interpolateT ick()
[17:43:06] =================================================

When it happens it repeats dozens of times often (its identical). I haven't been able to track down a particular cause. It doesn't appear to do anything, however I don't know!

Is this a mission thing or a game thing? I have no idea...thats why im posting here!

Attached is a copy of the log showing this error (and a few others)

Longbone
05-24-2011, 06:43 PM
Hi mate,
are you running a script in your mission ?
I had the same error while running a faulty C# script

Flashman
05-24-2011, 06:46 PM
Hi mate,
are you running a script in your mission ?
I had the same error while running a faulty C# script

Yes, I have a script running (in fact several). When I hit compile in the FMB it says things are ok.

I will have a closer look at the scripts.

Thanks!

Longbone
05-24-2011, 07:10 PM
May be a wrong object name

Ataros
05-24-2011, 07:19 PM
Maybe it is worth always checking that an object exists before doing smth with it, e.g.
{
if (bp != null)
bp.destroy();
}

{
if (enemyGG[i] != null)
if (result.Pos().distance(ref attackerPos) > enemyGG[i].Pos().distance(ref attackerPos))
{ result = enemyGG[i]; }
}

Flashman
05-25-2011, 06:24 AM
Im still just as confused!

I have been through the server log looking for a pattern but cannot see anything specific. I looked at the log for different runs of the mission hoping to see that the problem started at the same time on each run (therefore being tied to a mission or something) but, again no obvious cause.

This object thats not referenced... I have no idea what it could be. All my bombing missions (which run as submissions) just area bomb a specific area.

Some fighters escort bombers. I wonder if the escort is getting separated and when it gets to the next waypoint it cant find the group they are supposed to be escorting? WOuld this cause the problem?

Ataros, I haven't tried your bits of code, I have no idea what they do or where to put them! Do they need to be tied to a specific object or missions?

Ataros
05-25-2011, 07:14 AM
Ataros, I haven't tried your bits of code, I have no idea what they do or where to put them! Do they need to be tied to a specific object or missions?

No.
"Object != null" is a check if the object exists. If your code does smth to an object but it does not exist you get the exception I believe. Make sure you check "Object != null" before any action in your code.

I may be wrong. Always post your complete code if you want quick help without guessing from someone who really knows C# (not me :) ).

SYN_Flashman
05-25-2011, 08:39 AM
No.
"Object != null" is a check if the object exists. If your code does smth to an object but it does not exist you get the exception I believe. Make sure you check "Object != null" before any action in your code.

I may be wrong. Always post your complete code if you want quick help without guessing from someone who really knows C# (not me :) ).


I will post it later thnis evening when im home. My mission actually has 3 scripts to just to add to the confusion!

Essentially there is a primary script which is tied to the main mission. This has the despawn script and all of that plus at specific times is starts two submissions (one for red, one for blue). These two submissions themselves contain nothing, just an empty map, however they have scripts which spawn a number of sub-sub missions over a period of about three hours. These are the actual planes going to targets etc.

The purpose behind this is that the primary script sets the submissions going so they are repeated every three hours and it is intended to allow the server to be continuously operating.