Skip to content

Black screen on Android Emulator #13029

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
itsJoKr opened this issue Nov 15, 2017 · 11 comments
Closed

Black screen on Android Emulator #13029

itsJoKr opened this issue Nov 15, 2017 · 11 comments
Labels
dependency: skia Skia team may need to help us

Comments

@itsJoKr
Copy link

itsJoKr commented Nov 15, 2017

Steps to Reproduce

Freshly installed Android Studio. I tried to run my app on Android emulator but my app fails to render and I get a black screen. When I connect my real device, everything works fine. iOS simulator also works fine. Also, the default "new project" flutter app works fine on Android emulator! Tested on Android O and M emulators.

When the app is opening, I get this black box on the bottom-left corner for half a second and after that, the whole screen goes black. If I keep clicking on the screen, it often keeps flashing again with this same black box.

screen shot 2017-11-15 at 17 30 30

Logs

There are no any errors in flutter run logs. But when the screen is flashing I get this log, not sure if helpful: D/skia ( 4813): OpList failed to instantiate.

Here are the verbose logs: https://hastebin.com/ehojeqitil.sql

Flutter Doctor

[✓] Flutter (on Mac OS X 10.12.6 16G1036, locale en-US, channel alpha)
• Flutter at /Users/jokr/Documents/flutter/flutter
• Framework revision e8aa40e (4 weeks ago), 2017-10-17 15:42:40 -0700
• Engine revision 7c41428
• Tools Dart version 1.25.0-dev.11.0

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.1)
• Android SDK at /Users/jokr/Library/Android/sdk
• Platform android-27, build-tools 27.0.1
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] iOS toolchain - develop for iOS devices (Xcode 9.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.1, Build version 9B55
• ios-deploy 1.9.2
• CocoaPods version 1.3.1

[✓] Android Studio (version 3.0)
• Android Studio at /Applications/Android Studio.app/Contents
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b08)

[✓] IntelliJ IDEA Community Edition (version 2017.2.5)
• Flutter plugin version 19.0
• Dart plugin version 172.4343.25

[✓] Connected devices
• Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 6.0 (API 23) (emulator)
• iPhone 7 • A4A35184-4527-499F-B58A-66D0EF65A193 • ios • iOS 11.1 (simulator)
• iPhone X • E39C9791-6662-43FE-B77F-4DFACEECBEE3 • ios • iOS 11.1 (simulator)

EDIT: Here's the repo if anyone is interested: https://github.com/itsJoKr/iOS4Android

@itsJoKr
Copy link
Author

itsJoKr commented Nov 15, 2017

Fixed by adding --enable-software-rendering. Found here: #12428

@itsJoKr itsJoKr closed this as completed Nov 15, 2017
@eseidelGoogle
Copy link
Contributor

Using --enable-software-rendering should not be required.

We've had many reports like this. e.g. #11947 #11484 #10617

@741g from the android emulator team was able to help us with a previous time this occurred. I thought we had fixed all these, but presumably not.

I'm not sure how we should be debugging these in the wild?

@eseidelGoogle eseidelGoogle reopened this Nov 15, 2017
@741g
Copy link

741g commented Nov 15, 2017

This could be a new, different breakage. It doesn't look like a black screen error, rather something else is going wrong. I'll look into it.

@eseidelGoogle
Copy link
Contributor

The "OpList fails to instantiate" error could just be a Skia regression? See also #12980 and #13018 which mention that error. FYI @chinmaygarde

@eseidelGoogle eseidelGoogle added the dependency: skia Skia team may need to help us label Nov 15, 2017
@itsJoKr
Copy link
Author

itsJoKr commented Nov 15, 2017

Just to add. Usually, these three lines will be logged many times, especially when I try clicking and then screen starts to flash.

[ ] D/EGL_emulation( 4325): eglMakeCurrent: 0xa1299b00: ver 2 0 (tinfo 0xad08b000)
[ ] D/skia ( 4325): OpList failed to instantiate.
[ +15 ms] I/chatty ( 4325): uid=10083(u0_a83) gpu_thread identical 2 lines

@741g
Copy link

741g commented Nov 15, 2017

The eglMakeCurrent ver there gives us a clue as to which GLES version is used on the emulator; it's not indicative of an error in the emulator driver.

OpList failed to instantiate, however, could be.

@brianosman
Copy link

Wondering if this was before/after flutter/engine@e03cab3 was landed in the engine?

@eseidelGoogle
Copy link
Contributor

The flutter doctor output in the original report shows using an flutter/engine which is about a month old. flutter/engine@7c4142808c

@itsJoKr
Copy link
Author

itsJoKr commented Nov 17, 2017

@brianosman @eseidel

I've switched the channel to master and upgraded flutter. I don't see black screen issue anymore on the same project.

@eseidelGoogle
Copy link
Contributor

Fantastic!

@github-actions
Copy link

github-actions bot commented Sep 4, 2021

This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
dependency: skia Skia team may need to help us
Projects
None yet
Development

No branches or pull requests

4 participants