HDest-Community / Ugly-as-Sin

Enhancement modules for Hideous Destructor
zlib License
21 stars 17 forks source link

VM Abort Chance When Healing A Bandaged Wound With Trauma Kit. #234

Closed Azalotz closed 9 months ago

Azalotz commented 9 months ago

Finally, Something That Isn't My Own Stupidity Lol. I've Been Playing Around With HD And UAS With A Couple Of Mods (could be the issue to this) And Have Run Into Times Where I Get Hit, And Need To Heal With The TK. As Soon As I Go To Staple, Forceps, Or Use Painkillers Or Anything I Get Hit With This Specific VM Abort. Screenshot_20240218_004243 If You Have Gotten This Bug Request In The Past, My Apologies. This Bug Doesn't Happen Often And I'm A Little Too Lazy To Record It Happening. It's Very Uncommon, But Will Spook You When You Don't Expect It.

Azalotz commented 9 months ago

It Happens More Frequently When It's A Bandaged Wound, And You Rip Them Off.

Azalotz commented 9 months ago

Oops Lol.

caligari87 commented 9 months ago

Seems like this is the relevant line: let blockinv = HDWoundFixer.CheckCovered(mti.patient, CHECKCOV_ONLYFULL); My guess is that mti.patient is null at some point when this gets checked. Problem is I'm not sure when that gets set and where the nullcheck to counter-act it should happen.

@dastrukar I think the ball may be in your court on this, but I can fix it if you point me in the right direction.

dastrukar commented 9 months ago

mti.patient gets set in Super.DoEffect() here, which means it shouldn't be null? Also, the bandage should be sharing the same mti with the trauma kit, so I'm not sure what's exactly going wrong... or maybe mti is null in the SelfBandage tool?

Azalotz commented 9 months ago

For Everyone's Sake I'll Record If Need B. Just @ Me If It's Necessary.

Azalotz commented 9 months ago

Also I'm Using The Main For HDest And The Master For UAS.

dastrukar commented 9 months ago

@Azalotz forgot to ask, do you mind posting your load order?

Azalotz commented 9 months ago

Sure. One Moment.

Azalotz commented 9 months ago

__

Azalotz commented 9 months ago

It's Gonna Be In Delta Touch Format, So It's Gonna Look A Bit Funky.

Azalotz commented 9 months ago

I Always Do That, My Bad.

Azalotz commented 9 months ago

https://github.com/caligari87/Ugly-as-Sin/assets/103554296/c5974686-9e3a-468a-a436-b8fc47cfb4f4

Azalotz commented 9 months ago

I Organize Many Of My Files By Changing Names And Adding Folders, Do If You Wonder What Something Is Don't Mind @ Ing Me.

Azalotz commented 9 months ago

I'll Try To Get The VM Abort While Recording.

Azalotz commented 9 months ago

So After Litterally A God Damn Hour, I Finally Got It. So From What I Can Tell It's 100% The Bandage Causing It. I Got Incapped By The HERP, Crawled Through The Air Duct, And Bandaged A Bit Before Standing Up. I Healed My First Wound Comepletely Fine, And Then The Second One, Which Was Bandaged Caused The VM Abort. (audio muted so you don't hear imp-tan moans from hdass.pk3 lol) @dastrukar

https://github.com/caligari87/Ugly-as-Sin/assets/103554296/11bd87a3-affd-4731-9d1f-48174c4920d5

Azalotz commented 9 months ago

Don't Mind My Horrible Gameplay.

Azalotz commented 9 months ago

Ah, I Know Now. The Wound Spawns Bandaged, And When You Go To Heal It It VM Aborts.

dastrukar commented 9 months ago

hmmm, just a guess do you only use the trauma kit and never touch the bandage? (not judging) edit: when i say "bandage", i mean the bandage tool, not the incap bandaging

dastrukar commented 9 months ago

Managed to replicate the crash by forcing wounds to spawn patched and never touching the selfbandage tool at all probably shouldn't have relied on inheritance that much lol i'll try to fix it soon

dastrukar commented 9 months ago

@Azalotz try using this: Ugly-as-Sin_tmpfix.zip just a temporary fix for now, but it should (hopefully) fix the vm aborts

Azalotz commented 9 months ago

hmmm, just a guess do you only use the trauma kit and never touch the bandage? (not judging) edit: when i say "bandage", i mean the bandage tool, not the incap bandaging

Yeah Lol. Only When I Have Nothing To Heal With, Or I'm Incapped.

But I'll Give The ZIP A Try, And Good Luck.

Azalotz commented 9 months ago

I'll Let You Know If They Persist.