Skip to content

Conversation

@umer-rs
Copy link
Contributor

@umer-rs umer-rs commented Nov 25, 2025

@runelite-github-app
Copy link

runelite-github-app bot commented Nov 25, 2025

@runelite-github-app
Copy link

runelite-github-app bot commented Nov 25, 2025

Internal use only: Reviewer details Maintainer details

@LlemonDuck
Copy link
Contributor

your unloading of stuff is not sound, you need to be discarding of GameObject references as soon as they're invalidated. Waiting until they go a certain distance away is not sufficient.

There are only two cases you need to worry about:

  • onGameObjectDespawned -> remove
    • you don't need to do any comparisons, just referential equality is fine (Set#remove, HashMap#remove, eventObj == storedObj) are all sufficient
  • onWorldViewUnloaded -> remove all objects from that WorldView
    • e.g. Set#removeIf(obj -> obj.getWorldView() == event.getWorldView())

@LlemonDuck LlemonDuck added the waiting for author waiting for the pr author to make changes or respond to questions label Nov 28, 2025
@umer-rs
Copy link
Contributor Author

umer-rs commented Nov 28, 2025

Is it fine if this just went in, for this is how the plugin used to work. It will restore functionality without requiring GPu plugin.

I'll cook up a fix when I have more time wrt this and the discussion in development channel a few days ago.

@runelite-github-app runelite-github-app bot removed the waiting for author waiting for the pr author to make changes or respond to questions label Nov 28, 2025
@LlemonDuck
Copy link
Contributor

LlemonDuck commented Nov 28, 2025

No, you're holding onto GameObjects beyond their lifetime which can cause instability in the client and possibly crashes. The change I'm requesting is not a significant lift.

Replace hiddenObjects with a Set<GameObject> and the rest should shake out

@LlemonDuck LlemonDuck added the waiting for author waiting for the pr author to make changes or respond to questions label Nov 28, 2025
@runelite-github-app runelite-github-app bot added size-s and removed waiting for author waiting for the pr author to make changes or respond to questions size-m labels Nov 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants