Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweakscale compatibility issue #94

Open
svm420 opened this issue Jul 19, 2015 · 20 comments
Open

Tweakscale compatibility issue #94

svm420 opened this issue Jul 19, 2015 · 20 comments

Comments

@svm420
Copy link

svm420 commented Jul 19, 2015

Well i seem to have found a major issue with using realfuels with tweakscale.
Using latest tweakscale, realfuels, MFI, and dev version of solverengines
Windows 7 64bit KSP 1.0.4 32 bit outside program files folder

Steps to reproduce.

  1. create new craft in vab. I used mk1 inline cockpit
  2. Place stock septron SRM on cockpit
  3. Tweakscale to non default value
  4. Save craft
  5. Reload craft while still in editor
  6. Select another septron SRM from build list and errors begin. Attach the septron to the cockpit. Try to open engine GUI. Mass log spam. Trying to launch results in more errors of a different nature.

Logs!
MM cache!

Hope that helps! :)

@svm420
Copy link
Author

svm420 commented Jul 20, 2015

Still an issue with latest releases of RF and SolverEngines

@NathanKell
Copy link
Member

Thanks for this! Love the steps/log/cache! :)

I can't promise to get to it very soon, but I will do it...

@svm420
Copy link
Author

svm420 commented Jul 21, 2015

That's all could ask for :). Thank you!

@NathanKell
Copy link
Member

Aaaand 3.5 months later I finally look into this.
@pellinor0 this appears to be a loop between Tweakscale and RF, namely Tweakscale will call its rescale method whenever setup is called, which getmodulecost calls.

Relevant stack trace:
[TweakScale Warning] Exception on Rescale: System.StackOverflowException: The requested operation caused a stack overflow.

at (wrapper managed-to-native) UnityEngine.Transform:INTERNAL_set_localScale (UnityEngine.Vector3&)

at UnityEngine.Transform.set_localScale (Vector3 value) [0x00000] in :0

at TweakScale.TweakScale.UpdateByWidth (Boolean moveParts, Boolean absolute) [0x00000] in :0

at TweakScale.TweakScale.Setup () [0x00000] in :0

at TweakScale.TweakScale.GetModuleCost (Single defaultCost) [0x00000] in :0

at Part.GetModuleCosts (Single defaultCost) [0x00000] in :0

at RealFuels.ModuleEngineConfigs.CostTL (Single cost, .ConfigNode cfg) [0x00000] in :0

at RealFuels.ModuleEngineConfigs.DoConfig (.ConfigNode cfg) [0x00000] in :0

at RealFuels.ModuleEngineConfigs.SetConfiguration (System.String newConfiguration, Boolean resetTechLevels) [0x00000] in :0

at RealFuels.TweakScaleModularEnginesUpdater.OnRescale (ScalingFactor factor) [0x00000] in :0

at TweakScale.TweakScale.Setup () [0x00000] in :0

at TweakScale.TweakScale.GetModuleCost (Single defaultCost) [0x00000] in :0

at Part.GetModuleCosts (Single defaultCost) [0x00000] in :0

at RealFuels.ModuleEngineConfigs.CostTL (Single cost, .ConfigNode cfg) [0x00000] in :0

at RealFuels.ModuleEngineConfigs.DoConfig (.ConfigNode cfg) [0x00000] in :0

at RealFuels.ModuleEngineConfigs.SetConfiguration (System.String newConfiguration, Boolean resetTechLevels) [0x00000] in :0

at RealFuels.TweakScaleModularEnginesUpdater.OnRescale (ScalingFactor factor) [0x00000] in :0

at TweakScale.TweakScale.Setup () [0x00000] in :0

at TweakScale.TweakScale.GetModuleCost (Single defaultCost) [0x00000] in :0

at Part.GetModuleCosts (Single defaultCost) [0x00000] in :0

at RealFuels.ModuleEngineConfigs.CostTL (Single cost, .ConfigNode cfg) [0x00000] in :0

at RealFuels.ModuleEngineConfigs.DoConfig (.ConfigNode cfg) [0x00000] in :0

at RealFuels.ModuleEngineConfigs.SetConfiguration (System.String newConfiguration, Boolean resetTechLevels) [0x00000] in :0

at RealFuels.TweakScaleModularEnginesUpdater.OnRescale (ScalingFactor factor) [0x00000] in :0

@svm420
Copy link
Author

svm420 commented Nov 15, 2015

:D :D :D Can not wait!!! Will this be part of the 1.0.5 update?

@pellinor0
Copy link

Thanks for the analysis! I'll resolve the issue within TweakScale.

Calling Setup in getModuleCost is a construction that forces an early setup if the module cost is called before the regular initialization. Which is probably a bad idea to do at all.

@NathanKell
Copy link
Member

Awesome, thanks! :)
And yeah, probably a bad idea in the big picture...

