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

Refunding is not working on 1.12.x!!!! #77

Closed
Lisias opened this issue May 6, 2024 · 14 comments
Closed

Refunding is not working on 1.12.x!!!! #77

Lisias opened this issue May 6, 2024 · 14 comments
Assignees
Labels
KRAP KRAP, man... What in hell?? My Fault I Borked on this one Not My Fault Not my Fault! I'm innocent! :)
Milestone

Comments

@Lisias
Copy link
Contributor

Lisias commented May 6, 2024

Fellow Kerbonaut by_HOY_ complained about the pricing of scaled parts being wrong:

image
image

Problem: The costs I'm getting are not exactly the same!

screenshot65

So I created this Untitled Space Craft, costing 44680F (from a budget of 50.000F):

screenshot68

Launched it, and recovered it:

Screen Shot 2024-05-05 at 23 26 20

And voilá, funds are screwed. 😢

The special resource I use to recover the loses from the crappy KSP recovering funds calculation is missing!!

@Lisias Lisias self-assigned this May 6, 2024
@Lisias Lisias added the Not My Fault Not my Fault! I'm innocent! :) label May 6, 2024
@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

Damn. The think is working on 1.11.2. So it's something related to KSP itself that changed something later. 😠

Screen Shot 2024-05-05 at 23 43 35

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

Things are borking from KSP 1.12.x and newer, bothered to check from 1.12.2 to 1.12.5 . 💩

Now... Why this is being detected just now? I remember testing Refunding on KSP 1.12.2

https://forum.kerbalspaceprogram.com/topic/192048-143/?do=findComment&comment=4202573

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

Crap. O think I found the reason. Aparently OnEditorShipModified is not being called by Editor.

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

Nope. I misconfigured the Log level on Refunding. I'm too tired, time to give this a break.

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

Humm... I think I found it this time. FundsKeeper.UpdateResource is not being called by Refunding. 😞

Interesting, StealBacoMyFunds is working as expected...

[LOG 07:47:50.671] [KSP-Recall.StealBackMyFunds] TRACE: UpdateResource solidBooster.sm.v2:FFF925F2

Why just Refunding is getting screwed?

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

Jesus Christ! It's because Refunding is not being applied into the part!!!!

savegame: bug.zip
KSP.log: KSP.log
ConfigCache: ConfigCache.cfg.zip

On the Untitled Craft craft file on VAB's Ship's directory, you will find that the craft is being saved without the Refunding module!

FundsKeeper and TweakScale are there, just Refunding is missing. But the KSP.log says the patch was applied, and the thing is there on the ConfigCache...

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

Changing this to KSP-Recall, as it's a problem related to it.

@Lisias Lisias transferred this issue from TweakScale/TweakScale May 6, 2024
@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

It's odd. StealBackMyFunds is working, and it uses essentially the same mechanisms.

I managed to make the damned Refunding to be loaded by renaming it, besides it didn't recovered any funds. It's like the name "Refunding" became cursed somehow.

DayJob© is calling now, but I will go back to this issue ASAP. I think I need to do some regression tests using previous KSP-Recall releases to see what I find.

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

Humm, ok. It's a self infringed problem: Refunding is working on KSP-Recall 0.3.0.12 .

@Lisias Lisias added the My Fault I Borked on this one label May 6, 2024
@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

The fault of Schrödinger: it's not my fault, but it's my fault.

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

This mess started to happen on KSP-Recall 0.4.0.3.

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

This is the exact commit that triggered the problem. I don't have the slightest idea on how in hell this caused so much damaged.

f8afb62

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

This is the most unsettling...

It looks like Refunding is being killed on the OnLoad. Look the StealBackMyFunds log sequence, it Refunding should be having a similar sequence.

[LOG 16:00:09.819] [KSP-Recall.FundsKeeper] TRACE: OnAwake <NO VESSEL>-probeCoreOcto.v2(Clone):FFF9352A
[LOG 16:00:09.819] [KSP-Recall.StealBackMyFunds] TRACE: OnAwake <NO VESSEL>-probeCoreOcto.v2(Clone):FFF9352A
[LOG 16:00:09.823] [KSP-Recall.FundsKeeper] TRACE: OnLoad <NO VESSEL>-probeCoreOcto.v2:FFF9352A True
[LOG 16:00:09.823] [KSP-Recall.StealBackMyFunds] TRACE: OnLoad <NO VESSEL>-probeCoreOcto.v2:FFF9352A True
[LOG 16:00:09.823] [KSP-Recall.StealBackMyFunds] TRACE: HighLogic.LoadedScene FLIGHT
[LOG 16:00:09.823] [KSP-Recall.StealBackMyFunds] TRACE: Resetting StealBackMyFunds on part <NO VESSEL>-probeCoreOcto.v2:FFF9352A
[LOG 16:00:09.831] [KSP-Recall.FundsKeeper] TRACE: OnAwake <NO VESSEL>-solidBooster.sm.v2(Clone):FFF934E2
[LOG 16:00:09.832] [KSP-Recall.StealBackMyFunds] TRACE: OnAwake <NO VESSEL>-solidBooster.sm.v2(Clone):FFF934E2
[LOG 16:00:09.834] [KSP-Recall.FundsKeeper] TRACE: OnLoad <NO VESSEL>-solidBooster.sm.v2:FFF934E2 True
[LOG 16:00:09.834] [KSP-Recall.StealBackMyFunds] TRACE: OnLoad <NO VESSEL>-solidBooster.sm.v2:FFF934E2 True
[LOG 16:00:09.834] [KSP-Recall.StealBackMyFunds] TRACE: HighLogic.LoadedScene FLIGHT
[LOG 16:00:09.834] [KSP-Recall.StealBackMyFunds] TRACE: Resetting StealBackMyFunds on part <NO VESSEL>-solidBooster.sm.v2:FFF934E2

@Lisias
Copy link
Contributor Author

Lisias commented May 6, 2024

I quit trying to understand this crap 💩 for now. RealLife™ is bitting.

I rolled back the codebase to the point where the problem didn't happened, backported some fixes, and will publish the damned thing based on branch https://github.com/net-lisias-ksp/KSP-Recall/tree/emergencial/0.5.0.0 .

kraken knows what in hell is happening here.

Once I have some time available (what will be a fight by itself for while), I will try to add back the changes that caused the problem in 1.12.x (and only on 1.12.x) one by one to see if I figure out exactly what happened.

@Lisias Lisias closed this as completed May 6, 2024
@Lisias Lisias added this to the 0.5.0.0 milestone May 6, 2024
@Lisias Lisias added the KRAP KRAP, man... What in hell?? label May 6, 2024
@Lisias Lisias changed the title Refunding is not working!!!! Refunding is not working on 1.12.x!!!! May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
KRAP KRAP, man... What in hell?? My Fault I Borked on this one Not My Fault Not my Fault! I'm innocent! :)
Projects
None yet
Development

No branches or pull requests

1 participant