magico13 / KCT

Kerbal Construction Time - An addon for Kerbal Space Program
29 stars 40 forks source link

NRE in dev build #83 when recalculating build time when TweakScale is installed #54

Closed ts826848 closed 9 years ago

ts826848 commented 9 years ago

Steps to reproduce:

  1. Install KCT and TweakScale through CKAN
  2. Replace KCT .dll with that of dev build 83
  3. Boot up KSP, start new sandbox, go to VAB
  4. Select command pod, save, reload just saved vessel
  5. Wait a bit, KCT error dialog pops up

Player.log here: https://www.dropbox.com/s/fy5rj7oojkcwoft/Player.log?dl=0

magico13 commented 9 years ago

Darn, I was afraid of that. It's probably an issue with this line: "ConfigNode tsCN = tweakscale.snapshot.moduleValues;" For whatever reason, it seems like editor parts don't have protoPartSnaphsots, and apparently their modules don't have ProtoPartModuleSnapshots (or whatever they're called). I'll have to switch to dealing directly with the PartModule fields/events, which I haven't done before but shouldn't be too difficult hopefully.

Thanks! I don't play with Tweakscale so I hadn't gotten around to testing that.

ts826848 commented 9 years ago

Sorry for bombarding you with bug reports... Really wish I could help.

Not sure i this is intended behavior, but it seems this error borks the simulation function? Simulations don't start, but the funds are still subtracted...

magico13 commented 9 years ago

Yeah, that bug will break a lot of things. Many functions call the build time function to verify things are in sync, but if that function breaks (like now) then they halt all further code from executing. Don't use build 82 either, it's bugged even more than 83, but I think 81 should work fine with TweakScale. I'll try to get this fixed tonight.

I like bug reports, if they're done well enough then it means I have less cases I need to test and can fix bugs I otherwise would have missed. They suck because it means I have to fix things, but better now than after release (where there would be more reports and of potentially lower quality)!

ts826848 commented 9 years ago

Ah, ok, I'll go download that now. I'll let you know if things still break.

As always, thanks you for maintaining this wonderful mod!

magico13 commented 9 years ago

Should be fixed in 84!

ts826848 commented 9 years ago

All right, I'll check it out!

ts826848 commented 9 years ago

This seems to be fixed. No "something broke!" window, and been tweaking parts like crazy.