Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zz_moto_actionbar_bkg.xml resource error on Droid

I am getting strange crash reports from Droid X and Droid Pro.

android.content.res.Resources$NotFoundException:
File res/drawable/zz_moto_actionbar_bkg.xml from drawable resource ID #0x10803a8
    at android.content.res.Resources.loadDrawable(Resources.java:1735)
    at android.content.res.Resources.getDrawable(Resources.java:596)
    at android.view.View.setBackgroundResource(View.java:7542)
    at com.android.internal.app.AlertController.setBackground(AlertController.java:719)
    at com.android.internal.app.AlertController.setupView(AlertController.java:424)
    at com.android.internal.app.AlertController.installContent(AlertController.java:232)
    at android.app.AlertDialog.onCreate(AlertDialog.java:251)
    at android.app.Dialog.dispatchOnCreate(Dialog.java:307)
    at android.app.Dialog.show(Dialog.java:225)
    at android.app.AlertDialog$Builder.show(AlertDialog.java:802)
    at com.*******.a(SourceFile:320)
    at com.*******.onOptionsItemSelected(SourceFile:292)
    at android.app.Activity.onMenuItemSelected(Activity.java:2251)
    at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:809)
    at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:143)
    at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855)
    at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:553)
    at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
    at android.view.View$PerformClick.run(View.java:9089)
    at android.os.Handler.handleCallback(Handler.java:587)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:3806)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.NullPointerException
    at android.graphics.drawable.LayerDrawable.addLayer(LayerDrawable.java:186)
    at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:157)
    at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:795)
    at android.graphics.drawable.Drawable.createFromXml(Drawable.java:736)
    at android.content.res.Resources.loadDrawable(Resources.java:1732)
    ... 27 more
java.lang.NullPointerException
    at android.graphics.drawable.LayerDrawable.addLayer(LayerDrawable.java:186)
    at android.graphics.drawable.LayerDrawable.inflate(LayerDrawable.java:157)
    at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:795)
    at android.graphics.drawable.Drawable.createFromXml(Drawable.java:736)
    at android.content.res.Resources.loadDrawable(Resources.java:1732)
    at android.content.res.Resources.getDrawable(Resources.java:596)
    at android.view.View.setBackgroundResource(View.java:7542)
    at com.android.internal.app.AlertController.setBackground(AlertController.java:719)
    at com.android.internal.app.AlertController.setupView(AlertController.java:424)
    at com.android.internal.app.AlertController.installContent(AlertController.java:232)
    at android.app.AlertDialog.onCreate(AlertDialog.java:251)
    at android.app.Dialog.dispatchOnCreate(Dialog.java:307)
    at android.app.Dialog.show(Dialog.java:225)
    at android.app.AlertDialog$Builder.show(AlertDialog.java:802)
    at com.*******.a(SourceFile:320)
    at com.*******.onOptionsItemSelected(SourceFile:292)
    at android.app.Activity.onMenuItemSelected(Activity.java:2251)
    at com.android.internal.policy.impl.PhoneWindow.onMenuItemSelected(PhoneWindow.java:809)
    at com.android.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:143)
    at com.android.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:855)
    at com.android.internal.view.menu.IconMenuView.invokeItem(IconMenuView.java:553)
    at com.android.internal.view.menu.IconMenuItemView.performClick(IconMenuItemView.java:122)
    at android.view.View$PerformClick.run(View.java:9089)
    at android.os.Handler.handleCallback(Handler.java:587)
    at android.os.Handler.dispatchMessage(Handler.java:92)
    at android.os.Looper.loop(Looper.java:123)
    at android.app.ActivityThread.main(ActivityThread.java:3806)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:507)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
    at dalvik.system.NativeStart.main(Native Method)

It happens when launching an alert dialog. Of course I am not using any resource like that, and Only resource I am using on AlertDialog is android.R.drawable.ic_input_add.

I tried some search on this, but the only relevant page I found was https://supportforums.motorola.com/message/513190 and it does not help much.

Have anyone else had a similar problem or found a solution for this?

like image 550
dasony Avatar asked Dec 21 '11 04:12

dasony


2 Answers

We hit this same bug and, at least in our case, it turned out to be due to running out of memory while an image associated with that layout was being loaded. The layout itself seems to be some skinning stuff Motorola is doing for the alert dialog (my assumption). The only way I found out it was an OutOfMemoryError is that our QA tester generated an adb bugreport when he hit the crash and I could see the OutOfMemoryError in the bugreport caused while attempting to decode an image (on the same thread on which the stack trace was generated).

like image 79
stuckj Avatar answered Nov 19 '22 18:11

stuckj


Motorola phones are so annoying and sometimes can be spainful. I used to have current location icon not showing up on the google map only with motorola phones. They fixed the issue on ICS upgrade so all the efforts and time I spent to figure out the problem went to trash. And now I'm having this exactly the same issue with some users when alert dialog is opened. And the worst part is I can't reproduce this with the same phone, the same OS the user reported the bug.

like image 32
KoreanDude Avatar answered Nov 19 '22 19:11

KoreanDude