Since the latest Rust update, my server has been experiencing abnormal memory usage leading to Out of Memory errors and shutdowns. After reviewing the logs, I have identified repeated OOM errors occurring specifically in the plugins AmmoHUD v1.2.1 and ItemRetriever v0.7.x.
Observed behavior:
Both plugins are triggering
Out of memoryerrors during theOnActiveItemChangedandOnInventoryAmmoFindhooks.The stack traces show repeated calls to
System.Collections.Generic.List<Item>.set_Capacity, suggesting that item lists are continuously expanding without proper release.This happens multiple times in a day (e.g., 05:17 and 13:28), not as a one-time spike.
RustAdmin reports abnormal memory usage values before shutdown, e.g.,
"Your server is using: 96782.96MB Memory".2025/08/8 13:28:04 | Failed to call internal hook 'OnActiveItemChanged' on plugin 'AmmoHUD v1.2.1' [2268037981] (Out of memory) at void System.Collections.Generic.List<Item>.set_Capacity(int value) at void System.Collections.Generic.List<Item>.EnsureCapacity(int min) at void System.Collections.Generic.List<Item>.AddWithResize(Item item) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at void Oxide.Plugins.ItemRetriever.FindPlayerAmmo(BasePlayer player, AmmoTypes ammoType, List<Item> collect) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/ItemRetriever.cs:line 526 at object Oxide.Plugins.ItemRetriever.OnInventoryAmmoFind(PlayerInventory inventory, List<Item> collect, AmmoTypes ammoType) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/ItemRetriever.cs:line 134 at object Oxide.Plugins.ItemRetriever.InternalCallHook(uint hook, object[] args) in ItemRetriever.cs/Internal:line 209 at void System.Collections.Generic.List<Item>.set_Capacity(int value) at void System.Collections.Generic.List<Item>.EnsureCapacity(int min) at void System.Collections.Generic.List<Item>.AddWithResize(Item item) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at int BaseProjectile.GetAvailableAmmo() at void Oxide.Plugins.AmmoHUD.UpdateUI(BasePlayer player, AttackEntity item, UpdateEnum uiToUpdate) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/AmmoHUD.cs:line 664 at void Oxide.Plugins.AmmoHUD.OnActiveItemChanged(BasePlayer player, Item oldItem, Item newItem) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/AmmoHUD.cs:line 482 at object Oxide.Plugins.AmmoHUD.InternalCallHook(uint hook, object[] args) in AmmoHUD.cs/Internal:line 106 2025/08/8 13:28:04 | Failed to call internal hook 'OnInventoryAmmoFind' on plugin 'ItemRetriever v0.7.5' [2374724162] (Out of memory) at void System.Collections.Generic.List<Item>.set_Capacity(int value) at void System.Collections.Generic.List<Item>.EnsureCapacity(int min) at void System.Collections.Generic.List<Item>.AddWithResize(Item item) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at void Oxide.Plugins.ItemRetriever.FindPlayerAmmo(BasePlayer player, AmmoTypes ammoType, List<Item> collect) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/ItemRetriever.cs:line 526 at object Oxide.Plugins.ItemRetriever.OnInventoryAmmoFind(PlayerInventory inventory, List<Item> collect, AmmoTypes ammoType) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/ItemRetriever.cs:line 134 at object Oxide.Plugins.ItemRetriever.InternalCallHook(uint hook, object[] args) in ItemRetriever.cs/Internal:line 209 2025/08/8 05:17:20 | Failed to call internal hook 'OnActiveItemChanged' on plugin 'AmmoHUD v1.2.1' [2268037981] (Out of memory) at void System.Collections.Generic.List<Item>.set_Capacity(int value) at void System.Collections.Generic.List<Item>.EnsureCapacity(int min) at void System.Collections.Generic.List<Item>.AddWithResize(Item item) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at void Oxide.Plugins.ItemRetriever.FindPlayerAmmo(BasePlayer player, AmmoTypes ammoType, List<Item> collect) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/ItemRetriever.cs:line 620 at object Oxide.Plugins.ItemRetriever.OnInventoryAmmoFind(PlayerInventory inventory, List<Item> collect, AmmoTypes ammoType) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/ItemRetriever.cs:line 228 at object Oxide.Plugins.ItemRetriever.InternalCallHook(uint hook, object[] args) in ItemRetriever.cs/Internal:line 212 at void System.Collections.Generic.List<Item>.set_Capacity(int value) at void System.Collections.Generic.List<Item>.EnsureCapacity(int min) at void System.Collections.Generic.List<Item>.AddWithResize(Item item) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at int BaseProjectile.GetAvailableAmmo() at void Oxide.Plugins.AmmoHUD.UpdateUI(BasePlayer player, AttackEntity item, UpdateEnum uiToUpdate) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/AmmoHUD.cs:line 664 at void Oxide.Plugins.AmmoHUD.OnActiveItemChanged(BasePlayer player, Item oldItem, Item newItem) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/AmmoHUD.cs:line 482 at object Oxide.Plugins.AmmoHUD.InternalCallHook(uint hook, object[] args) in AmmoHUD.cs/Internal:line 106 2025/08/8 05:17:20 | Failed to call internal hook 'OnInventoryAmmoFind' on plugin 'ItemRetriever v0.7.4' [2374724162] (Out of memory) at void System.Collections.Generic.List<Item>.set_Capacity(int value) at void System.Collections.Generic.List<Item>.EnsureCapacity(int min) at void System.Collections.Generic.List<Item>.AddWithResize(Item item) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at void Item.FindAmmo(List<Item> list, AmmoTypes ammoType) at void ItemContainer.FindAmmo(List<Item> list, AmmoTypes ammoType) at void Oxide.Plugins.ItemRetriever.FindPlayerAmmo(BasePlayer player, AmmoTypes ammoType, List<Item> collect) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/ItemRetriever.cs:line 620 at object Oxide.Plugins.ItemRetriever.OnInventoryAmmoFind(PlayerInventory inventory, List<Item> collect, AmmoTypes ammoType) in D:/TCAFiles/Users/kentk/5128864/carbon/plugins/ItemRetriever.cs:line 228 at object Oxide.Plugins.ItemRetriever.InternalCallHook(uint hook, object[] args) in ItemRetriever.cs/Internal:line 212My request:
Could you confirm if this is a known issue with either AmmoHUD or ItemRetriever after the recent Rust update?
Is there a recommended fix or update to prevent uncontrolled memory growth in these hooks?
In the meantime, would you recommend disabling one or both plugins to stabilize the server?