Skip to content

Conversation

@Lpsd
Copy link
Member

@Lpsd Lpsd commented Feb 20, 2025

Resolves #4029 by using the functionality in CClientDisplayManager::DoPulse which cleans up expired elements.

After the underlying vector graphic has been destroyed, an expiration of 1ms is set on the vector display instance so the manager can clean it up automatically.

Display instances are already destroyed/cleared upon destruction of the display manager.

Tested lightly by creating multiple SVGs, modifying them (updating, destroying) and manually tracking the lifetime of display instances in debugger. Seems to work as intended through restarting resources, disconnecting & exiting the client.

Lpsd added 18 commits May 24, 2024 10:35
@Dutchman101
Copy link
Member

This will be merged shortly, first we'll just get a nightly build that only includes the LunaSVG vendor update (#4067), in case we need to distinguish testing results for any reason.


void CClientVectorGraphic::OnUpdate()
{
if (!m_pVectorGraphicDisplay)
Copy link
Member

Choose a reason for hiding this comment

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

Is this situation possible?

@TheNormalnij
Copy link
Member

How does your fix work?
It looks like this code implements some sort of use-after-free logic and this shouldn't be allowed.

@Lpsd Lpsd closed this Mar 15, 2025
@Lpsd
Copy link
Member Author

Lpsd commented Mar 15, 2025

See #4108

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Hard-hitting crash in CClientDisplayManager::RemoveFromList

3 participants