Status Update
Comments
jl...@google.com <jl...@google.com> #2
Could you attach a video of this happening ?
rk...@google.com <rk...@google.com> #3
I'll try to get more details, but wanted to bring it up at least.
Please specify your OS, CPU, GPU, the emulator version, the system image you use and how your start the emulator (standalone or embedded into AS).
ok...@gmail.com <ok...@gmail.com> #4
I'm on Macbook Pro M2 Max, MacOS Sonoma 14.1.1, Android Studio Iguana 2023.2.1 Canary 14.
I opened the emulator through the Device Manager and use the floating window emulator (not docked).
Screen record attached. The easiest way to reproduce is by resizing or zooming in/out the emulator.
rk...@google.com <rk...@google.com> #5
Hi okynk91, thank you for screen recording, we will investigate. I see you run the emulator in the AS window. Could you please try running it in its own window (see the attached screenshot)?
ok...@gmail.com <ok...@gmail.com> #6
ch...@gmail.com <ch...@gmail.com> #7
Run emulator outside AS(standalone) work normally.
OS: Manjaro
Kernel: Linux 6.5.11-1-MANJARO
AS Version: Android Studio Canary 14
CPU: Ryzen 7 5800H
GPU: Vega 8 from my CPU and GTX 1650. I'm using Prime
Emulator version: 34.1.11
I already try disable my offboard graphics from bios but the bug persist independent of the GPU used.
My emulator device details:
Properties
avd.ini.displayname Pixel 3a API 31
avd.ini.encoding UTF-8
AvdId Pixel_3a_API_31
disk.dataPartition.size 6G
fastboot.chosenSnapshotFile
fastboot.forceChosenSnapshotBoot no
fastboot.forceColdBoot yes
fastboot.forceFastBoot no
hw.accelerometer yes
hw.arc false
hw.audioInput yes
hw.battery yes
hw.camera.back virtualscene
hw.camera.front emulated
hw.cpu.ncore 4
hw.device.hash2 MD5:0e6953ebf01bdc6b33a2f54746629c50
hw.device.manufacturer Google
hw.dPad no
hw.gps yes
hw.gpu.enabled yes
hw.gpu.mode auto
hw.initialOrientation Portrait
hw.keyboard yes
hw.lcd.density 440
hw.lcd.height 2220
hw.lcd.width 1080
hw.mainKeys no
hw.ramSize 2048
hw.sdCard yes
hw.sensors.orientation yes
hw.sensors.proximity yes
hw.trackBall no
image.androidVersion.api 31
image.sysdir.1 system-images/android-31/google_apis_playstore/x86_64/
PlayStore.enabled true
runtime.network.latency none
runtime.network.speed full
showDeviceFrame no
skin.dynamic yes
skin.path.backup /home/gabriel/Android/Sdk/skins/pixel_3a
tag.display Google Play
vm.heapSize 256
ja...@gmail.com <ja...@gmail.com> #8
I see only canary reports above. For me, this also happens in stable; Giraffe patch 4. Started after updating to latest emulator and it happens every 20-30 minutes or so. Restarting the emulator fixes it for a while. Will try running in its own window.
Android Studio Giraffe | 2022.3.1 Patch 4
Build #AI-223.8836.35.2231.11090377, built on November 13, 2023
Runtime version: 17.0.6+0-b2043.56-10027231 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11 10.0
GC: G1 Young Generation, G1 Old Generation
Memory: 12288M
Cores: 12
Registry:
ide.experimental.ui.inter.font=true
external.system.auto.import.disabled=true
debugger.new.tool.window.layout=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
ide.experimental.ui=true
Non-Bundled Plugins:
detekt (2.2.0)
manjaro.mpb (1.8)
com.intellij.lang.jsgraphql (4.0.1-222)
com.navigatetomodule (0.32)
com.developerphil.adbidea (1.6.12)
ch...@gmail.com <ch...@gmail.com> #9
ig...@gmail.com <ig...@gmail.com> #10
I'm having the same issue - everything works fine when the emulator is in it's own window. It seems that when in tool window, it just does not refresh the screen content - the system and apps work fine and when I use layout inspector on frozen emulator I can see the UI in real time when it's being inspected. The emulator also respons to touch events and other types of events normally, it just does not update UI.
Android Studio Iguana | 2023.2.1 Canary 15
Build #AI-232.10227.8.2321.11145877, built on November 27, 2023
Runtime version: 17.0.9+0-17.0.9b1000.46-11084592 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.1.1
GC: G1 Young Generation, G1 Old Generation
Memory: 8192M
Cores: 12
Metal Rendering is ON
Registry:
ide.experimental.ui=true
Non-Bundled Plugins:
com.github.mokkapps.codesnapintellijextension (1.0.4)
com.developerphil.adbidea (1.6.11)
com.github.dinbtechit.vscodetheme (1.10.7)
mobi.hsz.idea.gitignore (4.5.2)
rk...@google.com <rk...@google.com> #11
Hi folks, if UI freezes for you could you please put your emulator version here? You can find it in emulator's extended panel, Help > About. It should look like 34.1.12-11146273
.
ja...@gmail.com <ja...@gmail.com> #12
Mine is 34.1.11-11086671, freezing when docked inside Studio. I've been using it in a separate window since this issue and it hasn't frozen again. ("Frozen" as mentioned above: not updating until you manually switch between panels, then 1 new frame is shown).
ok...@gmail.com <ok...@gmail.com> #13
Same as #12, It's still freezing when docked inside the Studio, but working fine on its own window.
ch...@gmail.com <ch...@gmail.com> #14
ja...@google.com <ja...@google.com> #15
Looks like our gRPC endpoint is not responding to new screenshot events from the renderer, causing studio not to update it's ui. It doesn't appear to be happening on TOT (in canary).
ja...@google.com <ja...@google.com> #16
To be clear there are 2 possible causes we can investigate further:
- The emulator is producing frames, but Android Studio is not picking them up and displaying them.
- The emulator gRPC engine is not receiving frame events from the graphics engine, and therefor not producing frames.
Given that users report that the issue arose with a new emulator version, independently of studio, we should start with #2.
ja...@google.com <ja...@google.com> #17
Ok, might have a local repro:
<--snip-->
13:40:09.646634 140674645149376 DEBUG MultiDisplay.cpp:239 | getMultiDisplay 0 x 0 y 0 w 1080 h 2220 dpi 0 flag 0 enable 1
13:40:09.653825 140674645149376 DEBUG MultiDisplay.cpp:239 | getMultiDisplay 0 x 0 y 0 w 1080 h 2220 dpi 0 flag 0 enable 1
13:40:09.653869 140674645149376 DEBUG EmulatorService.cpp:1034 | Screenshot 612x1258 (xAxis: -4.7500019073486328), pixels: 2309688 in 7197 us.
13:40:09.653900 140674636756672 DEBUG MultiDisplay.cpp:239 | getMultiDisplay 0 x 0 y 0 w 1080 h 2220 dpi 0 flag 0 enable 1
13:40:09.653979 140674636756672 DEBUG EmulatorService.cpp:1009 | Allocation of string object. 0 < 2302248
13:40:09.654023 140675121952448 DEBUG MultiDisplay.cpp:239 | getMultiDisplay 0 x 0 y 0 w 1080 h 2220 dpi 0 flag 0 enable 1
13:40:09.670349 140674636756672 DEBUG MultiDisplay.cpp:239 | getMultiDisplay 0 x 0 y 0 w 1080 h 2220 dpi 0 flag 0 enable 1
13:40:09.670385 140674636756672 DEBUG EmulatorService.cpp:1034 | Screenshot 611x1256 (xAxis: -4.7500019073486328), pixels: 2302248 in 12423 us.
13:40:09.670465 140675121952448 DEBUG MultiDisplay.cpp:239 | getMultiDisplay 0 x 0 y 0 w 1080 h 2220 dpi 0 flag 0 enable 1
13:41:37.682536 140674628363968 DEBUG MultiDisplay.cpp:239 | getMultiDisplay 0 x 0 y 0 w 1080 h 2220 dpi 0 flag 0 enable 1 (4585x)
13:41:37.682596 140674628363968 DEBUG LoggingInterceptor.cpp:84 | from: , start: 1701898897682243, rcvTime: 75, sndTime: 150, rcv: 24, snd: 24, rcv_cnt: 1, snd_cnt: 1, OK , /android.emulation.control.EmulatorController/getVmState() -> [state: RUNNING]
13:41:37.685011 140675121952448 DEBUG MultiDisplay.cpp:239 | getMultiDisplay 0 x 0 y 0 w 1080 h 2220 dpi 0 flag 0 enable 1
No new frames are being produced.. Let's see if we can attach a debugger.
ja...@google.com <ja...@google.com> #18
Surprise #1: Multiple threads are waiting to register itself with the graphics engine..
thread #130, name = 'grpcpp_sync_ser'
android::base::ConditionVariable::wait(this=0x000055b207cae5d0, userLock=0x000055b207cae578) at ConditionVariable.h:146:9
frame #5: 0x00007ff253c0157b libandroid-emu-metrics.so`android::base::MessageChannelBase::beforeWrite(this=0x000055b207cae558) at MessageChannel.cpp:52:19
frame #6: 0x000055b206d2e683 qemu-system-x86_64`android::base::CallbackRegistry::registerCallback(void (*)(void*), void*) [inlined] android::base::MessageChannel<android::base::CallbackRegistry::ForwarderMessage, 64ul>::send(this=<unavailable>, msg=<unavailable>) at MessageChannel.h:122:28
frame #7: 0x000055b206d2e67e qemu-system-x86_64`android::base::CallbackRegistry::registerCallback(this=<unavailable>, messageAvailable=<unavailable>, opaque=<unavailable>) at CallbackRegistry.cpp:53:15
frame #8: 0x000055b206e9734b qemu-system-x86_64`android::emulation::control::EmulatorControllerImpl::streamScreenshot(grpc::ServerContext*, android::emulation::control::ImageFormat const*, grpc::ServerWriter<android::emulation::control::Image>*) [inlined] std::__1::__unique_if<android::emulation::control::EventWaiter>::__unique_single std::__1::make_unique[abi:v170000]<android::emulation::control::EventWaiter, void (*)(void (*)(void*), void*), void (*)(void*)>(__args=<unavailable>, __args=<unavailable>) at unique_ptr.h:686:30
frame #9: 0x000055b206e97326 qemu-system-x86_64`android::emulation::control::EmulatorControllerImpl::streamScreenshot(this=0x000055b20d9e2000, context=0x000055b236aeec10, request=0x000055b239a84870, writer=0x00007ff166c1bd88) at EmulatorService.cpp:717:23
thread #131, name = 'grpcpp_sync_ser'
frame #0: 0x00007ff251ca3156 libc.so.6`__futex_abstimed_wait_common at futex-internal.c:57:12
frame #1: 0x00007ff251ca3118 libc.so.6`__futex_abstimed_wait_common(futex_word=0x000055b207cae5f8, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:87:9
frame #2: 0x00007ff251ca5818 libc.so.6`___pthread_cond_wait at pthread_cond_wait.c:503:10
frame #3: 0x00007ff251ca5740 libc.so.6`___pthread_cond_wait(cond=0x000055b207cae5d0, mutex=0x000055b207cae578) at pthread_cond_wait.c:618:10
frame #4: 0x00007ff253c0158b libandroid-emu-metrics.so`android::base::MessageChannelBase::beforeWrite() [inlined] android::base::ConditionVariable::wait(this=0x000055b207cae5d0, userLock=0x000055b207cae578) at ConditionVariable.h:146:9
frame #5: 0x00007ff253c0157b libandroid-emu-metrics.so`android::base::MessageChannelBase::beforeWrite(this=0x000055b207cae558) at MessageChannel.cpp:52:19
frame #6: 0x000055b206d2e683 qemu-system-x86_64`android::base::CallbackRegistry::registerCallback(void (*)(void*), void*) [inlined] android::base::MessageChannel<android::base::CallbackRegistry::ForwarderMessage, 64ul>::send(this=<unavailable>, msg=<unavailable>) at MessageChannel.h:122:28
frame #7: 0x000055b206d2e67e qemu-system-x86_64`android::base::CallbackRegistry::registerCallback(this=<unavailable>, messageAvailable=<unavailable>, opaque=<unavailable>) at CallbackRegistry.cpp:53:15
frame #8: 0x000055b206e9734b qemu-system-x86_64`android::emulation::control::EmulatorControllerImpl::streamScreenshot(grpc::ServerContext*, android::emulation::control::ImageFormat const*, grpc::ServerWriter<android::emulation::control::Image>*) [inlined] std::__1::__unique_if<android::emulation::control::EventWaiter>::__unique_single std::__1::make_unique[abi:v170000]<android::emulation::control::EventWaiter, void (*)(void (*)(void*), void*), void (*)(void*)>(__args=<unavailable>, __args=<unavailable>) at unique_ptr.h:686:30
frame #9: 0x000055b206e97326 qemu-system-x86_64`android::emulation::control::EmulatorControllerImpl::streamScreenshot(this=0x000055b20d9e2000, context=0x000055b236af2e10, request=0x000055b20c672870, writer=0x00007ff16d04fd88) at EmulatorService.cpp:717:23
thread #132, name = 'grpcpp_sync_ser'
frame #0: 0x00007ff251ca3156 libc.so.6`__futex_abstimed_wait_common at futex-internal.c:57:12
frame #1: 0x00007ff251ca3118 libc.so.6`__futex_abstimed_wait_common(futex_word=0x000055b207cae5f8, expected=0, clockid=<unavailable>, abstime=0x0000000000000000, private=<unavailable>, cancel=<unavailable>) at futex-internal.c:87:9
frame #2: 0x00007ff251ca5818 libc.so.6`___pthread_cond_wait at pthread_cond_wait.c:503:10
frame #3: 0x00007ff251ca5740 libc.so.6`___pthread_cond_wait(cond=0x000055b207cae5d0, mutex=0x000055b207cae578) at pthread_cond_wait.c:618:10
frame #4: 0x00007ff253c0158b libandroid-emu-metrics.so`android::base::MessageChannelBase::beforeWrite() [inlined] android::base::ConditionVariable::wait(this=0x000055b207cae5d0, userLock=0x000055b207cae578) at ConditionVariable.h:146:9
frame #5: 0x00007ff253c0157b libandroid-emu-metrics.so`android::base::MessageChannelBase::beforeWrite(this=0x000055b207cae558) at MessageChannel.cpp:52:19
frame #6: 0x000055b206d2e683 qemu-system-x86_64`android::base::CallbackRegistry::registerCallback(void (*)(void*), void*) [inlined] android::base::MessageChannel<android::base::CallbackRegistry::ForwarderMessage, 64ul>::send(this=<unavailable>, msg=<unavailable>) at MessageChannel.h:122:28
frame #7: 0x000055b206d2e67e qemu-system-x86_64`android::base::CallbackRegistry::registerCallback(this=<unavailable>, messageAvailable=<unavailable>, opaque=<unavailable>) at CallbackRegistry.cpp:53:15
frame #8: 0x000055b206e9734b qemu-system-x86_64`android::emulation::control::EmulatorControllerImpl::streamScreenshot(grpc::ServerContext*, android::emulation::control::ImageFormat const*, grpc::ServerWriter<android::emulation::control::Image>*) [inlined] std::__1::__unique_if<android::emulation::control::EventWaiter>::__unique_single std::__1::make_unique[abi:v170000]<android::emulation::control::EventWaiter, void (*)(void (*)(void*), void*), void (*)(void*)>(__args=<unavailable>, __args=<unavailable>) at unique_ptr.h:686:30
frame #9: 0x000055b206e97326 qemu-system-x86_64`android::emulation::control::EmulatorControllerImpl::streamScreenshot(this=0x000055b20d9e2000, context=0x000055b236aec810, request=0x000055b2399e8870, writer=0x00007ff1813fbd88) at EmulatorService.cpp:717:23
ja...@google.com <ja...@google.com> #19
An unintentional side effect of the fix of
This is not the case for physical events. Things get unblocked as soon as a sensor state change happens.
bo...@mfour.com <bo...@mfour.com> #20
Just wanted to add I've been experiencing this as well on an M1 Mac. For me running the app in release mode works fine. If you build and run in Debug and have the debugger attached, then the frames are not updating.
However this only happens in Canary:
Android Studio Iguana | 2023.2.1 Canary 17
Build #AI-232.10227.8.2321.11191411, built on December 7, 2023
Runtime version: 17.0.9+0-17.0.9b1087.7-11185874 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.2
GC: G1 Young Generation, G1 Old Generation
Memory: 3072M
Cores: 10
Metal Rendering is ON
Registry:
debugger.new.tool.window.layout=true
ide.instant.shutdown=false
ide.experimental.ui=true
If I run the same exact emulator version 34.1.13-11169323
, in current Stable:
Android Studio Hedgehog | 2023.1.1
Build #AI-231.9392.1.2311.11076708, built on November 9, 2023
Runtime version: 17.0.7+0-17.0.7b1000.6-10550314 aarch64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 14.2
GC: G1 Young Generation, G1 Old Generation
Memory: 3072M
Cores: 10
Metal Rendering is ON
Registry:
external.system.auto.import.disabled=true
debugger.new.tool.window.layout=true
ide.text.editor.with.preview.show.floating.toolbar=false
ide.instant.shutdown=false
ide.experimental.ui=true
It does not have this issue.
Worth noting that the pop-out mode doesn't affect this.
co...@protonmail.com <co...@protonmail.com> #23
what version of emulator should this be in?
mi...@fresha.com <mi...@fresha.com> #24
la...@gmail.com <la...@gmail.com> #25
Still seeing this issue with 34.1.15-11228956 in AS Hedgehog 2023.1.1 patch 1
co...@protonmail.com <co...@protonmail.com> #26
FWIW Not seeing this issue anymore in latest canaries/beta.
ok...@gmail.com <ok...@gmail.com> #27
Android Studio Hedgehog | 2023.1.1 Patch 2
Build #AI-231.9392.1.2311.11330709, built on January 19, 2024
Emulator version : 34.1.13-11169323
el...@gmail.com <el...@gmail.com> #28
Android Studio Iguana | 2023.2.1 Beta 2
Build #AI-232.10227.8.2321.11280706, built on January 5, 2024
Android emulator version 34.1.15.0 (build_id 11228956) (CL:N/A)
ch...@gmail.com <ch...@gmail.com> #29
ch...@gmail.com <ch...@gmail.com> #30
ad...@gmail.com <ad...@gmail.com> #31
I'm having this issue still.
Android Studio Iguana | 2023.2.1 Build #AI-232.10227.8.2321.11479570, built on February 22, 2024 Runtime version: 17.0.9+0--11185874 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Windows 11.0
Android emulator version 34.1.18.0
al...@gmail.com <al...@gmail.com> #32
Android Studio Iguana | 2023.2.1
Build #AI-232.10227.8.2321.11479570, built on February 22, 2024
Runtime version: 17.0.9+0--11185874 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4086M
Cores: 12
Registry:
ide.experimental.ui=true
Non-Bundled Plugins:
Dart (232.10286)
com.bloc.intellij_generator_plugin (3.4.0)
io.flutter (78.0.2)
Emulator version: 34.1.18
CPU: Ryzen 5600
GPU: Radeon 6500XT
xa...@google.com <xa...@google.com> #33
This should be fixed in 34.1.19, please update and let us know.
so...@google.com <so...@google.com> #34
so...@google.com <so...@google.com> #35
Note
From now till end of Feb 2024, we are migrating to using a separate task item to track postmortem status, instead of using the original fixed bug. You may run into unexpected issues as we iron out the wrinkles in the automated workflow. Any questions or feedback, please email: android-hygiene-autobug-filer@.
Thank you for your patience and support.
Description
I'll try to get more details, but wanted to bring it up at least.