Do let me know if there's anything I can do to help RF-side!

@svm420
Copy link
Author

svm420 commented Dec 10, 2015

@NathanKell @pellinor0 Seems there is still an issue.
Steps to repro

  1. Enter VAB and place mk1 pod.
  2. Choose rcs or any engine with a tweakscale module.
  3. Attach to pod, tweakscale to non default size and save craft.
  4. Try to reload craft. Game locks up till it crashes. No NREs present in log or any other relevant info. Just crashes to desktop.
    That was latest RF, tweakscale, solver engines. On 1.0.5 latest build. Let me know if you want MM.cache or logs didn't include them as not very relevant, but will if they are desired. Thanks!

@pellinor0
Copy link

Oh, looks like I haven't released since fixing this. Could you try the dev version of TweakScale?
https://github.com/pellinor0/TweakScale/archive/dev.zip
(you only need the GameData folder)

@svm420
Copy link
Author

svm420 commented Dec 10, 2015

<____< You were right I thought I had grabbed the latest dev version seems in my massive install moving/updating I somehow ended up with an older version. Thanks for the quick responce. I will close it now that i verified it is fixed Thanks to both of you once again :)

@svm420 svm420 closed this as completed Dec 10, 2015
@svm420
Copy link
Author

svm420 commented Dec 10, 2015

@NathanKell @pellinor0 Well there is another issue now. RCS thrusterpower is not scaling with size. It definitely should it is listed in the ScaleExponent.cfg file. Engines are working fine, but not RCS. Maybe related, but after scaling and playing with it for a bit I got a NRE that lead to the RealFuels GUI for the RCS part breaking. This was on my full linux 1.05 install heavy modded, so LMK if you want me to verify with a minimal install. Log. Will upload the cache to if desired LMK. Thanks!

Aborting
  at UnityEngine.GUILayoutGroup.GetNext () [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayoutUtility.BeginLayoutGroup (UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options, System.Type LayoutType) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUIContent content, UnityEngine.GUIStyle style, UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout.BeginHorizontal (UnityEngine.GUILayoutOption[] options) [0x00000] in <filename unknown>:0 
  at RealFuels.ModuleEngineConfigs.engineManagerGUI (Int32 WindowID) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0 

(Filename:  Line: 4294967295)

NullReferenceException: Object reference not set to an instance of an object
  at RealFuels.ModuleEngineConfigs.TLTInfo () [0x00000] in <filename unknown>:0 
  at RealFuels.ModuleEngineConfigs.engineManagerGUI (Int32 WindowID) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUILayout+LayoutedWindow.DoWindow (Int32 windowID) [0x00000] in <filename unknown>:0 
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.WindowFunction func, Int32 id, UnityEngine.GUISkin _skin, Int32 forceRect, Single width, Single height, UnityEngine.GUIStyle style) [0x00000] in <filename unknown>:0 

@NathanKell NathanKell reopened this Dec 11, 2015
@NathanKell
Copy link
Member

Reopened.

@svm420
Copy link
Author

svm420 commented Dec 13, 2015

@NathanKell Any chance you will be back to this before the holidays/turn of the year? Thanks!

@NathanKell
Copy link
Member

Yep, I plan to work on this when RP-0 is done.

@svm420
Copy link
Author

svm420 commented Jan 1, 2016

@NathanKell Did you mean when RP-0 is completely finished, or were you going to come back to this sometime soon? Just waiting on this fix for my career Thanks!

@svm420
Copy link
Author

svm420 commented Jan 9, 2016

@NathanKell Any clarification would greatly be appreciated. Thanks!

@NathanKell
Copy link
Member

Sorry, thought I commented here. Per the last devnotes I spent pretty much all the time from Christmas to last weekend in the hospital with my mom; I'm now (and was before, which made that awkward) very busy on KSP dev work. I will certainly get to this when I can, and I was intending to come back to it now that RP-0 is working 'well enough', but...afraid it'll be awhile yet unless you can scrape up someone else to look into why it's failing.

@svm420 svm420 closed this as completed Jan 22, 2016
@svm420 svm420 reopened this Jan 22, 2016
@Starwaster
Copy link
Contributor

Starwaster commented Jan 12, 2019

What IS the current status of this? Can I close this? Trying to do some serious pruning of the 30ish or so issues outstanding.

@svm420
Copy link
Author

svm420 commented Jan 12, 2019

Just did some quick testing. The last issue I mentioned still exists. RCS using RealFuels does not scale thrust power with resizing. There are no NREs or other errors. It just doesn't work. Engines work fine, and scale thrust with size. I can do testing if needed. Would really appreciate this finally being fixed :) Thanks!

@Starwaster
Copy link
Contributor

@svm420 can you get me a fresh log file for this? The old one is AWOL and probably was no longer relevant since it was for a different issue? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants