OrbitalDebris Posted April 26, 2014 Share Posted April 26, 2014 Thanks! Well that's the thing - all I've done (other than the change to the one RPM source file) is build RPM so it's got up to date metadata for the MJ dll. The next time I do this, I'll just put the new MJ dll into my KSP directory, start up visual studio and recompile RPM. There's literally nothing for me to fork. Link to comment Share on other sites More sharing options...
Starwaster Posted April 26, 2014 Share Posted April 26, 2014 Thanks! Well that's the thing - all I've done (other than the change to the one RPM source file) is build RPM so it's got up to date metadata for the MJ dll. The next time I do this, I'll just put the new MJ dll into my KSP directory, start up visual studio and recompile RPM. There's literally nothing for me to fork.OH. You updated RPM.... sorry I totally misread that. Derrrrrrrrrr. Link to comment Share on other sites More sharing options...
Oinker Posted April 26, 2014 Share Posted April 26, 2014 Would be nice to have a "landing doughnut" option where MJ is commanded to land no closer than X but no farther than Y from the target, or at least a minimum keep away distance.That would be easy. Just add a max radius from target in settings and generate a random coordinate pair with higher probability at the center of the circle and a inverse-square drop-off toward the outside. MJ can use that as the coordinate it's aiming for. And since he's dialed it in, it will hit that spot. Link to comment Share on other sites More sharing options...
daawgees Posted April 26, 2014 Share Posted April 26, 2014 I hope the above is meaningful enough to get the idea of the question I'm asking. I included the TimeControl.FlightScene.Update() example to show an example that most other functions from other mods (or indeed from KSP itself) have far fewer calls and far fewer runtime-invokes.edit: I've had enough KSP mod development struggle for today. Time to fire up the 64-bit version and play!Did I miss something? Where's the x64 version of KSP? Link to comment Share on other sites More sharing options...
tmikesecrist3 Posted April 26, 2014 Share Posted April 26, 2014 As for as I know its there is not one yet, at least not for me since I got mine throw steam Link to comment Share on other sites More sharing options...
BudgetHedgehog Posted April 26, 2014 Share Posted April 26, 2014 Did I miss something? Where's the x64 version of KSP?It's on Linux. Link to comment Share on other sites More sharing options...
sarbian Posted April 26, 2014 Share Posted April 26, 2014 This might be a bad question, but are you guys using profiling on MechJeb (the plugin or the parts)?Not often but I did it a few month ago. a.g managed to build a tool to do a proper mono profiling, even under windows. And someelse made a tool that changed the bytecode of the compiled mod dll to add timer on function calls.At that time I fixed the largest contender ( VesselExtensions.GetMasterMechJeb ). I ask because I finally got profiling working. (using the legacy statistical profiler, on Linux). And my testing scanner craft for SCANsat happens to use the MechJeb probe. In terms of percentage of total time, and after discarding the first few largest percentage items (because they are native things like object.runtime_invoke_void_this, etc ... the first few high percentage items wereMuMech.MechJebPod.Update (mostly MuMech.MechJebPod.AdvanceAnimationTo with ten thousand calls) with 13% of all calls, then MuMech.MechJebCore.OnGUI(), then DrawGUI(), with 12.22% of all calls.Another way to look at this data set is to example the calls to object_runtime_invoke_void_this(), where MechJeb has a factor of 2 to 10 more calls than any other caller.In other words, I wonder without knowing anything about MechJeb code if some of these functions are running more often than is ideal. Isn't there some vague technique where you want to only make/allow calls when something has changed (and merits a redraw or something)?I'm a bit surprised by your result. You are sure that this is time spent and not number of call ? The usual result I had with a time spent what VesselInfo getting to the front (it's a resource hug, and could use some caching) As for the only redraw what changed : no, not possible the way Unity GUI works. You get 2 OnGUI per frame whatever you do. In some case we may still do things in OnGUI that should not be done here, but I fixed a few already.MuMech.MechJebPod.AdvanceAnimationTo getting to the top may also be related to your frame rate. The higher you go the more it will be called.Pardon me, as I'm really speaking out of ignorance here. This is my first set of 'clean' profiling results (clean as in, does not contain all of the loading and is a nice 30 second sample). I was just surprised to see so many calls to MechJeb functions compared to... everything else. In some cases, it appears to be an order of magnitude difference.Obviously, if you want the profiling results I can try to put them up somewhere. The capture file is ~ 7 MB (even for only 30 seconds).Please do. I'll have a look and I try to dig up the tool a.g. made so I can have an other shoot here. Link to comment Share on other sites More sharing options...
tmikesecrist3 Posted April 26, 2014 Share Posted April 26, 2014 acutyally I was useing the old Mech jeb for all congig my self that might be an issue..... when useing FASA I try and keep as much of the real nasa look as I can for my ships so the mech jeb unit looks really out of place on an Apallo capsule or a LEM Link to comment Share on other sites More sharing options...
OrbitalDebris Posted April 26, 2014 Share Posted April 26, 2014 You can use ModuleManager to give the FASA capsules the same MechJeb module that the pod and AR202 have, and you'll have the exact same functionality but without any change to the 3D model of the capsule. You can get modulemanager here and use one of the various config files that have been posted on this thread. Link to comment Share on other sites More sharing options...
Spanier Posted April 26, 2014 Share Posted April 26, 2014 I actually had that problem last night trying to land on Gilly from a 17km orbit. My ship kept wobbling around like MJ was drunk. I finally just landed manually even though it took like 10 minutes to free-fall low enough to pick a spot.It perfectly locks on my target spot, but then, in the mid of descent, it starts firing up instead of backwards ... Link to comment Share on other sites More sharing options...
hab136 Posted April 26, 2014 Share Posted April 26, 2014 Native Blizzy78 Toolbar Support ( with default icon set from hab136 for now )(falls over in surprise)I'm pleased that something I made was used in such a popular mod, even if it's only until better icons come along. In particular I know nothke was working on a set, but I didn't follow what became of that: Link to comment Share on other sites More sharing options...
vardicd Posted April 26, 2014 Share Posted April 26, 2014 So I had a bug pop on me the other day, I just started using the Universal Storage mod that just came out not too long ago, and I got two game crashes in a row, and messaged the mod creator with the details, I thought I had found a glitch or mod conflict, and he got back to me, and said it looked like MJ caused it from the log file, this is the bit he sent back to me:[LOG 12:17:53.309] 4/24/2014 12:17:53 PM,KerbalAlarmClock,Adding 643729ad-e9dc-465f-b938-6a6dc81f10d8-BA-52d Probe-Probe-Kerbin [ERR 12:17:53.896] MechJeb module MechJebModuleThrustController threw an exception in Drive: System.NullReferenceException: Object reference not set to an instance of an object at MuMech.CelestialBodyExtensions.RealMaxAtmosphereAl titude (.CelestialBody body) [0x00000] in <filename unknown>:0 at MuMech.VesselState.TerminalVelocityStockKSP () [0x00000] in <filename unknown>:0 at MuMech.VesselState.TerminalVelocity () [0x00000] in <filename unknown>:0 at MuMech.MechJebModuleThrustController.TerminalVeloc ityThrottle () [0x00000] in <filename unknown>:0 at MuMech.MechJebModuleThrustController.Drive (.FlightCtrlState s) [0x00000] in <filename unknown>:0 at MuMech.MechJebCore.Drive (.FlightCtrlState s) [0x00000] in <filename unknown>:0 [LOG 12:17:53.933] Focus changed! Forcing BA-52d to save I've never had this happen before, and I thought I'd throw it in here as {maybe?} a MJ conflict with Universal Storage, just so you could see. I haven't changed anything else except installing US. Link to comment Share on other sites More sharing options...
mario.masters Posted April 26, 2014 Share Posted April 26, 2014 Thanks. I tried entering the same orbital parameters with hyperedit, but can't reproduce the problem. Can you make sure that you're using #236 and not #234 or #235? #236 had a fix for something that could cause this problem. Finally, if you encounter it again you could upload your KSP_Data/output_log.txt and link it here; it may have some clues.I assure you that I was using 236. And yeah now that I've taken a better look at it I think I know why you couldn't reproduce it. I'm new to this game and don't yet fully know or understand what all of the mods I've installed recently might be doing to the game mechanics. Anyway I think I've tracked down the reason why this might be happening. While I normally don't use the Real Solar System mod, I have a part of it installed via Better Atmospheres v4.0 mod which has some configuration for it. It seems that MJ orbit transfer goes nuts when RSS configuration in any shape or form is present, regardless if anything is present in the configuration file. This also appears to happen quite late into the game as well. Try changing your UT to something like 10441471.7475303 and you'll see the behavior along with RSS present and I could even use an empty RSS config file to reproduce the issue.REALSOLARSYSTEM{} Anyway, I'll stop bothering you now since this doesn't appear to be your problem at all. I'll just stick with the 233 version which seems to work with the following. Thanks for your patience and have a nice day. Link to comment Share on other sites More sharing options...
Sheppard Posted April 26, 2014 Share Posted April 26, 2014 (edited) I have recently encountered a pesky bug with MechJeb: I was trying to land at a target with the autopilot, but after I warp or it auto-warps, the ship freezes in a fixed point in space and just remains there; it won't advance along the orbit or turn in any direction. Engines and everything else on the ship works fine. Even RCS, although I can't get the ship to turn with it. I have to go back to the space center, reload everything, but after a new warp, the ship freezes again. It's like some weird force is keeping it in place.Warping from the tracking station works just fine.I have the latest version of KSP through Steam and the only mods installed are MechJeb and Protractor.LE: MechJeb downloaded from the first page Edited April 26, 2014 by Sheppard Link to comment Share on other sites More sharing options...
tmikesecrist3 Posted April 26, 2014 Share Posted April 26, 2014 thats the issue I have been haveing sheppard, I am not useing a dev down load just the latest one found on the front page Link to comment Share on other sites More sharing options...
sarbian Posted April 26, 2014 Share Posted April 26, 2014 I can't help with if you don't put your log (KSP/KSP_Data/output_log.txt) somewhere. Link to comment Share on other sites More sharing options...
Pecan Posted April 26, 2014 Share Posted April 26, 2014 Perhaps using the dev build would help Link to comment Share on other sites More sharing options...
Starwaster Posted April 27, 2014 Share Posted April 27, 2014 I have recently encountered a pesky bug with MechJeb: I was trying to land at a target with the autopilot, but after I warp or it auto-warps, the ship freezes in a fixed point in space and just remains there; it won't advance along the orbit or turn in any direction. Engines and everything else on the ship works fine. Even RCS, although I can't get the ship to turn with it. I have to go back to the space center, reload everything, but after a new warp, the ship freezes again. It's like some weird force is keeping it in place.Warping from the tracking station works just fine.I have the latest version of KSP through Steam and the only mods installed are MechJeb and Protractor.LE: MechJeb downloaded from the first pageTry starting a new game and see if you still have that problem. Your save file could have problems. Link to comment Share on other sites More sharing options...
technogeeky Posted April 27, 2014 Share Posted April 27, 2014 Not often but I did it a few month ago. a.g managed to build a tool to do a proper mono profiling, even under windows. And someelse made a tool that changed the bytecode of the compiled mod dll to add timer on function calls.At that time I fixed the largest contender ( VesselExtensions.GetMasterMechJeb ). I'm a bit surprised by your result. You are sure that this is time spent and not number of call ? The usual result I had with a time spent what VesselInfo getting to the front (it's a resource hug, and could use some caching) As for the only redraw what changed : no, not possible the way Unity GUI works. You get 2 OnGUI per frame whatever you do. In some case we may still do things in OnGUI that should not be done here, but I fixed a few already.MuMech.MechJebPod.AdvanceAnimationTo getting to the top may also be related to your frame rate. The higher you go the more it will be called.Please do. I'll have a look and I try to dig up the tool a.g. made so I can have an other shoot here.No, frankly, I am not sure. But I do think, after re-profiling with the AR202 case instead of the cracked out floating eye vessel, that it's just the animation in that vessel which was run so often. Once I swapped it out with the AR202, MechJeb was a lot further down the list. I am just getting my feet wet developing (and profiling) in C# / Unity / Mono / KSP. I just knew that I wanted to make sure I had a good enough debugging and profiling toolchain that I wouldn't miss obvious performance killers that I introduce.As long I know that someone else out there is/does profile sometimes, then I'll be comfortable doing a work cycle of: profile -> make code change -> profile and test for total failure -> suggest change.And since you are happy to profile if needed, I know I can do that now Link to comment Share on other sites More sharing options...
CatastrophicFailure Posted April 27, 2014 Share Posted April 27, 2014 I have recently encountered a pesky bug with MechJeb: I was trying to land at a target with the autopilot, but after I warp or it auto-warps, the ship freezes in a fixed point in space and just remains there; it won't advance along the orbit or turn in any direction. Engines and everything else on the ship works fine. Even RCS, although I can't get the ship to turn with it. I have to go back to the space center, reload everything, but after a new warp, the ship freezes again. It's like some weird force is keeping it in place.Warping from the tracking station works just fine.I have the latest version of KSP through Steam and the only mods installed are MechJeb and Protractor.LE: MechJeb downloaded from the first pageWhen you get this error, what does your debug log say? I've been Getting a similar issue when going to warp, KSP seems to get stuck in an error loop when packing something for orbit, the exact error verbiage escapes me at the moment. Link to comment Share on other sites More sharing options...
Sheppard Posted April 27, 2014 Share Posted April 27, 2014 I can't help with if you don't put your log (KSP/KSP_Data/output_log.txt) somewhere.Here is the log. The ship is called "Asteriod Redirect Mission 3 - Astronauts"Download link: http://www.4shared.com/office/UGWQg1vkce/output_log.htmlThanks in advance for the help! Link to comment Share on other sites More sharing options...
sarbian Posted April 27, 2014 Share Posted April 27, 2014 Well, the error you have does not seems to be related with MJ. Your vessel crash while trying to go back on rail, on a class called ActiveJoint. It's part of KSP and I don't see how MJ could mess up anything related to it. So I think it's more a part related problem. You only seems to use protractor and MJ so You may have fond a stock bug.If you still have the save and it does that each time can you share it as well ? I'll get it to Ted so the dev can look at it.The error for those interested : NullReferenceException at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_CALL_TransformDirection (UnityEngine.Transform,UnityEngine.Vector3&) at UnityEngine.Transform.TransformDirection (Vector3 direction) [0x00000] in <filename unknown>:0 at ActiveJoint.getControlOrt (Vector3 refAxis, PartSpaceMode mode) [0x00000] in <filename unknown>:0 at ActiveJoint.applyCoordsUpdate () [0x00000] in <filename unknown>:0 at ActiveJoint.onPartPack (.Part p) [0x00000] in <filename unknown>:0 at EventData`1[Part].Fire (.Part data) [0x00000] in <filename unknown>:0 at Part.Pack () [0x00000] in <filename unknown>:0 at Vessel.GoOnRails () [0x00000] in <filename unknown>:0 at OrbitPhysicsManager.LateUpdate () [0x00000] in <filename unknown>:0 Link to comment Share on other sites More sharing options...
frik Posted April 27, 2014 Share Posted April 27, 2014 So I have toolbar, installed newest MechJeb and now I don't have access to it. Button on the right disappeared, there are no new buttons on toolbar. It's not showing in VAB, on newly designed spaceships, neither on ships already in space that have MJ on them. What am I doing wrong? Link to comment Share on other sites More sharing options...
Shad0wCatcher Posted April 27, 2014 Share Posted April 27, 2014 Do you have a mechjeb component installed on the craft? (the MJ202 case or the 1.25 meter autopilot pod) Link to comment Share on other sites More sharing options...
frik Posted April 27, 2014 Share Posted April 27, 2014 I've already written that in my post... MJ panel is not there if I create new craft with MJ part, nor if I switch to craft that already had MJ part on it before I updated it.And since I've been using MJ for years now (like two, but still plural), I really can't imagine my space program without all data it provides... Link to comment Share on other sites More sharing options...
Recommended Posts