Status Update
Comments
am...@google.com <am...@google.com>
ya...@google.com <ya...@google.com>
bo...@google.com <bo...@google.com> #2
Branch: androidx-master-dev
commit b90079595f33f58fece04026a97faa0d243acdb1
Author: Yuichi Araki <yaraki@google.com>
Date: Wed Sep 18 16:55:49 2019
Change the way to detect mismatch between POJO and query
This fixes cursor mismatch warnings with expandProjection.
Bug: 140759491
Test: QueryMethodProcessorTest
Change-Id: I7659002e5e0d1ef60fc1af2a625c0c36da0664d8
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
M room/compiler/src/test/kotlin/androidx/room/processor/QueryMethodProcessorTest.kt
M room/compiler/src/test/kotlin/androidx/room/testing/TestProcessor.kt
ws...@gmail.com <ws...@gmail.com> #3
bo...@google.com <bo...@google.com> #4
Branch: androidx-master-dev
commit bdde5a1a970ddc9007b28de4aa29d60ffa588f08
Author: Yigit Boyar <yboyar@google.com>
Date: Thu Apr 16 16:47:05 2020
Re-factor how errors are dismissed when query is re-written
This CL changes how we handle errors/warnings if query is
re-written.
There was a bug in expandProjection where we would report warnings
for things that Room already fixes automatically (
The solution to that problem (I7659002e5e0d1ef60fc1af2a625c0c36da0664d8)
solved it by deferring validating of columns until after re-write
decision is made. Unfortunately, this required changing PojoRowAdapter
to have a dummy mapping until it is validating, make it hard to use
as it does have a non-null mapping which is not useful.
This CL partially reverts that change and instead rely on the log
deferring logic we have in Context. This way, we don't need to break
the stability of PojoRowAdapter while still having the ability to
drop warnings that room fixes. This will also play nicer when we
have different query re-writing options that can use more information
about the query results.
Bug: 153387066
Bug: 140759491
Test: existing tests pass
Change-Id: I2ec967c763d33d7a3ff02c1a13c6953b460d1e5f
M room/compiler/src/main/kotlin/androidx/room/log/RLog.kt
M room/compiler/src/main/kotlin/androidx/room/processor/QueryMethodProcessor.kt
M room/compiler/src/main/kotlin/androidx/room/solver/TypeAdapterStore.kt
M room/compiler/src/main/kotlin/androidx/room/solver/query/result/PojoRowAdapter.kt
ws...@gmail.com <ws...@gmail.com> #5
ANDROID_AVD_HOME is something like /export/workspace/our-app/build/emulators/30-atd
emulator-avd.ini contains:
avd.ini.encoding=UTF-8
path.rel=.
path=/export/workspace/our-app/build/emulators/30-atd
target=android-30
It's a little unique in that we point ANDROID_AVD_HOME directly to the AVD dir, and put the .ini inside that dir (so it's a portable bundle), but it previously worked just fine this way.
ws...@gmail.com <ws...@gmail.com> #6
Also the samples above are using -verbose I believe, I can post more if you need it later.
bo...@google.com <bo...@google.com> #7
/export/workspace/our-app/build/emulators/30-atd/emulator-avd/confing.ini ?
bo...@google.com <bo...@google.com> #8
with 31.2.10
emulator -avd emulator-avd -verbose
and post the full output here
do the same for 31.3.10
and post the full output here as well
ws...@gmail.com <ws...@gmail.com> #9
$ pwd
/export/workspace/our-app/build/emulators/30-atd
$ ls -p
cache.img config.ini emulator-user.ini encryptionkey.img hardware-qemu.ini read-snapshot.txt sdcard.img.qcow2 system/ userdata-qemu.img.qcow2
cache.img.qcow2 emulator-avd.ini emu-launch-params.txt encryptionkey.img.qcow2 multiinstance.lock sdcard.img snapshots/ userdata-qemu.img version_num.cache
(yes, we have both config.ini
and emulator-avd.ini
in the same folder... ANDROID_AVD_HOME points directly to the AVD directory, /export/workspace/our-app/build/emulators/30-atd)
emulator-avd.ini
avd.ini.encoding=UTF-8
path.rel=.
path=/export/workspace/our-app/build/emulators/30-atd
target=android-30
config.ini
abi.type = x86
avd.ini.encoding = UTF-8
disk.dataPartition.size = 6442450944
hw.accelerometer = yes
hw.audioInput = yes
hw.battery = yes
hw.camera.back = none
hw.camera.front = none
hw.cpu.arch = x86
hw.cpu.ncore = 1
hw.dPad = no
hw.device.manufacturer = Google
hw.device.name = Nexus 5
hw.gps = yes
hw.gpu.enabled = no
hw.keyboard = yes
hw.lcd.backlight = no
hw.lcd.density = 160
hw.lcd.vsync = 488
hw.mainKeys = no
hw.ramSize = 2048
hw.sdCard = yes
hw.sensors.orientation = yes
hw.sensors.proximity = yes
hw.trackBall = no
image.sysdir.1 = /export/workspace/our-app/build/emulators/30-atd/system/x86
runtime.network.latency = none
runtime.network.speed = full
runtime.scalefactor = auto
sdcard.size = 128M
snapshot.present = no
tag.display = Default
tag.id = default
vm.heapSize = 512
Emulator 31.3.10:
$ ANDROID_SDK_ROOT=/android-emulator-sdk ANDROID_AVD_HOME="$(pwd)" /android-emulator-sdk/emulator/emulator -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
INFO | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
WARNING | Failed to process .ini file /home/coder/.android/./config.ini for reading.
WARNING | Found AVD target architecture: arm
INFO | Found AVD target architecture: arm
INFO | argv[0]: '/android-emulator-sdk/emulator/emulator'; program directory: '/android-emulator-sdk/emulator'
emulator: INFO: Use user provided system path ./system/x86
INFO | emuDirName: '/android-emulator-sdk/emulator'
emulator: INFO: Use user provided system path ./system/x86
INFO | Probing for ./system/x86/kernel-ranchu-64: file exists
INFO | try dir /android-emulator-sdk/emulator
INFO | Trying emulator path '/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless'
INFO | Found target-specific 64-bit emulator binary: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/gles_swiftshader'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/libstdc++'
VERBOSE | emulator: Running :/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless
VERBOSE | qemu backend: argv[00] = "/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless"
VERBOSE | qemu backend: argv[01] = "-avd"
VERBOSE | qemu backend: argv[02] = "emulator-avd"
VERBOSE | qemu backend: argv[03] = "-no-boot-anim"
VERBOSE | qemu backend: argv[04] = "-read-only"
VERBOSE | qemu backend: argv[05] = "-no-window"
VERBOSE | qemu backend: argv[06] = "-verbose"
VERBOSE | qemu backend: argv[07] = "-skin"
VERBOSE | qemu backend: argv[08] = "320x640"
VERBOSE | qemu backend: argv[09] = "-port"
VERBOSE | qemu backend: argv[10] = "5554"
VERBOSE | qemu backend: argv[11] = "-partition-size"
VERBOSE | qemu backend: argv[12] = "2048"
VERBOSE | qemu backend: argv[13] = "-memory"
VERBOSE | qemu backend: argv[14] = "1024"
VERBOSE | qemu backend: argv[15] = "-gpu"
VERBOSE | qemu backend: argv[16] = "swiftshader_indirect"
VERBOSE | qemu backend: argv[17] = "-sysdir"
VERBOSE | qemu backend: argv[18] = "./system/x86"
VERBOSE | qemu backend: argv[19] = "-system"
VERBOSE | qemu backend: argv[20] = "./system/x86/system.img"
VERBOSE | qemu backend: argv[21] = "-ramdisk"
VERBOSE | qemu backend: argv[22] = "./system/x86/ramdisk.img"
VERBOSE | qemu backend: argv[23] = "-qemu"
VERBOSE | qemu backend: argv[24] = "-enable-kvm"
VERBOSE | Concatenated backend parameters: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-aarch64-headless -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
INFO | Duplicate loglines will be removed, if you wish to see each indiviudal line launch with the -log-nofilter flag.
VERBOSE | autoconfig: -skindir (null)
ERROR | This AVD's configuration is missing a kernel file! Please ensure the file "kernel-ranchu" is in the same location as your system image.
ERROR | ANDROID_SDK_ROOT is defined (/android-emulator-sdk) but cannot find kernel file in /android-emulator-sdk/system-images/ sub directories
Emulator 31.2.10:
$ ANDROID_SDK_ROOT=/android-emulator-sdk ANDROID_AVD_HOME="$(pwd)" /android-emulator-sdk/emulator/emulator -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
INFO | Android emulator version 31.2.10.0 (build_id 8420304) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
INFO | Found AVD target architecture: x86
INFO | argv[0]: '/android-emulator-sdk/emulator/emulator'; program directory: '/android-emulator-sdk/emulator'
INFO | emuDirName: '/android-emulator-sdk/emulator'
INFO | Probing for ./system/x86/kernel-ranchu-64: file exists
INFO | try dir /android-emulator-sdk/emulator
INFO | Trying emulator path '/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless'
INFO | Found target-specific 64-bit emulator binary: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/gles_swiftshader'
INFO | Adding library search path: '/android-emulator-sdk/emulator/lib64/libstdc++'
VERBOSE | emulator: Running :/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless
VERBOSE | qemu backend: argv[00] = "/android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless"
VERBOSE | qemu backend: argv[01] = "-avd"
VERBOSE | qemu backend: argv[02] = "emulator-avd"
VERBOSE | qemu backend: argv[03] = "-no-boot-anim"
VERBOSE | qemu backend: argv[04] = "-read-only"
VERBOSE | qemu backend: argv[05] = "-no-window"
VERBOSE | qemu backend: argv[06] = "-verbose"
VERBOSE | qemu backend: argv[07] = "-skin"
VERBOSE | qemu backend: argv[08] = "320x640"
VERBOSE | qemu backend: argv[09] = "-port"
VERBOSE | qemu backend: argv[10] = "5554"
VERBOSE | qemu backend: argv[11] = "-partition-size"
VERBOSE | qemu backend: argv[12] = "2048"
VERBOSE | qemu backend: argv[13] = "-memory"
VERBOSE | qemu backend: argv[14] = "1024"
VERBOSE | qemu backend: argv[15] = "-gpu"
VERBOSE | qemu backend: argv[16] = "swiftshader_indirect"
VERBOSE | qemu backend: argv[17] = "-sysdir"
VERBOSE | qemu backend: argv[18] = "./system/x86"
VERBOSE | qemu backend: argv[19] = "-system"
VERBOSE | qemu backend: argv[20] = "./system/x86/system.img"
VERBOSE | qemu backend: argv[21] = "-ramdisk"
VERBOSE | qemu backend: argv[22] = "./system/x86/ramdisk.img"
VERBOSE | qemu backend: argv[23] = "-qemu"
VERBOSE | qemu backend: argv[24] = "-enable-kvm"
VERBOSE | Concatenated backend parameters: /android-emulator-sdk/emulator/qemu/linux-x86_64/qemu-system-x86_64-headless -avd emulator-avd -no-boot-anim -read-only -no-window -verbose -skin 320x640 -port 5554 -partition-size 2048 -memory 1024 -gpu swiftshader_indirect -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
VERBOSE | autoconfig: -skindir (null)
VERBOSE | autoconfig: -kernel ./system/x86/kernel-ranchu-64
VERBOSE | Target arch = 'x86'
VERBOSE | Auto-config: -qemu -cpu qemu32
VERBOSE | Auto-detect: Kernel image requires new device naming scheme.
VERBOSE | Auto-detect: Kernel does not support YAFFS2 partitions.
VERBOSE | Using initial system image: ./system/x86/system.img
VERBOSE | Using initial vendor image: ./system/x86/vendor.img
VERBOSE | autoconfig: -data /export/workspace/our-app/build/emulators/30-atd/userdata-qemu.img
VERBOSE | autoconfig: -initdata (null)
VERBOSE | autoconfig: -cache /export/workspace/our-app/build/emulators/30-atd/cache.img
VERBOSE | autoconfig: -sdcard /export/workspace/our-app/build/emulators/30-atd/sdcard.img
VERBOSE | Increasing RAM size to 2048MB
VERBOSE | System image is read only
...
<continues to boot from here, let me know if you need more...>
You can see the differences in the logs in the first few lines, so I'm not sure why all these verbose logs are necessary...
INFO | Android emulator version 31.3.10.0 (build_id 8807927) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
WARNING | Failed to process .ini file /home/coder/.android/./config.ini for reading.
WARNING | Found AVD target architecture: arm
vs
INFO | Android emulator version 31.2.10.0 (build_id 8420304) (CL:N/A)
INFO | Found AVD name 'emulator-avd'
INFO | Found AVD target architecture: x86
Not sure what's happening in 31.3.10 to pick up /home/coder/.android/./config.ini
. It seems like the path lookup from emulator-avd.ini
is broken.
bo...@google.com <bo...@google.com> #10
that is why it was trying (unsuccessfully) to read $HOME/.android/./config.ini
ws...@gmail.com <ws...@gmail.com> #11
ANDROID_HOME is set to the same thing as ANDROID_SDK_ROOT. Doesn't help.
bo...@google.com <bo...@google.com> #12
could you remove the path.rel=. and try again?
ws...@gmail.com <ws...@gmail.com> #13
Yes, that worked. Thanks! Any idea why this changed? This is still a bug, right?
bo...@google.com <bo...@google.com> #14
explanation:
emulator 31.2 takes absolute path first, and 31.3 take relative path first.
it turned out relative path code path ignores the ANDROID_AVD_HOME (both 31.2 and 31.3 ignore), and that only
works for default ANDROID_HOME setup (/home/user/.android)
will fix this
sorry for the inconvenience and thanks for reporting the bug to us.
ws...@gmail.com <ws...@gmail.com> #15
That makes sense. Thank you!
ws...@gmail.com <ws...@gmail.com> #17
Yes, this artifact works fine. Any idea when this could be released?
de...@google.com <de...@google.com> #19
to...@gmail.com <to...@gmail.com> #20
tonyvg2013@gmail.com
Tony if you want to contact me for some questions or related topic it would be great.
I have been a whitness for the activity of my friends and others over 35 individual cases of the same MO.
Description
We're running the
emulator
CLI, using the latestAPI 30 AOSP ATD x86
image, on an x86_64 host, like this:/android-emulator-sdk/emulator/emulator -avd emulator-avd -no-boot-anim -read-only -verbose -no-window -sysdir ./system/x86 -system ./system/x86/system.img -ramdisk ./system/x86/ramdisk.img -qemu -enable-kvm
On emulator 31.2.10:
and the emulator starts successfully.
On emulator 31.3.10:
Eventually failing with this:
(Note: we pass the
-sysdir
arg explicitly, since our system images are not stored in the SDK directory.)Found AVD target architecture: arm, thus trying to run qemu-system-aarch64-headless, seems likely to be the root cause?