Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Examples Freeze on M1 mac Unity 2021.2.16f1 memory leak #503

Closed
gkiernozek opened this issue Mar 23, 2022 · 6 comments
Closed

Examples Freeze on M1 mac Unity 2021.2.16f1 memory leak #503

gkiernozek opened this issue Mar 23, 2022 · 6 comments
Labels
duplicate This issue or pull request already exists host:macos Issue that occurs when host OS is macOS type:bug Something isn't working

Comments

@gkiernozek
Copy link
Contributor

Plugin Version or Commit ID

b1c7b61

Unity Version

2021.2.16f1

Your Host OS

macOS Big Sur 11.5.2

Target Platform

Mac Standalone

Target Device

MacBook 13-inch M1, 2020

[Windows Only] Visual Studio C++ and Windows SDK Version

No response

[Linux Only] GCC/G++ and GLIBC Version

No response

[Android Only] Android Build Tools and NDK Version

No response

[iOS Only] XCode Version

No response

Build Command

python build.py build --desktop cpu --opencv=cmake -vv

Bug Description

Whole scene inside Unity freezes after a short while (under 3 mins).

Steps to Reproduce the Bug

Bootstrap set to CPU.
Run StartScene then switch to holistic for fastest crash effect.

Log

Log does not show anything strange.
RAM is skyrocketing and macOS seems to be killing app on RAM limit.
Editor-prev.log

Screenshot/Video

Screenshot 2022-03-23 at 16 45 55

Additional Context

No response

@gkiernozek gkiernozek added the type:bug Something isn't working label Mar 23, 2022
@gkiernozek
Copy link
Contributor Author

It's probable that problem exists on other platforms as well - just iOS / macOS just poorly handles GC. I assume that Annotation Points cause this as they spawn and despawn, but there can be other sources as well. I'll see tomorrow if disabling drawing will help.

@homuler
Copy link
Owner

homuler commented Mar 24, 2022

I am aware of this issue, but have never seen it occur anywhere other than on the M1 mac.
And I've not investigated this in detail yet as I thought it could be a UnityEditor issue.
Does this problem occur when running the built (standalone) app?

RAM is skyrocketing and macOS seems to be killing app on RAM limit.

If macOS killed the process, I think UnityEditor will not freeze but die silently.

@homuler homuler added the host:macos Issue that occurs when host OS is macOS label Mar 24, 2022
@homuler
Copy link
Owner

homuler commented Mar 24, 2022

maybe same as #392

@gkiernozek
Copy link
Contributor Author

Does this problem occur when running the built (standalone) app?

Unfortunately yes. I even disabled annotations and it still uses memory up to freeze point.

@Magistrix93
Copy link

Same behaviour here, both editor and build

@homuler
Copy link
Owner

homuler commented Mar 26, 2022

As @merlin-rtzr has checked out (cf. #392 (comment)), Texture.GetNativeTexturePtr seems to block the main thread.

Now I think this issue is duplicated and close it.

@homuler homuler closed this as completed Mar 26, 2022
@homuler homuler added the duplicate This issue or pull request already exists label Mar 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists host:macos Issue that occurs when host OS is macOS type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants