~eliasnaur/gio#154: 
Android problems: emulators are now x86; example has glitch

Hello.

The android sdk only emulates versions after 7 (nogaut) on x86, I assume the binaries generated are for arm because they crash on the emulator. Running on a real device works but the demo "kitchen" flashes the screen after every step of the "loading bar widget". After it "loads" the flashing stops but the entire UI is very laggy. Unfortunately I'm not yet experienced enough with go to pinpoint where to make the fixes.

Overall the project seems very cool, also great choice of hosting.

Bye.

Status
REPORTED
Submitter
~ceo_of_programming
Assigned to
No-one
Submitted
a month ago
Updated
a month ago
Labels
No labels applied.

~eliasnaur a month ago

On Sat Aug 8, 2020 at 02:07, ~ceo_of_programming wrote:

The android sdk only emulates versions after 7 (nogaut) on x86, I assume the binaries generated are for arm because they crash on the emulator.

gogio generates binaries for all supported architectures, and I use the Android emulator all the time without issue. Please provide details (android version, x86 or x86_64, Gio program) and more importantly, any crash notices from adb logcat.

Running on a real device works but the demo "kitchen" flashes the screen after every step of the "loading bar widget". After it "loads" the flashing stops but the entire UI is very laggy. Unfortunately I'm not yet experienced enough with go to pinpoint where to make the fixes.

That's unfortunate. Which device? Anything interesting in adb logcat? The flickering sounds similar to the ChromeOS issue fixed by https://gioui.org/commit/e381ff40d66b, but I assume you're using at least that version. I can't explain the lagginess.

Overall the project seems very cool, also great choice of hosting.

Thank you.

~ceo_of_programming a month ago

The emulator is Android 10; API 30; x86. The device is a Motorola Condor (Moto-e) with Android 7. Go version is 1.14.4 on Debian amd64.

On the emulator logs, I noticed complains about missing OpenGL support and "Unexpected CPU variant for X86 using defaults: x86". Note the capital "X". It also complained about missing instructions, probably because of the ISA mismatch:

Mismatch between dex2oat instruction set features to use (ISA: X86 Feature string: -ssse3,-sse4.1,-sse4.2,-avx,-avx2,-popcnt) and those from CPP defines (ISA: X86 Feature string: ssse3,-sse4.1,-sse4.2,-avx,-avx2,-popcnt) for the command line:

The SSE instruction family is used for vector processing, so I suspect that might be the reason why OpenGL is not working. The device version does not complain about OpenGL not working.

Logs attached. The emulator log is obnoxiously large, if your text editor can't open it, try emacs or 'cat log.txt | egrep "kitchen"'.

Sent with ProtonMail Secure Email.

‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐ On Sunday, August 9, 2020 4:24 PM, ~eliasnaur outgoing@sr.ht wrote:

On Sat Aug 8, 2020 at 02:07, ~ceo_of_programming wrote:

The android

sdk only emulates versions after 7 (nogaut) on x86, I assume the binaries generated are for arm because they crash on the emulator.

gogio generates binaries for all supported architectures, and I use the Android emulator all the time without issue. Please provide details (android version, x86 or x86_64, Gio program) and more importantly, any crash notices from adb logcat.

Running on a real device

works but the demo "kitchen" flashes the screen after every step of the "loading bar widget". After it "loads" the flashing stops but the entire UI is very laggy.

Unfortunately I'm not yet experienced enough with

go to pinpoint where to make the fixes.

That's unfortunate. Which device? Anything interesting in adb logcat? The flickering sounds similar to the ChromeOS issue fixed by

https://gioui.org/commit/e381ff40d66b, but I assume you're using at least that version. I can't explain the lagginess.

Overall the

project seems very cool, also great choice of hosting.

Thank you.


View on the web: https://todo.sr.ht/~eliasnaur/gio/154#comment-13422

~ceo_of_programming a month ago

It seems, that attached files are ignored? They are here: device log emulator log

I forgot to delete the previous message after clicking on reply.

~eliasnaur a month ago

On Tue Aug 25, 2020 at 14:43, ~ceo_of_programming wrote:

The emulator is Android 10; API 30; x86. The device is a Motorola Condor (Moto-e) with Android 7. Go version is 1.14.4 on Debian amd64.

On the emulator logs, I noticed complains about missing OpenGL support and "Unexpected CPU variant for X86 using defaults: x86". Note the capital "X". It also complained about missing instructions, probably because of the ISA mismatch:

Mismatch between dex2oat instruction set features to use (ISA: X86 Feature string: -ssse3,-sse4.1,-sse4.2,-avx,-avx2,-popcnt) and those from CPP defines (ISA: X86 Feature string: ssse3,-sse4.1,-sse4.2,-avx,-avx2,-popcnt) for the command line:

The SSE instruction family is used for vector processing, so I suspect that might be the reason why OpenGL is not working. The device version does not complain about OpenGL not working.

I don't think the device CPU and instruction set have any influence over OpenGL performance and features, since the GPU is a separate processor.

Logs attached. The emulator log is obnoxiously large, if your text editor can't open it, try emacs or 'cat log.txt | egrep "kitchen"'.

Thanks.

The important log message for the emulator is

org.gioui.kitchen: no support for OpenGL ES 3 nor EXT_sRGB

which indicates that your emulator for some reason haven't enabled OpenGL ES 3. The emulator does support ES 3, so you probably need to tweak a configuration somewhere. I found

https://stackoverflow.com/questions/24874066/does-the-android-emulator-support-opengl-es-3-0


I didn't find interesting log entries for the Moto E glitchy graphics, but given the GPU chip (Adreno 302) was announced in 2013 I'm not surprised graphics rendering doesn't work well. FWIW, Viktor Ogeman and myself are working towards a replacement renderer based on GPU compute which will be able to run on the CPU, side-stepping (buggy/slow) GPUs.

Elias

~whereswaldon a month ago

Not sure if this is new information or not, but there is a setting in the emulator GUI for the OpenGL version. I included instructions on changing that towards the end of this blog post about installing the android toolchain.

Register here or Log in to comment, or comment via email.