camlost2 / AJE

Advanced Jet Engine for KSP
8 stars 10 forks source link

Permanent flameout from temporary loss of fuel #28

Closed mjn33 closed 9 years ago

mjn33 commented 9 years ago

Operating System: Fedora 21 (Linux) x86-64

AJE Version: Commit 381dcd190880d82f670c0dbda8078eecff513a56

Reproduction steps:

  1. Launch AJEtest1.craft from the VAB/SPH
  2. Stage to start the engines, throttle to 100%
  3. Disable fuel flow from both tanks, so a flameout occurs (screenshot6.png, screenshot7.png)
  4. Re-enable fuel flow from both tanks, so the engine should start again

The result is the engine doesn't start, reactivating the engine doesn't help and the only solution is to reload a save file.

All files: screenshot6.png screenshot7.png AJEtest1.craft Player.log

mjn33 commented 9 years ago

Pinging @NathanKell and @blowfishpro

NathanKell commented 9 years ago

I thought this was fixed. It's still occurring in the latest AJE in git?

mjn33 commented 9 years ago

Unfortunately I can't test the latest version, the game doesn't get past the loading screen. An NRE is thrown:

NullReferenceException: Object reference not set to an instance of an object
  at SolverEngines.EngineParameterInfo.SetValueFromNode (.ConfigNode node) [0x00000] in <filename unknown>:0 
  at SolverEngines.ModuleEnginesSolver.FitEngineIfNecessary () [0x00000] in <filename unknown>:0 
  at AJE.ModuleEnginesAJEJet.GetStaticThrustInfo (Boolean primaryField) [0x00000] in <filename unknown>:0 
  at AJE.ModuleEnginesAJEJet.GetInfo () [0x00000] in <filename unknown>:0 
  at PartLoader.CompilePartInfo (.AvailablePart newPartInfo, .Part part) [0x00000] in <filename unknown>:0 
  at PartLoader+^V^E.MoveNext () [0x00000] in <filename unknown>:0

Full Player.log

I remember there was a similar issue where a permanent flameout would happen if all intakes were closed, I've just verified that is fixed (still testing 381dcd190880d82f670c0dbda8078eecff513a56). Also, this issue can be reproduced by using all fuel, and then enabling infinite fuel. Might be related to this issue I saw http://www.twitch.tv/szyzyg/v/7377102 (from ~19:30 to ~19:50 demonstrating infinite fuel had no effect, until after a revert where it works at ~22:08), that would suggest the problem might lie in SolverEngines.

screenshot53.png (demonstrating infinite fuel has no effect)

blowfishpro commented 9 years ago

I fixed the NRE. Try it now.

mjn33 commented 9 years ago

Verified the issue is still occurring using d02fbd8e3518101905401a1cc9546b2c16b6754e.

blowfishpro commented 9 years ago

@NathanKell I suspect this is occurring because lastPropellantFraction is not being reset in SolverEngines. I don't know where the correct place to reset it is.

NathanKell commented 9 years ago

Yep, I see the issue. I'll get to this in the next few days--if I don't, poke me again. :)

blowfishpro commented 9 years ago

This should be fixed for most engines now. You just have to restart the engine. It still occurs for non-electric props, and I'm not quite sure why.

blowfishpro commented 9 years ago

This appears to be fixed for all engines now.