Launcher2 crash in bringing up Android Lollipop using arm64bits CPU

1,291 views
Skip to first unread message

Flora

unread,
Nov 6, 2014, 10:41:02 AM11/6/14
to android-...@googlegroups.com
Every thing is OK in bring up Android Lollipop,  you can see the top status bar, and bottom navigation bar, but Launcher2 always report unfortunately stoped

then use logcat you can see launcher stop for  FALTAL EXCEPTION

--------- beginning of crash
E/AndroidRuntime( 1775): FATAL EXCEPTION: main
E/AndroidRuntime( 1775): Process: com.android.launcher, PID: 1775
E/AndroidRuntime( 1775): java.lang.RuntimeException: Unable to get provider com.android.launcher2.LauncherProvider: java.lang.NullPointerException: Attempt to invoke interface method 'void com.android.internal.appwidget.IAppWidgee
E/AndroidRuntime( 1775):        at android.app.ActivityThread.installProvider(ActivityThread.java:4967)
E/AndroidRuntime( 1775):        at android.app.ActivityThread.installContentProviders(ActivityThread.java:4559)
E/AndroidRuntime( 1775):        at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4499)
E/AndroidRuntime( 1775):        at android.app.ActivityThread.access$1500(ActivityThread.java:144)
E/AndroidRuntime( 1775):        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)
E/AndroidRuntime( 1775):        at android.os.Handler.dispatchMessage(Handler.java:102)
E/AndroidRuntime( 1775):        at android.os.Looper.loop(Looper.java:135)
E/AndroidRuntime( 1775):        at android.app.ActivityThread.main(ActivityThread.java:5221)
E/AndroidRuntime( 1775):        at java.lang.reflect.Method.invoke(Native Method)
E/AndroidRuntime( 1775):        at java.lang.reflect.Method.invoke(Method.java:372)
E/AndroidRuntime( 1775):        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:899)
E/AndroidRuntime( 1775):        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:694)
E/AndroidRuntime( 1775): Caused by: java.lang.NullPointerException: Attempt to invoke interface method 'void com.android.internal.appwidget.IAppWidgetService.deleteHost(java.lang.String, int)' on a null object reference
E/AndroidRuntime( 1775):        at android.appwidget.AppWidgetHost.deleteHost(AppWidgetHost.java:283)
E/AndroidRuntime( 1775):        at com.android.launcher2.LauncherProvider$DatabaseHelper.onCreate(LauncherProvider.java:326)
E/AndroidRuntime( 1775):        at android.database.sqlite.SQLiteOpenHelper.getDatabaseLocked(SQLiteOpenHelper.java:251)
E/AndroidRuntime( 1775):        at android.database.sqlite.SQLiteOpenHelper.getWritableDatabase(SQLiteOpenHelper.java:163)
E/AndroidRuntime( 1775):        at com.android.launcher2.LauncherProvider$DatabaseHelper.<init>(LauncherProvider.java:276)
E/AndroidRuntime( 1775):        at com.android.launcher2.LauncherProvider.onCreate(LauncherProvider.java:97)
E/AndroidRuntime( 1775):        at android.content.ContentProvider.attachInfo(ContentProvider.java:1686)
E/AndroidRuntime( 1775):        at android.content.ContentProvider.attachInfo(ContentProvider.java:1655)
E/AndroidRuntime( 1775):        at android.app.ActivityThread.installProvider(ActivityThread.java:4964)
E/AndroidRuntime( 1775):        ... 11 more 
W/ActivityManager( 1059):   Force finishing activity com.android.launcher/com.android.launcher2.Launcher
I/OpenGLRenderer( 1059): Initialized EGL, version 1.4 
W/ActivityManager( 1059): Activity pause timeout for ActivityRecord{2dbaa1b4 u0 com.android.launcher/com.android.launcher2.Launcher t2 f}
I/ActivityManager( 1059): START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10000000 cmp=com.android.launcher/com.android.launcher2.Launcher} from uid 0 on dis
play 0 
I/MediaFocusControl( 1059):  AudioFocus  abandonAudioFocus() from android.media...@35796cc8com.android.music.MediaPlaybackService$3@2e887161
I/ActivityManager( 1059): Start proc com.android.musicfx for broadcast com.android.musicfx/.ControlPanelReceiver: pid=1802 uid=10012 gids={50012, 9997, 3003, 3002} abi=arm64-v8a
W/SchedPolicy( 1059): add_tid_to_cgroup failed to write '1802' (Permission denied); policy=0
W/ActivityManager( 1059): Failed setting process group of 1802 to 0

Have anyone know this issue or met the same issue ? 

and another question normally default, should we use Launcher3 or Launcher2?  From the Android.mk,  LOCAL_OVERRIDES_PACKAGES := Launcher2,  Launcher3 should replace Launcher2 


