Closed ghost closed 1 year ago
I am experiencing the same issue with memory usage quickly going to 200GB+ on build 0.87.0.
6
I have same issue on macOS Monterey 12.0.1
Please try this temporary solution: https://github.com/voxeltycoon/issues/discussions/924
@andrewpey Tested version 0.87.0.6 steam m1_test
with a large map on a 2020 M1 MBP and it looks stable now. The memory consumption peaked at 9.2 GB, Mach port usage at ~800 which is significantly better.
@kristoffn Good to know, thank you! That build is made with an older version of Unity where the bug is not yet appeared. Unfortunately, it's hard to be considered as a good solution since it prevents us from using features and fixes which come with newer versions of Unity.
We have found a known Unity issue which might be related to this. We'll keep an eye on that and re-check when the issue will be resolved on Unity's side.
Also, if it's possible, can we ask you to try to switch to the beta_unity2021
branch and let us know if the issue is still there? it would really help.
@andrewpey Thanks for the update! Tested the beta_unity2021
version on a 2020 M1 MBP an the Mach port leak is gone. I think this issue can be closed. Thank you so much for the fix!
We've pushed the recent build with possible fix included to the beta branch. Please let us know if it's fixed!
With a medium-sized map, the real memory usage stayed around 1,3 - 2,1 GB. The binary used 45 threads and the Mach port usage stayed between 580 - 610.
I think this was the most stable build so far, there was no experienceable leaking Mach port or memory. From my end this issue can be closed, let me know if you need the memory snapshots.
Thanks @andrewpey! :)
The fix is deployed to the main branch with 0.87.1.5
update. Thanks for your patience!
Seems like the issue is still here: https://steamcommunity.com/app/732050/eventcomments/3176733459032297101
We've just pushed a new build to the beta branch where we upgraded to the most recent stable Unity version (2021.3.0). Please try it out and let us know if the issue is still here.
We've just pushed a new build (0.87.1.8
) to the beta branch which includes a native M1 version. Please try it out and let us know if the issue is still here (and if it works at all).
M1 players: We've just pushed a new build (0.87.1.11
) to the m1_native_test
branch. This build contains only M1 version. Please let us know if it works and if it has memory problems.
Here's another possible temporary solution found (see the Temporary solution 1): https://github.com/voxeltycoon/issues/discussions/924.
I tried the m1_native_test branch and still see memory usage escalating out of control. After about ~7 minutes or so, it's already up to 64 GB. My game is still on the default/starter/initial region, I can't really play long enough without the game crashing, to make significant progress to unlock other regions.
Thanks for the information. Can you try to change your game resolution to something other than your native screen resolution (or Looks like resolution if you use scaling) and see if this helps?
I believe I already have that set: I play in a window because I multitask while it runs, and the game is set for 3200x1800. My Mac is attached to a 4k monitor, which is set to a "looks like" of 1920 x 1080.
Let me know if there's anything else I can share!
I also just noticed that, while the "Memory" number for Voxel Tycoon is incrementing, it's not causing my Mac to swap, even though the "Memory" number is larger than the 32gb in this machine.
Made a one minute video here showing the "Memory" value incrementing over time: https://link.cekkent.net/6e620454-74af-4745-97ad-4bc58ea6ecfc - also of note, the "Shared Memory Size" and "Private Memory Size" values intermittently change to huge numbers.
Thanks for the extra info, we'll continue to look into it.
This issue appears to still be presenting on Mac M1's, just fyi.
This issue appears to still be presenting on Mac M1's, just fyi.
This is unfortunate, thanks for letting us know.
For clarification, after reading through other reports and suggestions, this is the main branch. Loading the Mac beta branch has solved the issue. Hopefully the main branch will see a fix soon enough so the most recent updates can be played!
@LtDominator are you using the one called "beta", or the one called "m1_test" ?
@damianharouff I am using, "m1_test - m1_test".
@LtDominator have you tried the beta
branch with the 0.87.2.0
update?
@andrewpey I plan to play some later today, I'll test it and get back to you.
@andrewpey I played a new game using, "beta - Beta". I was able to play for nearly 30 minutes before I got the error again.
To note, in the main branch when I played it became more frequent as I progressed further and further in the game. Given how long it took this time, either this beta branch has an improvement over the main branch, or the memory leak is related to an instance of some sort that leaks and the more of those instances the faster the leak overflows my memory.
Thank you for that extra information.
As we're ~1 year later, any movement or interest in engaging with this issue?
There's no new information unfortunately. We are waiting for the next Unity LTS release to upgrade (which should happen this spring), in hope that they've fixed something there.
The recent update (0.88.3.1) contains a possible fix for this issue. Please give it a try and let us know if it helps.
It seems that the issue is finally resolved.
Describe the bug Voxel Tycoon leaks Mach ports and the process consumes more and more memory over time until it runs out of resources. The memory samples indicate a recursive function that may responsible for the increasing Mach port usage.
Steps to reproduce
Build version 0.87.0.3.steam
Platform macOS Monterey - Version 12.0.1
Reproducibility every time
Logs/saves