X2CommunityCore / X2WOTCCommunityHighlander

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

Game crashes to desktop when a pose is selected in the photobooth, when large numbers of poses are in the list. #1372

Closed BlackDog86 closed 4 days ago

BlackDog86 commented 1 month ago

UIPhotoboothBase uses List.ItemContainer.RemoveChildren(); when a selection is made on this screen. It's a native call which is assumed to nuke the ItemContainer & its contents. However, if the item container is too large, too much information is allocated on the Flash stack at once and a CTD occurs.

Replacing the call with List.ClearItems(); in the OnCancel and OnPoseConfirm functions in UIPhotobooth base prevents the crash, presumably by more safely disposing of the container.