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

Servo still does not start on Android #6047

Closed
mmatyas opened this issue May 14, 2015 · 5 comments
Closed

Servo still does not start on Android #6047

mmatyas opened this issue May 14, 2015 · 5 comments
Labels

Comments

@mmatyas
Copy link
Contributor

@mmatyas mmatyas commented May 14, 2015

While it seems #6002 fixed an issue, I'm still having problems launching Servo - both on emulated and real devices.
I'm trying to run Servo on an Arndale Octa development board, which uses Android 4.2.2, but I get the following error:

D/AndroidRuntime( 4080): 
D/AndroidRuntime( 4080): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime( 4080): CheckJNI is ON
D/dalvikvm( 4080): Trying to load lib libjavacore.so 0x0
D/dalvikvm( 4080): Added shared lib libjavacore.so 0x0
D/dalvikvm( 4080): Trying to load lib libnativehelper.so 0x0
D/dalvikvm( 4080): Added shared lib libnativehelper.so 0x0
I/ethernet( 4080): Loading ethernet jni class
D/AndroidRuntime( 4080): Calling main entry com.android.commands.am.Am
D/dalvikvm( 4080): Note: class Landroid/app/ActivityManagerNative; has 157 unimplemented (abstract) methods
I/ActivityManager( 2095): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.native_activity/rust.glutin.MainActivity} from pid 4080
D/AndroidRuntime( 4080): Shutting down VM
D/dalvikvm( 4080): GC_CONCURRENT freed 92K, 17% free 492K/588K, paused 0ms+0ms, total 1ms
I/ActivityManager( 2095): Start proc com.example.native_activity for activity com.example.native_activity/rust.glutin.MainActivity: pid=4090 uid=10044 gids={50044, 3003, 1028, 1015}
D/dalvikvm( 4090): Not late-enabling CheckJNI (already on)
I/dalvikvm( 4090): Turning on JNI app bug workarounds for target SDK version 9...
W/dalvikvm( 4090): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lrust/glutin/MainActivity;
W/dalvikvm( 4090): Class init failed in newInstance call (Lrust/glutin/MainActivity;)
D/AndroidRuntime( 4090): Shutting down VM
W/dalvikvm( 4090): threadid=1: thread exiting with uncaught exception (group=0x412db930)
E/AndroidRuntime( 4090): FATAL EXCEPTION: main
E/AndroidRuntime( 4090): java.lang.ExceptionInInitializerError
E/AndroidRuntime( 4090):    at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime( 4090):    at java.lang.Class.newInstance(Class.java:1319)
E/AndroidRuntime( 4090):    at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
E/AndroidRuntime( 4090):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
E/AndroidRuntime( 4090):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
E/AndroidRuntime( 4090):    at android.app.ActivityThread.access$600(ActivityThread.java:141)
E/AndroidRuntime( 4090):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
E/AndroidRuntime( 4090):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime( 4090):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime( 4090):    at android.app.ActivityThread.main(ActivityThread.java:5041)
E/AndroidRuntime( 4090):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime( 4090):    at java.lang.reflect.Method.invoke(Method.java:511)
E/AndroidRuntime( 4090):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
E/AndroidRuntime( 4090):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
E/AndroidRuntime( 4090):    at dalvik.system.NativeStart.main(Native Method)
E/AndroidRuntime( 4090): Caused by: java.lang.UnsatisfiedLinkError: Couldn't load mozjs.so from loader dalvik.system.PathClassLoader[dexPath=/data/app/com.example.native_activity-1.apk,libraryPath=/data/app-lib/com.example.native_activity-1]: findLibrary returned null
E/AndroidRuntime( 4090):    at java.lang.Runtime.loadLibrary(Runtime.java:365)
E/AndroidRuntime( 4090):    at java.lang.System.loadLibrary(System.java:535)
E/AndroidRuntime( 4090):    at rust.glutin.MainActivity.<clinit>(MainActivity.java:5)
E/AndroidRuntime( 4090):    ... 15 more
W/ActivityManager( 2095):   Force finishing activity com.example.native_activity/rust.glutin.MainActivity
D/dalvikvm( 2095): GC_CONCURRENT freed 1036K, 22% free 6279K/8016K, paused 1ms+2ms, total 24ms
D/dalvikvm( 2095): WAIT_FOR_CONCURRENT_GC blocked 13ms
W/ActivityManager( 2095): Activity pause timeout for ActivityRecord{41897070 u0 com.example.native_activity/rust.glutin.MainActivity}
D/mali_winsys( 2311): new_window_surface returns 0x3000

Unlike #6002, the libmozjs.so has the correct filename, and is in the apk file. The glutin update there didn't seem to fix the issue for me. I've also tried to run Servo on an emulated Nexus 7, based on the wiki, but got a similar error:

