Status Update
Comments
ad...@google.com <ad...@google.com>
ac...@google.com <ac...@google.com> #2
Debug console shows "E/emuglGLESv2_enc( 9261): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502"
I suspect it is emulator related.
rk...@google.com <rk...@google.com>
ya...@google.com <ya...@google.com> #3
Hi,
do we have more logs? do you see a shader compilation error / program link error in previous logs?
ju...@gmail.com <ju...@gmail.com> #4
ya...@google.com <ya...@google.com> #5
Carlos, would you check if you could repro the issue from our side and maybe send me a flutter apk? Thanks!
ya...@google.com <ya...@google.com> #6
The logcat has no gl error before the uniform error (E OpenGLRenderer: Unable to match the desired swap behavior.
is OK)
ca...@google.com <ca...@google.com> #7
Yes was able to repro this on my Linux machines. To repro I had to close the app in overview and re open it. It reopens fine on Mac Intel. I have the apk attached.
Emu : 35.1.13-11943732
API 34 build: [ro.vendor_dlkm.build.fingerprint]: [google/sdk_gphone64_x86_64/emu64xa:14/UE1A.230829.036.A2/11596452:user/release-keys]
ya...@google.com <ya...@google.com> #8
Thanks!
ya...@google.com <ya...@google.com> #9
Can reproduce on aosp master but it is flaky
ya...@google.com <ya...@google.com> #10
It works with -guest-angle
But -guest-angle is not the default mode and is unstable with API level 33 or lower, so it is still good to fix it.
ya...@google.com <ya...@google.com> #11
For users:
As a workaround, you may try to launch the emulator with the flag -guest-angle
, the full command would be:
/path/to/emulator -avd your_avd_name -guest-angle
Note that it only works with API level 34 or higher, and quickboot will be disabled in -guest-angle mode.
ju...@gmail.com <ju...@gmail.com> #12
Tested with emulator API 34 with flag -guest-angle , app no longer hangs on reopening.
In VsCode is possible to add this configuration in settings.json to launch emulator with flag.
Example:
"dart.flutterCustomEmulators": [
{
"id": "Pixel_4_API_34",
"name": "Pixel 4 API 34",
"executable": "/home/user/Android/Sdk/emulator/emulator",
"args": [
"-avd",
"Pixel_4_API_34",
"-guest-angle",
"-no-snapshot-load",
]
}
],
td...@gmail.com <td...@gmail.com> #13
Android Studio Koala | 2024.1.1
Build #AI-241.15989.150.2411.11948838, built on June 10, 2024
Runtime version: 17.0.10+0--11609105 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Windows 11.0
GC: G1 Young Generation, G1 Old Generation
Memory: 4072M
Cores: 20
Registry:
debugger.new.tool.window.layout=true
ide.experimental.ui=true
terminal.new.ui=true
Non-Bundled Plugins:
dev.j-a.swift (1.0.0.345-241)
Dart (241.17502)
io.flutter (80.0.2)
emulator-5554
emulator version 34.2.15-11906825
ma...@gmail.com <ma...@gmail.com> #14
various elements in the app are not displayed (not just when reopening app, at first run too) and there are lots of related error messages in the logcat
"E emuglGLESv2_enc: device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502"
Was tried to change various emulator settings related to graphics rendering without positive results, but
rolling back emulator version to 34.1.20 solved the issue
de...@gmail.com <de...@gmail.com> #15
Developers before me have clearly pointed out that the issue lies with the emulator, in-fact that version 34.1.20 doesn't have this issue and that having angle as renderer works for windows, which is not available for Linux.
Please fix the issue and improve the quality of development tools to save us from these frustrations.
zo...@gmail.com <zo...@gmail.com> #16
ya...@google.com <ya...@google.com> #17
Issue seems to have been fixed in latest canary 35.2.4.0 (build_id 12141100)
Carlos, would you help to verify if the issue still exists in latest canary and beta? Thanks
ca...@google.com <ca...@google.com> #18
Heya,
I tried emu 35.2.4-12141100 Canary and 35.1.18-12109991 Beta and couldn't get this issue to repro. The flutter app re opens with no issues. I was also using the latest API 34 rev 14 system image.
[ro.vendor_dlkm.build.fingerprint]: [google/sdk_gphone64_x86_64/emu64xa:14/UE1A.230829.036.A4/12096271:user/release-keys]
ya...@google.com <ya...@google.com> #19
Thanks Carlos.
For anyone who has this issue, please try to update the emulator to 35.1.18 or 35.2.4 or higher. To get them, you might need to use the preview version of Android Studio, or simply download the latest emulator from this web page:
de...@gmail.com <de...@gmail.com> #20
de...@gmail.com <de...@gmail.com> #21
de...@gmail.com <de...@gmail.com> #22
Turning off Vulkan using -feature -Vulkan
opens up 35.2.4 Canary in Linux and flutter app now opens up second time in the emulator.
I don't know whether vulkan support in Linux is a being separate tracked elsewhere, but at least this bug seems to have been fixed. Thank you.
ju...@gmail.com <ju...@gmail.com> #23
ya...@google.com <ya...@google.com> #24
we have an internal report that sometimes it picks up the wrong Vulkan on machines with multiple GPUs. If that is blocking your workflow please file a separate bug for it. Thanks
mi...@gmail.com <mi...@gmail.com> #25
This is still happening for me, no extra GPU just the AMD Ryzen™ 7 7730U APU.
34.2.16 emulator Arch Linux
ya...@google.com <ya...@google.com> #26
mi...@gmail.com <mi...@gmail.com> #27
Sorry for the confusion, yes it works with 35.1.18
Description
Android Studio Version: Unknown
Android Studio Jellyfish | 2023.3.1 Patch 1
Build #AI-233.14808.21.2331.11842104, built on May 14, 2024
Runtime version: 17.0.10+0-17.0.10b1087.21-11572160 amd64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
Linux 5.15.0-112-generic
GC: G1 Young Generation, G1 Old Generation
Memory: 3994M
Cores: 16
Registry:
ide.experimental.ui=true
Current Desktop: X-Cinnamon
Emulator Version (Emulator--> Extended Controls--> Emulator Version): 34.2.15-11906825
Hypervisor Version: KVM 12.0.0
Android SDK Tools: 26.1.1
Host Operating System: Linux Mint 21.3
CPU Manufacturer: Intel CPU
Virtualization is supported
Bare metal
64-bit CPU
RAM: 31959 MB
GPU:
Build Fingerprint: google/sdk_gphone64_x86_64/emu64xa:14/UE1A.230829.036.A2/11596452:user/dev-keys
AVD Details: Name: Pixel_4_API_34
CPU/ABI: x86_64
Path: /home/nevermore/.android/avd/Pixel_4_API_34.avd
Target: google_apis_playstore [Google Play] (API level 34)
Skin: 1080x2280
SD Card: 512M
AvdId: Pixel_4_API_34
PlayStore.enabled: true
avd.ini.displayname: Pixel 4 API 34
avd.ini.encoding: UTF-8
disk.dataPartition.size: 10G
fastboot.chosenSnapshotFile:
fastboot.forceChosenSnapshotBoot: no
fastboot.forceColdBoot: no
fastboot.forceFastBoot: yes
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.dPad: no
hw.device.hash2: MD5:6b5943207fe196d842659d2e43022e20
hw.device.manufacturer: Google
hw.gps: yes
hw.gpu.enabled: yes
hw.gpu.mode: host
hw.initialOrientation: portrait
hw.keyboard: yes
hw.lcd.density: 440
hw.lcd.height: 2280
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.sysdir.1: system-images/android-34/google_apis_playstore/x86_64/
runtime.network.latency: none
runtime.network.speed: full
showDeviceFrame: no
skin.dynamic: yes
skin.path.backup: /home/nevermore/Android/Sdk/skins/pixel_4
tag.display: Google Play
tag.displaynames: Google Play
tag.ids: google_apis_playstore
vm.heapSize: 256
Steps to Reproduce Bug:
Create and run a flutter app.
It runs ok.
Close app.
Run it again, app shows a blank screen.
Expected Behavior:
App should run normally.
Observed Behavior:
Debug console shows "E/emuglGLESv2_enc( 9261): device/generic/goldfish-opengl/system/GLESv2_enc/GL2Encoder.cpp:s_glGetUniformLocation:2206 GL error 0x502"
To run the app again is necessary to clear cache and free disk space on app settings.
This is happening in Linux, coworkers using Windows or Mac don't have this problem.