Jump to content

[1.3] Kerbal Joint Reinforcement v3.3.3 7/24/17


ferram4

Recommended Posts

Okay, so I've semi-confirmed this... Removing KJR fixes the bug, but there are obvious complications without KJR... There is no null reference on launch or staging, but these rockets cannot launch without this mod. Could the creator of this or someone who knows how to fix this help? I've been having this for weeks and its getting almost impossible now. Please help!

*edit* Just saw above post- thanks! Any ideas on where to look?

Link to comment
Share on other sites

Considering that KJR hasn't changed at all in many, many KSP versions, and these staging bugs have only appeared halfway through 0.25, even though KJR hasn't changed once during it, I'm going to say it's another mod causing the issue. I'm sorry, I can't fix other people's code.

No, you can't.

But you can and should be checking for and discarding null references every single time you bind to an event. Specifically OnVesselWasModified: Every KSP event can be and often is called multiple times for a single event occurrence with only one being valid. When you allow a null reference exception to be thrown in your code it can cause cascading errors breaking everything else in the chain. There's no knowing for sure when it's going to happen but every modder needs to start guarding against it and it's real simple to do:


private void OnVesselWasModified(Vessel v)
{
[B] if ((object)v == null) // Do the same for your on/off rails events
return;
[/B] if (JointUtils.debug)
{
StringBuilder debugString = new StringBuilder();
debugString.AppendLine("KJR: Modified vessel " + v.id + " (" + v.GetName() + ")");
debugString.AppendLine(System.Environment.StackTrace);
debugString.AppendLine("Now contains: ");
foreach (Part p in v.Parts)
debugString.AppendLine(" " + p.partInfo.name + " (" + p.uid + ")");
Debug.Log(debugString);
}


updatedVessels.Remove(v);
RunVesselJointUpdateFunction(v);
}

Or encapsulate the entire thing in a try/catch construct and discard the error. It's not a question as to whether this is happening, it's just a matter of when and how often. KJR is probably throwing the error in question more often than people are actually reporting but it doesn't always cause problems so people don't know about it or report it. There's even a good chance if you go look at your own logs after a lengthy play session that you'll see it yourself.

Link to comment
Share on other sites

@ferram4 Hello,

I created a robotic arm with [0.25] Magic Smoke Industries Infernal Robotics - 0.19.2 I talked to sirkut and he said,

There is nothing that can be done to make the joints more rigid. Blame that on unity and it's joint system.
. Then I see you're Kerbal Joint Reinforcement mod. Is there anyway that I can add any more rigidity to my creation? The joints are breaking but everything is springing around like a mess. Whenever I really wanted rigidity, I use Quantum struts, but it doesn't work well with robotics.
Link to comment
Share on other sites

@Starwaster: I know, because everyone else seems to complain about it and see the issue even though I've never been able to reproduce it. Ever. I'll add the check, but

@dcompart: Not to robotics parts. IR needs to be able to update the joint in order to function, and KJR can't stiffen that without breaking IR.

Link to comment
Share on other sites

0.90 has been out for like one day, and nobody talked about it yet here. So I would say try it and report!

then the next one who is wondering if it is compatible is gonna go at the last post wich hopefully is gonna be yours saying that it is working perfectly fine ( haha hopefully yes )

Link to comment
Share on other sites

0.90 has been out for like one day, and nobody talked about it yet here. So I would say try it and report!

then the next one who is wondering if it is compatible is gonna go at the last post wich hopefully is gonna be yours saying that it is working perfectly fine ( haha hopefully yes )

No, don't try it and report it. Or at least don't report it. It will NOT function in 0.90 and Ferram knows that so don't pester him about it.

He knows it won't work in 0.90 because it is coded to disable itself if it detects a new major KSP version change.

Give Ferram some time, he's also has FAR/NEAR to test compatibility for. TBH I want FAR first...flying through soup sucks.

not for me because I have my own solution and it still works in 0.90 :P

Edited by Starwaster
Link to comment
Share on other sites

Give Ferram some time, he's also has FAR/NEAR to test compatibility for. TBH I want FAR first...flying through soup sucks.
Having not flown without FAR since .21, I was shocked flying through the atmosphere and not being able to break the sound barrier at 1000m with a LV-30 strapped to the back of a small UAV. It's simply bonkers D:.

I can strut the hell out of things (especially with B9 invisistruts) and hobble into orbit, but you can't fake a real Aero model. Give Ferram space to work and he'll churn out some good code when he's got it ready. From what I can tell, 0.90 threw a lot of mods into a pit of hell they'll need to dig themselves out of.

Link to comment
Share on other sites

Hi,

I've been getting an issue that was brought up earlier in the thread with staging. When I press spacebar it only activates one section of a stage. The problem is fixed when I remove KerbalJointReinforcement although it may not be the cause of the issue but might trigger it. This came out of nowhere, I haven't installed any mods recently and when I went to launch today it occured.

Here is my output log:

https://www.dropbox.com/s/4rk1czkr74f5bnx/output_log.txt?dl=0

Running .25 32 bit (waiting for certain mods to be updated before I go to .90)

Here are my mods (says I don't have permission to insert images?)

http://i.imgur.com/oSMKa5I.png

I'd appreciate any help, the game is unplayable without the mod (works wonders) but it's also nearly unplayable with it/ or the conflicting

mod causing it.

EDIT:

I seem to have missed several replies on an earlier page about this. Sorry for restating what has been said. I will make a clean install and try to narrow down the conflicting mods.

EDIT2:

I think I narrowed it down not to a specific mod, but a part in my case. I created a rocket like so:

Taurus HCV

XT2 Solar Panel Array mk2

Procedural FuelTank

Fairing Base Ring (Procedural Fairing part)

Procedural Stack Decoupler

Procedural Fuel Tank (13 m Diameter, 32 m Length)

Launch Clamps

5 F-1 (Realism Overhaul version of the "new" 3.5m stock engine)

Total weight: 3,404,671 kg (some users, including myself, only encounter this on large rockets such as 1000+ tons)

I first tested the rocket with only a probe on top and successfully launched and decoupled the launch clamps as normal. I went back an added a subassembly of a pod with the parts listed above and attempted another launch. Launch clamps came off 1 at a time. I then removed parts one by one until the problem was fixed and it happened to be the Procedural Fairing Base. I will do more testing and see if there are any other conflicting parts or try to determine what triggers this.

This testing was all done with the mods in the pic above.

EDIT3:

After more testing, removing the fairing base ring always fixes the issue. One thing worth noting though is I am placing the capsule through the subassembly menu when the launch clamps fail. I removed the base and added a new one and it seemed to work. Anyone else having this issue also using procedural fairing bases or subassemblies when encountering this?

Regards,

James

Edited by burz21
Link to comment
Share on other sites

I'm getting the same issue, I'll try taking out the fairing base (pretty important part) and see what happens!

*edit* Haven't tested yet, but I'm seeing the same null reference in your log, which is coming from Kerbal Joint Reinforcement

NullReferenceException: Object reference not set to an instance of an object

at KerbalJointReinforcement.KerbalJointReinforcement.UpdatePartJoint (.Part p) [0x00000] in <filename unknown>:0

at KerbalJointReinforcement.KerbalJointReinforcement.RunVesselJointUpdateFunction (.Vessel v) [0x00000] in <filename unknown>:0

at KerbalJointReinforcement.KerbalJointReinforcement.OnVesselWasModified (.Vessel v) [0x00000] in <filename unknown>:0

at EventData`1[Vessel].Fire (.Vessel data) [0x00000] in <filename unknown>:0

at Part.decouple (Single breakForce) [0x00000] in <filename unknown>:0

at LaunchClamp.Release () [0x00000] in <filename unknown>:0

at LaunchClamp.OnActive () [0x00000] in <filename unknown>:0

at Part.ModulesOnActivate () [0x00000] in <filename unknown>:0

at Part.activate (Int32 currentStage, .Vessel activeVessel) [0x00000] in <filename unknown>:0

at Staging.activateStage (Int32 stage) [0x00000] in <filename unknown>:0

at Staging.activateNextStage () [0x00000] in <filename unknown>:0

at Staging.ActivateNextStage () [0x00000] in <filename unknown>:0

at FlightInputHandler.Update () [0x00000] in <filename unknown>:0

Edited by JT2227
Link to comment
Share on other sites

More Late-mas gifts!

KJR v3.0 is now available, with a bunch of minor bugfixes, a fix for a really old, major bug in stiffening radial connections where the parent part is smaller than the child part, and another method of stiffening connections in stacks that should help with large-mass ratio part connections.

Link to comment
Share on other sites

Having problems since upgrading to 3.0.

1. launch clamps are not releasing

2. radial decouplers are not decoupling

Is there a way I can get the previous version that worked back?

Yes, he has all the older releases in the Github release section.

(I think Kerbalstuff also has older versions but I won't swear to it)

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...