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

Bug when getting string resource #80

Closed
janheinrichmerker opened this issue May 24, 2017 · 4 comments
Closed

Bug when getting string resource #80

janheinrichmerker opened this issue May 24, 2017 · 4 comments

Comments

@janheinrichmerker
Copy link

Seems to be a framework bug but anyway I wanted to let you know:

Exception java.lang.RuntimeException: Unable to start activity ComponentInfo{eu.pinpong.equalizer/eu.pinpong.equalizer.ui.equalizer.EqualizerActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence android.content.res.StringBlock.get(int)' on a null object reference
  android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2728)
  android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2814)
  android.app.ActivityThread.-wrap12 (ActivityThread.java)
  android.app.ActivityThread$H.handleMessage (ActivityThread.java:1527)
  android.os.Handler.dispatchMessage (Handler.java:102)
  android.os.Looper.loop (Looper.java:154)
  android.app.ActivityThread.main (ActivityThread.java:6290)
  java.lang.reflect.Method.invoke (Method.java)
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:886)
  com.android.internal.os.ZygoteInit.main (ZygoteInit.java:776)
Caused by java.lang.NullPointerException: Attempt to invoke virtual method 'java.lang.CharSequence 
  android.content.res.StringBlock.get(int)' on a null object reference
  android.content.res.AssetManager.getResourceValue (AssetManager.java:222)
  android.content.res.ResourcesImpl.getValue (ResourcesImpl.java:186)
  android.content.res.Resources.loadXmlResourceParser (Resources.java:2101)
  android.content.res.Resources.getLayout (Resources.java:1115)
  android.support.v7.view.ActionBarPolicy.inflate (ActionBarPolicy.java:119)
  android.support.v7.widget.Toolbar.inflateMenu (Toolbar.java:1072)
  de.psdev.licensesdialog.model.Notices.j (Notices.java:257)
  de.psdev.licensesdialog.model.Notices.i (Notices.java:253)
  de.psdev.licensesdialog.model.Notices.a (Notices.java:176)
  de.psdev.licensesdialog.model.Notices.a (Notices.java:82)
  de.psdev.licensesdialog.licenses.ISCLicense.onViewCreated (ISCLicense.java:36)
  android.support.v4.app.FragmentHostCallback.a (FragmentHostCallback.java:1314)
  android.support.v4.app.FragmentHostCallback.d (FragmentHostCallback.java:1528)
  android.support.v4.app.FragmentHostCallback.a (FragmentHostCallback.java:1595)
  android.support.v4.app.BackStackRecord.executeOps (BackStackRecord.java:758)
  android.support.v4.app.FragmentHostCallback.b (FragmentHostCallback.java:2363)
  android.support.v4.app.FragmentHostCallback.a (FragmentHostCallback.java:2149)
  android.support.v4.app.FragmentHostCallback.b (FragmentHostCallback.java:2103)
  android.support.v4.app.FragmentHostCallback.d (FragmentHostCallback.java:2013)
  android.support.v4.app.FragmentActivity.n (FragmentActivity.java:388)
  android.support.v4.app.DialogFragment.onStart (DialogFragment.java:607)
  android.support.v4.widget.TextViewCompatJbMr1.onStart (TextViewCompatJbMr1.java:178)
  android.app.Instrumentation.callActivityOnStart (Instrumentation.java:1322)
  android.app.Activity.performStart (Activity.java:6777)
  android.app.ActivityThread.performLaunchActivity (ActivityThread.java:2691)
  android.app.ActivityThread.handleLaunchActivity (ActivityThread.java:2814)
  android.app.ActivityThread.-wrap12 (ActivityThread.java)
  android.app.ActivityThread$H.handleMessage (ActivityThread.java:1527)
  android.os.Handler.dispatchMessage (Handler.java:102)
  android.os.Looper.loop (Looper.java:154)
  android.app.ActivityThread.main (ActivityThread.java:6290)
  java.lang.reflect.Method.invoke (Method.java)
  com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:886)
  com.android.internal.os.ZygoteInit.main (ZygoteInit.java:776)

Bug was reported on a OnePlus ONEPLUS A3003 running Android 7.1.1.

@hameno
Copy link
Member

hameno commented May 25, 2017

I see you modified ISCLicense to include a onViewCreated method. This is likely a bug in your code, as all license objects as singletons and kept in a static map. You probably have a context leak somewhere and using a destroyed context.

@hameno hameno closed this as completed May 25, 2017
@janheinrichmerker
Copy link
Author

I didn't modify anything. Using library version 1.8.1. Maybe the specific user had something like Xposed on his phone that modified the code?

@hameno
Copy link
Member

hameno commented May 25, 2017

Hmm, that whole stacktrace looks weird, those linenumbers and method names do not match with that version. Are you sure, that you used the correct mapping file?

@janheinrichmerker
Copy link
Author

You're right, that might actually be the problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants