Status Update
Comments
ak...@google.com <ak...@google.com>
bo...@google.com <bo...@google.com> #2
This bug should go to the emulator team. However, I do not have permission to file bug against them yet.
ya...@google.com <ya...@google.com> #3
Thank you for reporting this. I think we have a bad race condition in RecurrentTask
. When a callback fires, the QEMUTimer
is empty (see cb(opaque)
is unlock):
/* remove timer from the list before calling the callback */
timer_list->active_timers = ts->next;
ts->next = NULL;
ts->expire_time = -1;
cb = ts->cb;
opaque = ts->opaque;
/* run the callback (the timer list can be modified) */
qemu_mutex_unlock(&timer_list->active_timers_lock);
cb(opaque);
qemu_mutex_lock(&timer_list->active_timers_lock);
and timer_del_locked
simply removes the QEMUTimer
instance from the active_timers
list. I am not sure how to avoid race conditions here. Consider this:
1: void myCallback(void* arg) {
2:
3: someCall();
4:
5: }
- The control enters into
myCallback
and the thread is preempted before the function had a chance making any side effect (line2
here). ˜RecurrentTask
is called on a separate thread.- Since
myCallback
did not write anywhere that it is busy˜RecurrentTask
proceeds destroying the statemyCallback
is about to access. myCallback
wakes and proceeds accessing already destroyed data.
Either I am missing something or this API is incomplete.
cl...@gmail.com <cl...@gmail.com> #4
ya...@google.com <ya...@google.com> #5
would you help to see if you could repro this issue? Please try to use an nVidia GeForce graphics card if possible.
ma...@trimble.com <ma...@trimble.com> #6
Found it occurs mostly when there is another OpenGL/3D app (Unity) running on the computer at the same time.
ya...@google.com <ya...@google.com> #7
ca...@google.com <ca...@google.com> #8
ca...@google.com <ca...@google.com> #10
ya...@google.com <ya...@google.com> #11
de...@google.com <de...@google.com>
de...@google.com <de...@google.com> #12
sa...@outlook.com <sa...@outlook.com> #13
I was also experiencing this issue on my Nvidia 1660 Super Graphics card, on the latest 32.1.12 stable.
I can confirm that using the 33.1.2 canary (I wasn't able to find the 33.1.3 canary publicly) appears to have fixed the issue.
li...@gmail.com <li...@gmail.com> #14
Same issue with flickering.
I am using Pixel_7_API_33 with AS Hedgehog Canary 3. 1650 discrete graphics with latest 531.79 drivers. The emulator version is 33.1.10-10078095.
Description
Android Studio Version: Unknown
Emulator Version (Emulator--> Extended Controls--> Emulator Version): 32.1.11-9536276
HAXM / KVM Version: WHPX 10.0.22623
Android SDK Tools: 26.1.1
Host Operating System: Windows 10 Home Single Language
CPU Manufacturer: AMD CPU
Inside a VM
64-bit CPU
RAM: 7599 MB
GPU: GPU #1
Make: 10de
Model: NVIDIA GeForce GTX 1650
Device ID: 1f99
Build Fingerprint:
AVD Details: Name: google_service
CPU/ABI: x86_64
Path: C:\Users\Aryan Bisht\.android\avd\google_service.avd
Target: google_apis_playstore [Google Play] (API level 30)
Skin: pixel_4
SD Card: 512M
AvdId: google_service
PlayStore.enabled: true
avd.ini.displayname: google service
avd.ini.encoding: UTF-8
disk.dataPartition.size: 6442450944
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: auto
hw.initialOrientation: Portrait
hw.keyboard: yes
hw.lcd.density: 440
hw.lcd.height: 2280
hw.lcd.width: 1080
hw.mainKeys: no
hw.ramSize: 1536
hw.sdCard: yes
hw.sensors.orientation: yes
hw.sensors.proximity: yes
hw.trackBall: no
image.sysdir.1: system-images\android-30\google_apis_playstore\x86_64\
runtime.network.latency: none
runtime.network.speed: full
showDeviceFrame: yes
skin.dynamic: yes
tag.display: Google Play
vm.heapSize: 228
Steps to Reproduce Bug:Screen is flickering.
Expected Behavior:
Observed Behavior: