Skip to content

Instantly share code, notes, and snippets.

@tylerjroach
Created January 19, 2015 16:23
Show Gist options
  • Save tylerjroach/1e9ae93ceb08a14188a1 to your computer and use it in GitHub Desktop.
Save tylerjroach/1e9ae93ceb08a14188a1 to your computer and use it in GitHub Desktop.
OnePlus One Progress Dialog Issue
The OnePlus One phone is currently broken for Stre.am using the default "Hexo" theme. This is due to crashes anytime progressDialog.show() or dialog.show() is called. I can assure you the dialogs are being properly created as it works on every other phone, as well as using a different theme than "Hexo" on the OnePlus One. I'm not sure where the root cause lies. I actually extracted out the "Hexo" theme from the OnePlus One and placed it on a CM11 Galaxy S3 and it didn't cause any crashes.
I tried to build a test app to replicate the issue, but I am unable to. The only thing I think could be the cause would be that we are using Multidex due to many large multimedia libraries in our app. I wouldn't think this would cause an issue, but this may be something to investigate. I found other people were having an issue here:
https://github.com/WhisperSystems/RedPhone/issues/332
Here are some stacktraces that I've pulled.
//Caused from a progress dialog
android.view.InflateException: Binary XML file line #38: Error inflating class <unknown>
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
at android.view.LayoutInflater.onCreateView(LayoutInflater.java:669)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:694)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at android.app.ProgressDialog.onCreate(ProgressDialog.java:164)
at android.app.Dialog.dispatchOnCreate(Dialog.java:361)
at android.app.Dialog.show(Dialog.java:262)
at com.sparc.stream.Login.Activity.SignInEmailFragment.handleSubmitButtonClick(SignInEmailFragment.java:105)
at com.sparc.stream.Login.Activity.SignInEmailFragment.access$200(SignInEmailFragment.java:45)
at com.sparc.stream.Login.Activity.SignInEmailFragment$SubmitButtonListener.onClick(SignInEmailFragment.java:133)
at android.view.View.performClick(View.java:4445)
at android.view.View$PerformClick.run(View.java:18446)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:594)
... 25 more
Caused by: java.lang.IndexOutOfBoundsException
at android.content.res.StringBlock.nativeGetString(Native Method)
at android.content.res.StringBlock.get(StringBlock.java:82)
at android.content.res.AssetManager.getPooledString(AssetManager.java:294)
at android.content.res.TypedArray.loadStringValueAt(TypedArray.java:727)
at android.content.res.TypedArray.getString(TypedArray.java:125)
at android.widget.TextView.<init>(TextView.java:701)
at android.widget.TextView.<init>(TextView.java:618)
... 28 more
//Caused from a dialog
android.view.InflateException: Binary XML file line #51: Error inflating class com.android.internal.widget.DialogTitle
at android.view.LayoutInflater.createView(LayoutInflater.java:620)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:696)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:755)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
at android.view.LayoutInflater.inflate(LayoutInflater.java:397)
at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:343)
at com.android.internal.app.AlertController.installContent(AlertController.java:240)
at android.app.AlertDialog.onCreate(AlertDialog.java:337)
at android.app.Dialog.dispatchOnCreate(Dialog.java:361)
at android.app.Dialog.show(Dialog.java:262)
at com.sparc.stream.Profile.ProfileFragment.onOptionsItemSelected(ProfileFragment.java:1017)
at android.support.v4.app.Fragment.performOptionsItemSelected(Fragment.java:1894)
at android.support.v4.app.FragmentManagerImpl.dispatchOptionsItemSelected(FragmentManager.java:2034)
at android.support.v4.app.FragmentActivity.onMenuItemSelected(FragmentActivity.java:356)
at android.support.v7.app.ActionBarActivity.onMenuItemSelected(ActionBarActivity.java:155)
at android.support.v7.app.ActionBarActivityDelegate$1.onMenuItemSelected(ActionBarActivityDelegate.java:74)
at android.support.v7.widget.WindowCallbackWrapper.onMenuItemSelected(WindowCallbackWrapper.java:44)
at android.support.v7.internal.app.ToolbarActionBar$2.onMenuItemClick(ToolbarActionBar.java:77)
at android.support.v7.widget.Toolbar$1.onMenuItemClick(Toolbar.java:163)
at android.support.v7.widget.ActionMenuView$MenuBuilderCallback.onMenuItemSelected(ActionMenuView.java:738)
at android.support.v7.internal.view.menu.MenuBuilder.dispatchMenuItemSelected(MenuBuilder.java:802)
at android.support.v7.internal.view.menu.MenuItemImpl.invoke(MenuItemImpl.java:153)
at android.support.v7.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:949)
at android.support.v7.internal.view.menu.MenuBuilder.performItemAction(MenuBuilder.java:939)
at android.support.v7.internal.view.menu.MenuPopupHelper.onItemClick(MenuPopupHelper.java:187)
at android.widget.AdapterView.performItemClick(AdapterView.java:298)
at android.widget.AbsListView.performItemClick(AbsListView.java:1113)
at android.widget.AbsListView$PerformClick.run(AbsListView.java:2911)
at android.widget.AbsListView$3.run(AbsListView.java:3645)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5146)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:796)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:612)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
at java.lang.reflect.Constructor.constructNative(Native Method)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at android.view.LayoutInflater.createView(LayoutInflater.java:594)
... 40 more
Caused by: java.lang.IndexOutOfBoundsException
at android.content.res.StringBlock.nativeGetString(Native Method)
at android.content.res.StringBlock.get(StringBlock.java:82)
at android.content.res.AssetManager.getPooledString(AssetManager.java:294)
at android.content.res.TypedArray.loadStringValueAt(TypedArray.java:727)
at android.content.res.TypedArray.getString(TypedArray.java:125)
at android.widget.TextView.<init>(TextView.java:701)
at android.widget.TextView.<init>(TextView.java:618)
at com.android.internal.widget.DialogTitle.<init>(DialogTitle.java:38)
... 43 more
@tylerjroach
Copy link
Author

You can download the app here:
https://play.google.com/store/apps/details?id=com.sparc.stream&hl=en

The crash can be replicated by creating an account or logging in. The crashes occur where dialog.show() is called.

@mehulmpt
Copy link

mehulmpt commented Mar 7, 2017

I can confirm this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment