Closed Bug 1157109 Opened 9 years ago Closed 9 years ago

[B2G][Emulator] ./run-emulator.sh (ICS) produces black screen

Categories

(Firefox OS Graveyard :: Emulator, defect)

ARM
Gonk (Firefox OS)
defect
Not set
normal

Tracking

(firefox45 fixed)

RESOLVED FIXED
Tracking Status
firefox45 --- fixed

People

(Reporter: jhao, Assigned: sotaro)

References

Details

Attachments

(4 files)

I just synced my code a couple of days ago.
I could build successfully, but when I ./run-emulator.sh, the screen was all black, though the marionette tests seemed to run as espected.
I was using Ubuntu 14.04.
Summary: [B2G][Emulator] ./run-emulator.sh produces black screen → [B2G][Emulator] ./run-emulator.sh (ICS) produces black screen in Ubuntu 14.04
Got the same error on a newly built Firefox OS emulator, too. I can log into the shell and get logcat but the emulator screeen is just totally black. The attached files above are from `adb logcat -d` and `adb shell dmesg`, respectively.
Did you check against [1]?

If you don't have a 32-bit stack installed on 64-bit systems, you might not have all the required library. Have you tried

  LD_DEBUG="all" ./run-emulator.sh

? This should print lots of information from the loader.

[1] https://developer.mozilla.org/en-US/docs/Mozilla/Firefox_OS/Using_the_B2G_emulators?redirectlocale=en-US&redirectslug=Firefox_OS%2FUsing_the_B2G_emulators
Thanks for the information. Sorry for not noticing the section `If the emulator starts but the screen is black before or after the "mozilla technology" splash screen`. I'll try the possible solutions listed there.
Hello @Zimmermann, I've tried your approach but `LD_DEBUG=all` gives thousands of messages and I'm not sure which lines are useful.

I've had a look at the the 'Black Screen' section, too. My display card is AMD Radeon HD 4250 and my Xorg is 1.17.2. AMD provides proprietary driver Catalyst, but it does not support the latest Xorg.

By the way, Android emulator from Android SDK runs OK.
I've been able to run the ICS emulator on Debian 8, which should be quite similar to Ubuntu 14.4.

Starting an emulator takes a while. Did you wait for a few minutes?
Attached file debian-packages.txt
If that helps, here's the list of packages I had to install on Debian 8 for building and running B2G.
Sorry I didn't mention that I'm using Arch Linux but not Ubuntu. Should I open a new bug report as I'm using a quite different system?

I've waited for more than one hour, and nothing appears.

By the way, I didn't find libz1gdev:i386 on my Ubuntu 15.04 VM.
Here's the corresponding packages on my Arch Linux box:

gcc-multilib    5.2.0-2
lib32-glibc     2.22-3
lib32-zlib      1.2.8-1
gcc-multilib    5.2.0-2
flex            2.5.39-1
autoconf2.13    2.13-3
gcc-multilib    5.2.0-2
ccache          3.2.3-1
zip             3.0-6
make-3.81       3.81-1
libxml2         2.9.2-2

yasm            1.3.0-1
bison           3.0.4-1
lib32-glibc     2.22-3

lib32-zlib      1.2.8-1
lib32-ncurses   6.0-2

lib32-libx11    1.6.3-1
?
lib32-mesa      10.6.7-1
lib32-mesa      10.6.7-1

I also use python2 2.7.10-2 and bash 4.3.042-3
Moving comments over from bug 1227490:

Hi Sotaro,

Bisecting returned patch [1] of bug 1152135 as the first broken commit. You fixed the original bug report. Can you take a look at this regression? The STR is

  - build ICS emulator
  - start it with './run-emulator.sh'
  - after ~2 minutes the Foxfood logo should show up in the emulator window
  - if you don't see anything after 5 minutes, you can count the revision as broken

[1] https://hg.mozilla.org/mozilla-central/rev/e3c19212d8d0
Flags: needinfo?(sotaro.ikeda.g)
Summary: [B2G][Emulator] ./run-emulator.sh (ICS) produces black screen in Ubuntu 14.04 → [B2G][Emulator] ./run-emulator.sh (ICS) produces black screen
OS: Linux → Gonk (Firefox OS)
Hardware: Unspecified → ARM
I take a look.
Assignee: nobody → sotaro.ikeda.g
Flags: needinfo?(sotaro.ikeda.g)
The patch address the problem for me.
Attachment #8691982 - Flags: review?(mwu)
During investigating, I found one thing. ICS emulator's gralloc does not permit both HW write flag and SW write flag.
 gralloc_alloc()
 http://androidxref.com/4.0.4/xref/development/tools/emulator/opengl/system/gralloc/gralloc.cpp#139

framebuffer's native window is created as hw write, therefore bootanimation's rendering does not work on ics emulator.
(In reply to Sotaro Ikeda [:sotaro] from comment #15)
> Created attachment 8691982 [details] [diff] [review]
> patch - Call eglSwapBuffers() when hwc does not exit
> 
> The patch address the problem for me.

Great! With the patch applied, the Foxfood logo shows up after ~3:30 minutes and the login screen after ~5:30 minutes.
Attachment #8691982 - Flags: review?(mwu) → review+
https://hg.mozilla.org/mozilla-central/rev/e2d0fd2b8d17
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: