Skip to content

skins leak between sessions (SkinTracker not cleared on disconnect) #71

Description

@duzos

split off from #26 - the skin tracker has the exact same leak.

SkinTracker.initClient registers a ClientPlayConnectionEvents.DISCONNECT handler but the clear inside it is commented out (SkinTracker.java:67-69):

ClientPlayConnectionEvents.DISCONNECT.register((handler, client) -> {
    // getInstance().clear();
});

SkinTracker is a HashMap<UUID, SkinData> that's filled from the server on sync (receive, SkinTracker.java:131-139 - just puts, never clears first). so when you leave a server its skins stay in the map and bleed into your next world / server.

fix: uncomment the getInstance().clear(); on DISCONNECT. could also clear at the start of receive for a clean resync.

same root cause as #26, and #21 (native registries) would kill this whole class of leak for free too.

Metadata

Metadata

Assignees

Labels

A: Core TechArea: Underlying core tech for the mod and the GitHub repository.C: RenderChanges: Might require knowledge of shaders and rendering.DB: Beginner FriendlyDifficulty: Great for beginners. Unambiguous in scope, and explains how to achieve the result.P2: RaisedPriority: Item has a raised priority, indicating it might get increased maintainer attention.T: BugfixType: Bugs and/or bugfixes.

Type

Fields

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions