X2CommunityCore / X2WOTCCommunityHighlander

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

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

Closed BlackDog86 closed 4 days ago

BlackDog86 commented 1 month ago

Fixes #1372

BlackDog86 commented 1 month ago

Changes made as requested

Iridar commented 1 week ago

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

Tedster59 commented 1 week 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 6 days 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 4 days 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.