Amit Pundir

unread,
Nov 6, 2014, 2:56:01 PM11/6/14
to android-...@googlegroups.com
Yeah you are not alone on this one. I see this crash as well on an
arm64_arm multilib build.

Are you using any platform specific graphics libraries or are you
using software renderer (libGLES_android) like me? I've been told that
arm only builds are also crashing with a similar dump but those builds
are also using s/w rendering so it could be because of that. I
couldn't link this crash with s/w renderer so far.

>
> and another question normally default, should we use Launcher3 or Launcher2? From the Android.mk, LOCAL_OVERRIDES_PACKAGES := Launcher2, Launcher3 should replace Launcher2

By default AOSP doesn't even build Launcher3, see
build/target/product/core.mk +42. Add Launcher3 in your
PRODUCT_PACKAGES list for build and then it should replace Launcher2
as your default Launcher. Anyway I tried that and Launcher3 is
crashing with the same error.

Regards,
Amit Pundir

>
>
> --
> --
> You received this message because you are subscribed to the "Android Building" mailing list.
> To post to this group, send email to android-...@googlegroups.com
> To unsubscribe from this group, send email to
> android-buildi...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/android-building?hl=en
>
> ---
> You received this message because you are subscribed to the Google Groups "Android Building" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to android-buildi...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Amit Pundir

unread,
Nov 6, 2014, 6:24:36 PM11/6/14
to android-...@googlegroups.com, andro...@googlegroups.com
On 7 November 2014 02:49, Amit Pundir <amit....@linaro.org> wrote:
> + andro...@googlegroups.com
>
> Hi, Any clue on what could have possibly gone wrong here?
>

Nevermind. I found this in device/asus/fugu/device.mk:
----------8<----------
# Need AppWidget permission to prevent from Launcher's crash.
PRODUCT_COPY_FILES += \
frameworks/native/data/etc/android.software.app_widgets.xml:system/etc/permissions/android.software.app_widgets.xml
----------8<----------
And it worked for me as well. yay!!

> Regards,
> Amit Pundir

Amit Pundir

unread,
Nov 6, 2014, 6:24:36 PM11/6/14
to android-...@googlegroups.com, andro...@googlegroups.com
+ andro...@googlegroups.com

Hi, Any clue on what could have possibly gone wrong here?

Regards,
Amit Pundir

On 7 November 2014 01:05, Amit Pundir <amit....@linaro.org> wrote:

Flora

unread,
Nov 6, 2014, 9:47:01 PM11/6/14
to android-...@googlegroups.com, andro...@googlegroups.com
I'm using hw rendering (libGLES_mali.so)  

your following method also works for me, it works well now, LOL,  thanks very much! 


在 2014年11月7日星期五UTC+8上午7时24分36秒,Amit Pundir写道:
>>> I/MediaFocusControl( 1059):  AudioFocus  abandonAudioFocus() from android.media.AudioManager@35796cc8com.android.music.MediaPlaybackService$3@2e887161

UyVan

unread,
Nov 11, 2014, 7:37:18 PM11/11/14
to android-...@googlegroups.com
Hi Amit Pundir,

I want to use libGLES_android for my board but SurfaceFlinger nerver load it up. i've tried lot of configuration but it still not load. Can you see which configuration i missed with following logcat.

I/DEBUG   ( 2165): Revision: '0'
I/DEBUG   ( 2165): ABI: 'arm64'
I/DEBUG   ( 2165): pid: 9054, tid: 9054, name: surfaceflinger  >>> /system/bin/surfaceflinger <<<
I/DEBUG   ( 2165): signal 5 (SIGTRAP), code 1 (TRAP_BRKPT), fault addr 0x3e80000235e
I/DEBUG   ( 2165): Abort message: 'couldn't find an OpenGL ES implementation'
I/DEBUG   ( 2165):     x0   0000000000000032  x1   4e9c0b1f51c5be09  x2   0000000000000006  x3   0000000000000070
I/DEBUG   ( 2165):     x4   000000000000003d  x5   0000000000000032  x6   0000007ffffff1b5  x7   0000000000000001
I/DEBUG   ( 2165):     x8   0000000000000042  x9   0000000000000002  x10  0000007ffffff1b8  x11  0000000000000008
I/DEBUG   ( 2165):     x12  0000000000000032  x13  0000007ffffff20c  x14  0000007ffffff248  x15  0000007ffffff160
I/DEBUG   ( 2165):     x16  0000007fb7e2fae0  x17  0000007fb7f4b4cc  x18  0000007ffffff2f8  x19  0000007ffffff2f8
I/DEBUG   ( 2165):     x20  0000007fb7bcbbf8  x21  0000000000000000  x22  0000007fb7703070  x23  0000000000000000
I/DEBUG   ( 2165):     x24  0000007ffffff9b8  x25  0000000000000000  x26  0000007fb7c553f0  x27  0000000000000000
I/DEBUG   ( 2165):     x28  0000000000000000  x29  0000007ffffff270  x30  0000007fb7e1904c
I/DEBUG   ( 2165):     sp   0000007ffffff270  pc   0000007fb7e1904c  pstate 0000000060000000
I/DEBUG   ( 2165):
I/DEBUG   ( 2165): backtrace:
I/DEBUG   ( 2165):     #00 pc 000000000000c04c  /system/lib64/libcutils.so (__android_log_assert+236)
I/DEBUG   ( 2165):     #01 pc 0000000000063a94  /system/lib64/libEGL.so
I/DEBUG   ( 2165):     #02 pc 000000000001daac  /system/lib64/libEGL.so
I/DEBUG   ( 2165):     #03 pc 000000000001eb90  /system/lib64/libEGL.so (eglGetDisplay+24)
I/DEBUG   ( 2165):     #04 pc 000000000002b110  /system/lib64/libsurfaceflinger.so (android::SurfaceFlinger::init()+108)
I/DEBUG   ( 2165):     #05 pc 0000000000000c70  /system/bin/surfaceflinger (main+160)
I/DEBUG   ( 2165):     #06 pc 00000000000196d4  /system/lib64/libc.so (__libc_init+100)
I/DEBUG   ( 2165):     #07 pc 0000000000000db0  /system/bin/surfaceflinger
F/libc    ( 9057): Fatal signal 6 (SIGABRT), code -6 in tid 9057 (main)
F/libc    ( 9223): Fatal signal 5 (SIGTRAP), code 1 in tid 9223 (surfaceflinger)
I/DEBUG   ( 2165): *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


libGLES_android already in system/lib/egl
 # ls /system/lib/egl/
egl.cfg
libGLES_android.so


Thanks
Uy

UyVan

unread,
Nov 11, 2014, 9:28:09 PM11/11/14
to android-...@googlegroups.com
After I set
setprop ro.kernel.qemu 1 
setprop ro.kernel.qemu.gles 0

the libGLES_android.so can load, but falled into another issue.

I/SurfaceFlinger( 4334): SurfaceFlinger is starting
I/SurfaceFlinger( 4334): SurfaceFlinger's main thread ready to run. Initializing graphics H/W...
D/libEGL  ( 4334): Emulator without GPU support detected. Fallback to software renderer.
D/libEGL  ( 4334): loaded /system/lib64/egl/libGLES_android.so
W/gralloc ( 4334): FBIOPUT_VSCREENINFO failed, page flipping not supported
W/gralloc ( 4334): page flipping not supported (yres_virtual=1080, requested=2160)
I/gralloc ( 4334): using (fd=9)
I/gralloc ( 4334): id           = nouveaufb
I/gralloc ( 4334): xres         = 1920 px
I/gralloc ( 4334): yres         = 1080 px
I/gralloc ( 4334): xres_virtual = 1920 px
I/gralloc ( 4334): yres_virtual = 1080 px
I/gralloc ( 4334): bpp          = 32
I/gralloc ( 4334): r            = 16:8
I/gralloc ( 4334): g            =  8:8
I/gralloc ( 4334): b            =  0:8
I/gralloc ( 4334): width        = 305 mm (159.895081 dpi)
I/gralloc ( 4334): height       = 171 mm (160.421051 dpi)
I/gralloc ( 4334): refresh rate = 60.00 Hz
E/SurfaceFlinger( 4334): hwcomposer module not found
W/SurfaceFlinger( 4334): getting VSYNC period from fb HAL: 16666666
W/SurfaceFlinger( 4334): no suitable EGLConfig found, trying a simpler query
F/SurfaceFlinger( 4334): no suitable EGLConfig found, giving up

----------
Any help are appreciated.

Thanks 
Uy

Amit Pundir

unread,
Nov 12, 2014, 10:53:05 AM11/12/14
to android-...@googlegroups.com
There it is "no Suitable EGLConfig found". I have not seen
libGLES_android supporting a 32bpp EGLConfig out of the box ever.
Easiest thing to do here is to configure your Fb mode from 32bpp to
16bppp and that will work for sure. You can also try adding or editing
any existing 32bpp EGLConfig based on your Fb configuration.

Regards,
Amit Pundir

UyVan

unread,
Nov 13, 2014, 12:38:35 AM11/13/14
to android-...@googlegroups.com
Thanks Amit Pundir,

it worked after change FBMode to 16bpp.

Thank you very much
Uy Van
Reply all
Reply to author
Forward
0 new messages