D/AndroidRuntime(  888): 
D/AndroidRuntime(  888): >>>>>> AndroidRuntime START com.android.internal.os.RuntimeInit <<<<<<
D/AndroidRuntime(  888): CheckJNI is ON
D/dalvikvm(  888): Trying to load lib libjavacore.so 0x0
D/dalvikvm(  888): Added shared lib libjavacore.so 0x0
D/dalvikvm(  888): Trying to load lib libnativehelper.so 0x0
D/dalvikvm(  888): Added shared lib libnativehelper.so 0x0
E/cutils-trace(  888): Error opening trace file: No such file or directory (2)
D/AndroidRuntime(  888): Calling main entry com.android.commands.am.Am
D/dalvikvm(  888): Note: class Landroid/app/ActivityManagerNative; has 163 unimplemented (abstract) methods
I/ActivityManager(  277): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10000000 cmp=com.example.native_activity/rust.glutin.MainActivity} from pid 888
D/dalvikvm(  277): GC_CONCURRENT freed 103K, 25% free 9320K/12372K, paused 6ms+10ms, total 141ms
D/dalvikvm(  277): WAIT_FOR_CONCURRENT_GC blocked 107ms
I/dalvikvm-heap(  277): Grow heap (frag case) to 9.798MB for 566416-byte allocation
D/dalvikvm(  277): GC_FOR_ALLOC freed 42K, 24% free 9831K/12928K, paused 171ms, total 171ms
I/WindowManager(  277): Screenshot Window{41917b20 u0 com.android.launcher/com.android.launcher2.Launcher} was all black! mSurfaceLayer=21005 minLayer=21000 maxLayer=21005
D/dalvikvm(  277): GC_FOR_ALLOC freed 1107K, 33% free 8725K/12928K, paused 74ms, total 74ms
W/dalvikvm(  898): PR_CAPBSET_DROP 0 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 1 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 2 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 3 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 4 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 5 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 6 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 7 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
D/AndroidRuntime(  888): Shutting down VM
W/dalvikvm(  898): PR_CAPBSET_DROP 8 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 9 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 10 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 11 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 12 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
D/dalvikvm(  888): GC_CONCURRENT freed 93K, 17% free 510K/608K, paused 1ms+0ms, total 9ms
W/dalvikvm(  898): PR_CAPBSET_DROP 13 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 14 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 15 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 16 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 17 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 18 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 19 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 20 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 21 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 22 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 23 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 24 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 25 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 26 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 27 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 28 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 29 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 30 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 31 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 32 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
W/dalvikvm(  898): PR_CAPBSET_DROP 33 failed: Invalid argument. Please make sure your kernel is compiled with file capabilities support enabled.
D/dalvikvm(  898): Not late-enabling CheckJNI (already on)
I/ActivityManager(  277): Start proc com.example.native_activity for activity com.example.native_activity/rust.glutin.MainActivity: pid=898 uid=10046 gids={50046, 3003, 1028, 1015}
I/dalvikvm(  898): Turning on JNI app bug workarounds for target SDK version 9...
W/dalvikvm(  898): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Lrust/glutin/MainActivity;
W/dalvikvm(  898): Class init failed in newInstance call (Lrust/glutin/MainActivity;)
D/AndroidRuntime(  898): Shutting down VM
W/dalvikvm(  898): threadid=1: thread exiting with uncaught exception (group=0x41465700)
E/AndroidRuntime(  898): FATAL EXCEPTION: main
E/AndroidRuntime(  898): java.lang.UnsatisfiedLinkError: Couldn't load mozjs.so from loader dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.native_activity-1.apk"],nativeLibraryDirectories=[/data/app-lib/com.example.native_activity-1, /system/lib]]]: findLibrary returned null
E/AndroidRuntime(  898):    at java.lang.Runtime.loadLibrary(Runtime.java:355)
E/AndroidRuntime(  898):    at java.lang.System.loadLibrary(System.java:525)
E/AndroidRuntime(  898):    at rust.glutin.MainActivity.<clinit>(MainActivity.java:5)
E/AndroidRuntime(  898):    at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(  898):    at java.lang.Class.newInstance(Class.java:1130)
E/AndroidRuntime(  898):    at android.app.Instrumentation.newActivity(Instrumentation.java:1061)
E/AndroidRuntime(  898):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2128)
E/AndroidRuntime(  898):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2261)
E/AndroidRuntime(  898):    at android.app.ActivityThread.access$600(ActivityThread.java:141)
E/AndroidRuntime(  898):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1256)
E/AndroidRuntime(  898):    at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(  898):    at android.os.Looper.loop(Looper.java:137)
E/AndroidRuntime(  898):    at android.app.ActivityThread.main(ActivityThread.java:5103)
E/AndroidRuntime(  898):    at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(  898):    at java.lang.reflect.Method.invoke(Method.java:525)
E/AndroidRuntime(  898):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
E/AndroidRuntime(  898):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
E/AndroidRuntime(  898):    at dalvik.system.NativeStart.main(Native Method)
W/ActivityManager(  277):   Force finishing activity com.example.native_activity/rust.glutin.MainActivity
D/dalvikvm(  277): GC_FOR_ALLOC freed 1134K, 33% free 8737K/12928K, paused 66ms, total 69ms
I/WindowManager(  277): Screenshot Window{41b9f9b8 u0 Starting com.example.native_activity} was all black! mSurfaceLayer=22010 minLayer=21000 maxLayer=22010
W/ActivityManager(  277): Activity pause timeout for ActivityRecord{41d929d8 u0 com.example.native_activity/rust.glutin.MainActivity}
W/EGL_emulation(  822): eglSurfaceAttrib not implemented

What could be the problem?

@jdm jdm added the P-android label May 14, 2015
@jdm
Copy link
Member

@jdm jdm commented May 14, 2015

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 14, 2015

At the very least, the submodule update was immediately (accidentally) reverted after it landed in #6054, so we're broken again for module loading.

That said, with the correct submodule, things do seem to load (and hit the grey screen) if I do a ./mach clean before my android build.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 15, 2015

@mmatyas does #6054 fix this loader issue?

Note that I would expect you to still be hitting the issues in #5795

@mmatyas
Copy link
Contributor Author

@mmatyas mmatyas commented May 15, 2015

Yes, #6054 did fix this problem, thanks. I'm now having a similar issue as in #5795, after showing the gray screen for a sec, Servo quits instantly.

@larsbergstrom
Copy link
Contributor

@larsbergstrom larsbergstrom commented May 15, 2015

@mmatyas Thanks for confirming! I'll close this issue now, and am working on #5795 presently.

@jdm jdm closed this May 15, 2015
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
3 participants
You can’t perform that action at this time.