Home » MODDING HQ 1.13 » v1.13 Bug Reports » The LBE-emptying Bug
The LBE-emptying Bug[message #348312] Mon, 16 January 2017 13:34 Go to next message
Vincent J. Claymore

 
Messages:269
Registered:February 2011
Not sure how common this is for everyone else, but it has happened to me several times now over the past few years on different installations across multiple PCs...

Sometime when I stack filled LBE it winds up empty. As an example, something I regularly do is drive around the Hummer with empty backpacks in it to collect gear. I equip these backpacks, fill them with stuff and then take them off the Merc and place them in the Hummer's inventory. Sometimes I fill LBE (mostly backpacks and combat packs) and place them into mercs' hands to allow them to transport more gear as well. About 9 out of 10 times this works just fine, but every so often the savegame gets corrupted and all items in those LBE (all the ones marked with a blue asterisk) get "deleted". Basically two things happen: 1) When you equip any of those LBE, they are empty. 2) If you right-click the LBE with blue asterisks, the game crashes, straight to black screen.

I have uploaded my quicksave. To recreate the error, just open the inventory of the Hummer and right-click one of the LBE contained within or try and equip one of them.
http://www.filedropper.com/quicksave_1

[Updated on: Mon, 16 January 2017 13:34]

Re: The LBE-emptying Bug[message #348353 is a reply to message #348312] Thu, 19 January 2017 00:34 Go to previous messageGo to next message
Flugente

 
Messages:3051
Registered:April 2009
Location: Germany
Urrgs. This is really, really ugly stuff. To make things worse, I don't even understand the LBE/attachment code enough to be able to determine whether what I see is broken or intended. And I don't see any documentation on how this stuff is supposed to work angry

Anyways, at least in my eyes, those LBE items are corrupted. Sometimes, after moving them, other LBE gear also show that behavior - if I put Dynamo's vest into his hands and late back, sometimes all stuff vanishes. I can commit code that stops the crash, but as the stuff is still gone, that doesn't exactly adress the problem.

To any other interested coder: how does this whole LBEArray-business work? I mean, why do we occasionally nuke the whole stuff, why don't we put LBE in inventory slots into it during some loading routines, why do we erase iterators that all but scream 'corrupted memory'?



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: The LBE-emptying Bug[message #348423 is a reply to message #348353] Sun, 22 January 2017 22:46 Go to previous messageGo to next message
Flugente

 
Messages:3051
Registered:April 2009
Location: Germany
I added a fix in r8373 that stops the game from crashing if it tries to display an LBE with corrupted contents. This does not fix whatever corrupts the LBE, it merely stops the game from crashing.

Whatever this is, it affects LBEArray, which is extremely bad. After the above fix, the bug sometimes resurfaces, sometimes not (but the contents are always lost). I have no idea what happened and no idea how this all this inventory code is supposed to work in the first place. My personal preference would be to nuke the entire LBE/attachment code and create something sleek, small and documented, but my planet needs me, so I won't do that.



Saren threw his head back and screamed in impotent fury, before falling to his throne, head in his claws, trembling in horrified disbelief.

Then he heard a faint chime as Sovereign subscribed to her ECHO channel.

If you want, you can donate to me. This will not affect how and what I code, and I will not code specific features in return. I will be thankful though.


Re: The LBE-emptying Bug[message #348428 is a reply to message #348423] Mon, 23 January 2017 21:47 Go to previous message
Vincent J. Claymore

 
Messages:269
Registered:February 2011
Well, the partial fix is certainly appreciated!
Previous Topic: BUG: Main user created merc picks up specific items randomly.
Next Topic: Enemies appearing in Grumm
Goto Forum:
  


Current Time: Tue May 23 23:27:27 EEST 2017

Total time taken to generate the page: 0.00795 seconds