juicycleff / flutter-unity-view-widget

Embeddable unity game engine view for Flutter. Advance demo here https://github.com/juicycleff/flutter-unity-arkit-demo
BSD 3-Clause "New" or "Revised" License
2.15k stars 526 forks source link

Request for more information on known issue: Unity freezes and crashes on Android #818

Open k0uhe1D opened 1 year ago

k0uhe1D commented 1 year ago

Hello! I came across the known issue mentioned in the repository: "Unity freezes and crashes on Android, please use OpenGL3 as Graphics API." I am interested in learning more about this issue and would greatly appreciate any additional information or context that you can provide. Could you please elaborate on the following points:

  1. Are there any particular Android devices or Unity versions that are more prone to encountering this issue?
  2. What is the root cause of this issue, and why does using OpenGL3 as the Graphics API serve as a workaround?
  3. Are there any plans to address this issue in future updates, or should developers continue to use OpenGL3 as the recommended Graphics API?

Thank you in advance for your assistance and any information you can provide. I appreciate your hard work on this open-source project and look forward to your response. Best regards,

timbotimbo commented 1 year ago

The known issues list is pretty old, I believe some are even from before Unity 2019.

People trying to use ARCore or ARFoundation will need OpenGLES 3, otherwise they get crashes or build errors.

So this might have been added just to prevent too many questions and issues related to AR.
The example Unity project has some AR packages installed, so the example does need it.

You might be fine with other settings if you're not using AR.
I can't help with production experience here as all my apps using this have had some kind of AR component.

k0uhe1D commented 1 year ago

Hello, thank you for the information! I was able to reproduce the issue in my test project and would like to share my findings. I will continue to investigate this issue and work towards a resolution. If you have any additional information, please let me know.

Environment

Crash conditions

  With VULKAN Without VULKAN (OpenGLES3)
Google pixel 3 Launches Launches
Google pixel 6a Crashes Launches
Galaxy A20 SC-02M Crashes Launches but doesn't function (spec-related issue?)

//TODO: Add a crash log

Upon examining the crash logs in logcat, it appears that an issue with memory occurs during VULKAN initialization, resulting in an out-of-memory crash. As a Unity mobile engineer, my knowledge of native development is limited, and I am unsure if I can resolve this issue. However, I will continue to work on this problem and seek advice from our experienced graphics engineers in-house.

スクリーンショット 2023-05-30 10 39 01

clash

RoyalCoder88 commented 1 year ago

Amazing work @k0uhe1D please let as know if you find a solution. Thanks!