Litho: Sample crashes on startup

Created on 19 Apr 2017  路  7Comments  路  Source: facebook/litho

Issues and Steps to Reproduce

Install and run sample on Nexus 6 with Android 5.0. The application crashes on startup.

04-19 13:11:26.200 893-2754/? I/ActivityManager: START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.facebook.samples.litho/.DemoListActivity bnds=[781,953][998,1170] (has extras)} from uid 10095 on display 0
04-19 13:11:26.286 893-1411/? I/ActivityManager: Start proc com.facebook.samples.litho for activity com.facebook.samples.litho/.DemoListActivity: pid=31261 uid=10106 gids={50106, 9997, 3003, 1028, 1015} abi=armeabi-v7a
04-19 13:11:26.293 31261-31261/? I/art: Late-enabling -Xcheck:jni
04-19 13:11:26.408 31261-31261/? V/fb-UnpackingSoSource: locked dso store /data/data/com.facebook.samples.litho/lib-main
04-19 13:11:26.409 31261-31261/? V/fb-UnpackingSoSource: deps mismatch on deps store: regenerating
04-19 13:11:26.409 31261-31261/? V/fb-UnpackingSoSource: so store dirty: regenerating
04-19 13:11:26.437 31261-31261/? D/ApkSoSource: not allowing consideration of lib/armeabi-v7a/libfb_jpegturbo.so: deferring to libdir
04-19 13:11:26.437 31261-31261/? D/ApkSoSource: not allowing consideration of lib/armeabi-v7a/libgnustl_shared.so: deferring to libdir
04-19 13:11:26.437 31261-31261/? D/ApkSoSource: not allowing consideration of lib/armeabi-v7a/libimagepipeline.so: deferring to libdir
04-19 13:11:26.437 31261-31261/? D/ApkSoSource: not allowing consideration of lib/armeabi-v7a/liblib_fb_fbjni.so: deferring to libdir
04-19 13:11:26.437 31261-31261/? D/ApkSoSource: not allowing consideration of lib/armeabi-v7a/libyoga.so: deferring to libdir
04-19 13:11:26.437 31261-31261/? D/ApkSoSource: not allowing consideration of lib/armeabi-v7a/libyogacore.so: deferring to libdir
04-19 13:11:26.438 31261-31261/? V/fb-UnpackingSoSource: regenerating DSO store com.facebook.soloader.ApkSoSource
04-19 13:11:26.439 31261-31261/? V/fb-UnpackingSoSource: starting syncer worker
04-19 13:11:26.447 31261-31261/? V/fb-UnpackingSoSource: releasing dso store lock for /data/data/com.facebook.samples.litho/lib-main (from syncer thread)
04-19 13:11:26.447 31261-31261/? V/fb-UnpackingSoSource: not releasing dso store lock for /data/data/com.facebook.samples.litho/lib-main (syncer thread started)
04-19 13:11:26.456 31261-31279/? I/stetho: Listening on @stetho_com.facebook.samples.litho_devtools_remote
04-19 13:11:26.485 31261-31261/? W/art: Before Android 4.1, method android.graphics.PorterDuffColorFilter android.support.graphics.drawable.VectorDrawableCompat.updateTintFilter(android.graphics.PorterDuffColorFilter, android.content.res.ColorStateList, android.graphics.PorterDuff$Mode) would have incorrectly overridden the package-private method in android.graphics.drawable.Drawable
04-19 13:11:26.674 31261-31281/? D/OpenGLRenderer: Render dirty regions requested: true
04-19 13:11:26.680 31261-31261/? D/Atlas: Validating map...
04-19 13:11:26.734 31261-31261/? E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
04-19 13:11:26.734 31261-31261/? E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
04-19 13:11:26.734 31261-31261/? E/libEGL: call to OpenGL ES API with no current context (logged once per thread)
04-19 13:11:26.735 31261-31261/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x0 in tid 31261 (k.samples.litho)
04-19 13:11:26.839 12429-12429/? I/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
04-19 13:11:26.839 12429-12429/? I/DEBUG: Build fingerprint: 'google/shamu/shamu:5.0/LRX21O/1570415:user/release-keys'
04-19 13:11:26.839 12429-12429/? I/DEBUG: Revision: '33696'
04-19 13:11:26.839 12429-12429/? I/DEBUG: ABI: 'arm'
04-19 13:11:26.840 12429-12429/? I/DEBUG: pid: 31261, tid: 31261, name: k.samples.litho  >>> com.facebook.samples.litho <<<
04-19 13:11:26.840 12429-12429/? I/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
04-19 13:11:26.851 12429-12429/? I/DEBUG:     r0 00000000  r1 00000020  r2 ffffffff  r3 b6fd432c
04-19 13:11:26.851 12429-12429/? I/DEBUG:     r4 00000000  r5 ab746794  r6 bebf0b24  r7 ab746780
04-19 13:11:26.851 12429-12429/? I/DEBUG:     r8 b678f628  r9 b6fd5df4  sl 00000055  fp 00000055
04-19 13:11:26.851 12429-12429/? I/DEBUG:     ip b6fd19b8  sp bebf0b18  lr b676782d  pc b6fb905c  cpsr 000f0030
04-19 13:11:26.851 12429-12429/? I/DEBUG: backtrace:
04-19 13:11:26.851 12429-12429/? I/DEBUG:     #00 pc 0005005c  /system/lib/libc.so (__strchr_chk+11)
04-19 13:11:26.851 12429-12429/? I/DEBUG:     #01 pc 00021829  /system/lib/libhwui.so (android::uirenderer::Extensions::findExtensions(char const*, android::SortedVector<android::String8>&) const+12)
04-19 13:11:26.851 12429-12429/? I/DEBUG:     #02 pc 000218a9  /system/lib/libhwui.so (android::uirenderer::Extensions::Extensions()+64)
04-19 13:11:26.851 12429-12429/? I/DEBUG:     #03 pc 00022463  /system/lib/libhwui.so
04-19 13:11:26.851 12429-12429/? I/DEBUG:     #04 pc 0001b1a3  /system/lib/libhwui.so (android::uirenderer::Caches::Caches()+50)
04-19 13:11:26.851 12429-12429/? I/DEBUG:     #05 pc 000189df  /system/lib/libhwui.so (android::Singleton<android::uirenderer::Caches>::getInstance()+34)
04-19 13:11:26.851 12429-12429/? I/DEBUG:     #06 pc 0001fc23  /system/lib/libhwui.so (android::uirenderer::DisplayListRenderer::DisplayListRenderer()+98)
04-19 13:11:26.851 12429-12429/? I/DEBUG:     #07 pc 0007a027  /system/lib/libandroid_runtime.so
04-19 13:11:26.851 12429-12429/? I/DEBUG:     #08 pc 00019f09  /data/dalvik-cache/arm/system@[email protected]

Expected Behavior

The application doesn't crash.

Link to Code

No special code is needed. Just ./gradlew :sample:installDebug on a cloned project.

Most helpful comment

Here's a tombstone log from this device.

All 7 comments

I just did a clone and install and it worked fine for me. Do you have logs that show the actual cause of the crash?

It works fine on some other devices but on this particular devices the sample crashes and it's 100% reproducible. Unfortunately, I have nothing except these logs in logcat. When I comment out setContentView() lines in DemoListActivity the sample launches successfully but displays nothing, obviously. I can provide you with more information if you tell me what exactly you want to check.

Looks like something goes wrong with the DisplayLists code. I wonder if there's a way for us to repro this with an emulator or if it's completely device-specific.

/cc @pasqualeanatriello

Here's a tombstone log from this device.

@passy you are right this is a problem with the DisplayLists code. The logs are saying that we try to create a DisplayList before having a valid GL context. I'll look into it.

This should be fixed as off 1bcbe2426d5a708bff7d0fe4bbd50801ec158275.

@passy Thank you, it works now.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ooga picture ooga  路  7Comments

ersin-ertan picture ersin-ertan  路  7Comments

Martin-Hogge picture Martin-Hogge  路  4Comments

tpucci picture tpucci  路  4Comments

agrosner picture agrosner  路  8Comments