Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[guilib] Ensure ListItems release the layout before it is destroyed #15274

Merged
merged 1 commit into from Jan 23, 2019

Conversation

enen92
Copy link
Member

@enen92 enen92 commented Jan 17, 2019

Description

This PR makes sure listitems in a grouplist release the reference to the container/layout before it is destroyed. Right now this occurs too late, making the container pointer invalid when the pointed object is deleted (as a child of a group).
Credits for the proper solution goes to @peak3d. Thanks also to @fritsch and @pkerling for the patience :)

Motivation and Context

Fix #15226 and make we still have extended.info support in Estuary for v18 (invalidating #15258).

How Has This Been Tested?

Compiled and tested on osx

Types of change

  • Bug fix (non-breaking change which fixes an issue)
  • Clean up (non-breaking change which removes non-working, unmaintained functionality)
  • Improvement (non-breaking change which improves existing functionality)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that will cause existing functionality to change)
  • Cosmetic change (non-breaking change that doesn't touch code)
  • None of the above (please explain below)

Checklist:

  • My code follows the Code Guidelines of this project
  • My change requires a change to the documentation, either Doxygen or wiki
  • I have updated the documentation accordingly
  • I have read the Contributing document
  • I have added tests to cover my change
  • All new and existing tests passed

@enen92 enen92 added Type: Fix non-breaking change which fixes an issue Component: GUI engine v18 Leia labels Jan 17, 2019
@enen92 enen92 added this to the Leia 18.0-Final milestone Jan 17, 2019
@ronie
Copy link
Member

ronie commented Jan 17, 2019

tested and it works ok on my end. thx!

Copy link
Member

@yol yol left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks innocent, but it's really hard to say if this will break anything else or not

@peak3d
Copy link
Contributor

peak3d commented Jan 18, 2019

@pkerling FreeMemory simply removes the Layouts which are used for presenting the listItem.
There is no real risk, because layouts are not a shared resource over GUI control parents

Edit: But yes, the missing blank should be inserted :-)

@MartijnKaijser
Copy link
Member

Shall we merge and see for couple of days?

@enen92
Copy link
Member Author

enen92 commented Jan 23, 2019

@MartijnKaijser have been using this for a few days and haven't found any regression yet. Peak3d did a lot of rework on GUI for v18 and this fix is proposed by him anyways (as the bug was introduced in his rework PR). I'd say this is safe enough to be merged. We can always revert if justified.

@MartijnKaijser MartijnKaijser merged commit 61ecacb into xbmc:master Jan 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: GUI engine Type: Fix non-breaking change which fixes an issue v18 Leia
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Kodi 18 crash using script.extendedinfo
5 participants