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

Android Emulator on Mac M1 break fps #68438

Open
kyoz opened this issue Nov 9, 2022 · 2 comments
Open

Android Emulator on Mac M1 break fps #68438

kyoz opened this issue Nov 9, 2022 · 2 comments

Comments

@kyoz
Copy link

kyoz commented Nov 9, 2022

Godot version

3.5.1

System information

Mac mini M1 (Monterey 12.6), GLES2

Issue description

When trying to test Godot 3.5.1 for my new project, I do found some bug (This is not really Godot bug, maybe of Android Studio on Silicon Macs).

This is not happen on real devices (I'v test on a few real device and it not happen, just on Emulator)

I don't have any Window PC so doesn't know if it occurs on em too, it's great if someone can help to test.

The issues:

When running on Simulator with Android 10+ (SDK >=20), thing work normally:

normal.mov

But if we're running on Simulator with Android 9 and below, this happen:

break.mov

Logcat:

2022-11-09 13:08:11.992 16326-16352/org.godotengine.androidemulatormacm1issue E/godot: WARNING: Final value of `time_accum` is larger than `p_frame_slice`. It should always be between 0 and `p_frame_slice`. This hints at an engine bug.
2022-11-09 13:08:11.992 16326-16352/org.godotengine.androidemulatormacm1issue E/godot:    at: advance_checked (main/main_timer_sync.cpp:467) - Final value of `time_accum` is larger than `p_frame_slice`. It should always be between 0 and `p_frame_slice`. This hints at an engine bug.

I do test a fews game on store which make with Godot and they still have this problem (remember that it only occurs on Emulator). You can create an Emulator with Google Play Service to download Godot games and test too.

Steps to reproduce

Run the reproduction project on:

  • Android Simulator (with SDK >= 29: Android 10 and above) -> Run normally
  • Android Simulator (with SDK <29: Android 9 and below) -> This happen

Minimal reproduction project

AndroidEmulatorMacM1Issue.zip

@lawnjelly
Copy link
Member

Just to note that aside from the Godot side (e.g. bug in jitter fix, try setting it to 0.0), there's a lot of hardware / emulator issues that can cause duff timing information.

Particularly if the MONOTONIC clock is running backwards, or if the mutexes aren't working correctly in our timing calls. For the unsigned math, if the MONOTONIC clock is running backwards, you get very high values for the delta and everything can break.

See #31863 and #31900 for more investigation into this and links. I'm not an expert in hardware timers, but from what I could gather I put the current issues down to hardware / OS bugs. Thankfully these seem to be rare, and as such we didn't merge any workarounds.

@kyoz
Copy link
Author

kyoz commented Nov 9, 2022

Thanks @lawnjelly for the information, I've tested again with jitter fix setting, but it's still the same, I'm not sure but I think the problem come from Android Studio Emulators (On Mac M1). I'll borrow a window laptop and testing to see if it happen on Window or not.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants