X2CommunityCore / X2WOTCCommunityHighlander

https://steamcommunity.com/workshop/filedetails/?id=1134256495
MIT License
60 stars 69 forks source link

Use List.ClearItems() instead of List.Itemcontainer.RemoveChildren() to prevent CTDs with large lists #1373

Closed BlackDog86 closed 2 months ago

BlackDog86 commented 3 months ago

Fixes #1372

BlackDog86 commented 3 months ago

Changes made as requested

Iridar commented 2 months ago

I assume this was tested and confirmed to fix the actual problem?

Tedster59 commented 2 months ago

@Iridar - Currently released as a standalone invasive MCO until the Highlander release here: https://steamcommunity.com/sharedfiles/filedetails/?id=3307455200, and this was also identified as the issue via Robojumper/Crash dump investigation

BlackDog86 commented 2 months ago

@Iridar - Currently released as a standalone invasive MCO until the Highlander release here: https://steamcommunity.com/sharedfiles/filedetails/?id=3307455200, and this was also identified as the issue via Robojumper/Crash dump investigation

That mod also does some other stuff with the UI - this fix literally just stops the crash, but leaves all the poses in a big list, the same as the vanilla game.

Iridar commented 2 months ago

I see. No reason to hold this up then. I checked and looks like these are the only places in code where RemoveChildren() is even called. It might be a good idea to add a comment that would caution against using it.