Skip to content
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

Android: Gray screen and hang on startup #5795

Closed
mbrubeck opened this issue Apr 22, 2015 · 4 comments
Closed

Android: Gray screen and hang on startup #5795

mbrubeck opened this issue Apr 22, 2015 · 4 comments

Comments

@mbrubeck
Copy link
Contributor

@mbrubeck mbrubeck commented Apr 22, 2015

When starting Servo on Android, the app displays a gray screen, and then nothing happens. There's not much in the log after Glutin and Spidermonkey initialization. Tested on a Motorola Xoom running Cyanogenmod 10 (Android 4.1.2) and a Nexus 4 running Android 5.1.

I/ActivityManager(  288): Start proc com.example.native_activity for activity com.example.native_activity/rust.glutin.MainActivity: pid=17525 uid=10047 gids={3003, 1028, 1015}
I/dalvikvm(17525): Turning on JNI app bug workarounds for target SDK version 9...
E/Trace   (17525): error opening trace file: No such file or directory (2)
D/dalvikvm(17525): Trying to load lib /data/data/com.example.native_activity/lib/libmozjs.so 0x4148ad78
D/dalvikvm(17525): Added shared lib /data/data/com.example.native_activity/lib/libmozjs.so 0x4148ad78
D/dalvikvm(17525): No JNI_OnLoad found in /data/data/com.example.native_activity/lib/libmozjs.so 0x4148ad78, skipping init
V/threaded_app(17525): Creating: 0x5c0d20f8
V/threaded_app(17525): Config: mcc=0 mnc=0 lang=en cnt=US orien=2 touch=3 dens=160 keys=1 nav=1 keysHid=3 navHid=0 sdk=16 size=4 long=1 modetype=1 modenight=1
V/threaded_app(17525): Start: 0x5c0d20f8
D/RustAndroidGlueStdouterr(17525): Entering android_main
D/RustAndroidGlueStdouterr(17525): created application thread
V/threaded_app(17525): activityState=10
V/threaded_app(17525): Resume: 0x5c0d20f8
V/threaded_app(17525): activityState=11
V/threaded_app(17525): InputQueueCreated: 0x5c0d20f8 -- 0x5c32a008
V/threaded_app(17525): APP_CMD_INPUT_CHANGED
V/threaded_app(17525): Attaching input queue to looper
V/TabletStatusBar(  359): setLightsOn(true)
V/threaded_app(17525): NativeWindowCreated: 0x5c0d20f8 -- 0x5c865010
V/threaded_app(17525): APP_CMD_INIT_WINDOW
V/threaded_app(17525): WindowFocusChanged: 0x5c0d20f8 -- 1
D/libEGL  (17525): loaded /system/lib/egl/libEGL_tegra.so
I/ActivityManager(  288): Displayed com.example.native_activity/rust.glutin.MainActivity: +234ms
D/libEGL  (17525): loaded /system/lib/egl/libGLESv1_CM_tegra.so
D/libEGL  (17525): loaded /system/lib/egl/libGLESv2_tegra.so
D/RustAndroidGlueStdouterr(17525): eglGetDisplay succeeded
D/RustAndroidGlueStdouterr(17525): eglInitialize succeeded
D/RustAndroidGlueStdouterr(17525): eglChooseConfig succeeded
D/RustAndroidGlueStdouterr(17525): eglCreateContext succeeded
D/RustAndroidGlueStdouterr(17525): eglCreateWindowSurface succeeded
I/Gecko   (17525): Detected osrelease `2.6.39.4-cyanogenmod-g356e402'
I/Gecko   (17525): JITs are not broken
W/ActivityManager(  288): Activity destroy timeout for ActivityRecord{41c4a028 com.example.native_activity/rust.glutin.MainActivity}
@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented Apr 29, 2015

Confirmed I see the same bug on a Nexus 7.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 14, 2015

The less common current failure is just a flat-out crash:

I/DEBUG   (  181): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
I/DEBUG   (  181): Build fingerprint: 'google/razor/flo:5.0.2/LRX22G/1649326:user/release-keys'
I/DEBUG   (  181): Revision: '0'
I/DEBUG   (  181): ABI: 'arm'
I/DEBUG   (  181): pid: 21919, tid: 21946, name: native_activity  >>> com.example.native_activity <<<
I/DEBUG   (  181): signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8000
I/DEBUG   (  181):     r0 00000000  r1 00000008  r2 00000000  r3 00000000
I/DEBUG   (  181):     r4 00008000  r5 a06fe824  r6 b6d413fc  r7 b6d413ec
I/DEBUG   (  181):     r8 00000000  r9 9e7f78f4  sl 00000003  fp a06fea30
I/DEBUG   (  181):     ip 00000001  sp a06fe808  lr b6d39251  pc b6d39256  cpsr 600e0030
I/DEBUG   (  181): 
I/DEBUG   (  181): backtrace:
I/DEBUG   (  181):     #00 pc 00032256  /system/lib/libstlport.so (std::__node_alloc_impl::_M_allocate(unsigned int&)+45)
I/DEBUG   (  181):     #01 pc 000cf8e3  /system/vendor/lib/libsc-a3xx.so
I/DEBUG   (  181):     #02 pc 000e9275  /system/vendor/lib/libsc-a3xx.so
I/DEBUG   (  181):     #03 pc 000f9dcb  /system/vendor/lib/libsc-a3xx.so
I/DEBUG   (  181):     #04 pc 000fc6bf  /system/vendor/lib/libsc-a3xx.so
I/DEBUG   (  181):     #05 pc 00069007  /system/vendor/lib/egl/libGLESv2_adreno.so (core_glCompileShader+358)
I/DEBUG   (  181):     #06 pc 0004974f  /system/vendor/lib/egl/libGLESv2_adreno.so (glCompileShader+16)
I/DEBUG   (  181):     #07 pc 026b06bc  /data/app/com.example.native_activity-1/lib/arm/libmain.so (gl::compile_shader::h2bb1a923b76c72405ta+84)
I/DEBUG   (  181):     #08 pc 026b009c  /data/app/com.example.native_activity-1/lib/arm/libmain.so (rendergl::ShaderProgram::compile_shader::hfe5946f77d3cbf1enva+204)
I/DEBUG   (  181):     #09 pc 026afd64  /data/app/com.example.native_activity-1/lib/arm/libmain.so (rendergl::ShaderProgram::new::h91487f0a2ab862f7Lta+160)
I/DEBUG   (  181):     #10 pc 026b2ba4  /data/app/com.example.native_activity-1/lib/arm/libmain.so (rendergl::SolidColorProgram::new::hc883941173e1894d4Da+148)
I/DEBUG   (  181):     #11 pc 026b3980  /data/app/com.example.native_activity-1/lib/arm/libmain.so (rendergl::RenderContext::new::h9e6b4ce0021965a4QJa+124)
I/DEBUG   (  181):     #12 pc 004c8b78  /data/app/com.example.native_activity-1/lib/arm/libmain.so (compositor::IOCompositor$LT$Window$GT$::initialize_compositing::h11143369767854145729+244)
I/DEBUG   (  181):     #13 pc 004c847c  /data/app/com.example.native_activity-1/lib/arm/libmain.so (compositor::IOCompositor$LT$Window$GT$::handle_window_message::h18194913457055350073+236)
I/DEBUG   (  181):     #14 pc 004771ec  /data/app/com.example.native_activity-1/lib/arm/libmain.so (compositor::IOCompositor$LT$Window$GT$.CompositorEventListener::handle_event::h739637671296856865+1072)
I/DEBUG   (  181):     #15 pc 004d9c94  /data/app/com.example.native_activity-1/lib/arm/libmain.so (Browser::handle_event::h89c9e47bfed2a4cbCca+228)
I/DEBUG   (  181):     #16 pc 0038a934  /data/app/com.example.native_activity-1/lib/arm/libmain.so (main::h5f18756164f80a23raa+464)
I/DEBUG   (  181):     #17 pc 004d7b2c  /data/app/com.example.native_activity-1/lib/arm/libmain.so (__android_start::android_main::closure.13486+64)
I/DEBUG   (  181):     #18 pc 004d79d8  /data/app/com.example.native_activity-1/lib/arm/libmain.so (android_main2::closure.13477+292)
I/DEBUG   (  181):     #19 pc 004d7874  /data/app/com.example.native_activity-1/lib/arm/libmain.so (boxed::F.FnBox$LT$A$GT$::call_box::h11154253988679716870+120)
I/DEBUG   (  181):     #20 pc 004d72cc  /data/app/com.example.native_activity-1/lib/arm/libmain.so (boxed::Box$LT$FnBox$LT$A$C$$u20$Output$u20$$u3d$$u20$R$GT$$u2b$$u20$Send$u20$$u2b$$u20$$u27$a$GT$.FnOnce$LT$A$GT$::call_once::h11095449199872116170+128)
I/DEBUG   (  181):     #21 pc 004d681c  /data/app/com.example.native_activity-1/lib/arm/libmain.so (thread::Builder::spawn_inner::closure.13452+124)
I/DEBUG   (  181):     #22 pc 004d6794  /data/app/com.example.native_activity-1/lib/arm/libmain.so (rt::unwind::try::try_fn::__rust_abi::h17078149572272779310+108)
I/DEBUG   (  181):     #23 pc 004d671c  /data/app/com.example.native_activity-1/lib/arm/libmain.so (rt::unwind::try::try_fn::h17078149572272779310+76)
I/DEBUG   (  181):     #24 pc 02af5430  /data/app/com.example.native_activity-1/lib/arm/libmain.so (rust_try_inner+16)
I/DEBUG   (  181):     #25 pc 02af5408  /data/app/com.example.native_activity-1/lib/arm/libmain.so (rust_try+4)
I/DEBUG   (  181):     #26 pc 004d54f4  /data/app/com.example.native_activity-1/lib/arm/libmain.so (rt::unwind::try::h2897005623686082589+328)
I/DEBUG   (  181):     #27 pc 004d52ac  /data/app/com.example.native_activity-1/lib/arm/libmain.so (thread::Builder::spawn_inner::closure.13323+684)
I/DEBUG   (  181):     #28 pc 004d7674  /data/app/com.example.native_activity-1/lib/arm/libmain.so (boxed::F.FnBox$LT$A$GT$::call_box::h2575024283774147250+144)
I/DEBUG   (  181):     #29 pc 02aeceb4  /data/app/com.example.native_activity-1/lib/arm/libmain.so (sys::thread::Thread::new::thread_start::h5d04dfea54896f19O0u+40)
I/DEBUG   (  181):     #30 pc 000162e3  /system/lib/libc.so (__pthread_start(void*)+30)
I/DEBUG   (  181):     #31 pc 000142d3  /system/lib/libc.so (__start_thread+6)

cc @glennw in case he has some ideas off the top of his head.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 15, 2015

The most common one, which seems to result in a greyscreen if debugging is not enabled is this one:

D/RustAndroidGlueStdouterr(28214): Entering android_main
D/RustAndroidGlueStdouterr(28214): created application thread
V/threaded_app(28214): Start: 0xac47eac0
V/threaded_app(28214): activityState=10
V/threaded_app(28214): Resume: 0xac47eac0
V/threaded_app(28214): activityState=11
D/RustAndroidGlueStdouterr(28214): eglGetDisplay succeeded
I/Adreno-EGL(28214): <qeglDrvAPI_eglInitialize:410>: QUALCOMM Build: 10/28/14, c33033c, Ia6306ec328
I/ActivityManager(  564): Displayed com.example.native_activity/rust.glutin.MainActivity: +406ms
D/RustAndroidGlueStdouterr(28214): eglCreateContext succeeded
D/RustAndroidGlueStdouterr(28214): eglCreateWindowSurface succeeded
W/Adreno-ES20(28214): <process_gl_state_enables:519>: GL_INVALID_ENUM
I/Gecko   (28214): Detected osrelease `3.4.0-g154bef4'
I/Gecko   (28214): JITs are not broken
F/libc    (28214): Pure virtual function called. Are you calling virtual methods from a destructor?
F/libc    (28214): Fatal signal 6 (SIGABRT), code -6 in tid 28238 (native_activity)
W/InputDispatcher(  564): channel 'a68e7ab com.example.native_activity/rust.glutin.MainActivity (server)' ~ Consumer closed input channel or an error occurred.  events=0x9
E/InputDispatcher(  564): channel 'a68e7ab com.example.native_activity/rust.glutin.MainActivity (server)' ~ Channel is unrecoverably broken and will be disposed!
I/WindowState(  564): WIN DEATH: Window{a68e7ab u0 com.example.native_activity/rust.glutin.MainActivity}
W/InputDispatcher(  564): Attempted to unregister already unregistered input channel 'a68e7ab com.example.native_activity/rust.glutin.MainActivity (server)'
E/FrameworkListener(  180): read() failed (Connection reset by peer)
E/DEBUG   (27439): unexpected waitpid response: n=28238, status=00000100
E/        (27439): ptrace detach from 28238 failed: No such process
E/        (27439): debuggerd committing suicide to free the zombie!
I/        (28272): debuggerd: Dec 16 2014 22:14:31
I/Zygote  (  195): Process 28214 exited cleanly (1)
@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 18, 2015

Fixed in #6109!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.