Fixed
Status Update
Comments
al...@gmail.com <al...@gmail.com> #4
Actually, I just checked and it still crashes using 1.1.0-alpha02.
lp...@google.com <lp...@google.com>
lp...@google.com <lp...@google.com> #5
Could you maybe upload a simpler project with reproduction steps? Or at least provide reproduction steps for the project you linked - Does it crash when using Preference 1.0.0?
This still seems suspiciously similar tohttps://issuetracker.google.com/issues/120240628 , which can not be reproduced with 1.1.0-alpha02 (following the reproduction steps in the first comment).
This still seems suspiciously similar to
hp...@gmail.com <hp...@gmail.com> #6
Hi guys. I can also confirm that it still crashes using preferences 1.1.0-alpha02. I ran the barebones sample project included in https://issuetracker.google.com/issues/120240628 on a Samsung Galaxy J2 Prime running Android 6.0.1.
If I use 1.0.0 version, the NPE issue will not appear. If I use any of the 1.1.0 alphas with/without fragments 1.1.0-alpha02, the NPE issue is there. This issue also exists for MultiSelectListPreference.
If I use 1.0.0 version, the NPE issue will not appear. If I use any of the 1.1.0 alphas with/without fragments 1.1.0-alpha02, the NPE issue is there. This issue also exists for MultiSelectListPreference.
hp...@gmail.com <hp...@gmail.com> #7
I also ran it on a Samsung Galaxy J4+ running Android 8.1.0, and it is the same story. There is no NPE issue using preferences 1.0.0, but using any of the 1.1.0 alphas with/without fragments 1.1.0-alpha02 will cause the NPE.
lp...@google.com <lp...@google.com> #8
Thanks for the further details - it appears there are two similar issues here with Fragment - one has been fixed, but there is still one that exists, causing this bug.
Apologies for the inconvenience.
Apologies for the inconvenience.
lp...@google.com <lp...@google.com> #9
This has been fixed and will be available in an upcoming release.
lb...@gmail.com <lb...@gmail.com> #10
@9 Which one?
lp...@google.com <lp...@google.com> #11
Both the Fragment issues and a workaround in Preference library to prevent this from happening in the future will be released.
lb...@gmail.com <lb...@gmail.com> #12
@11 I mean in which version exactly should we expect it to happen? What would be in the gradle file?
lp...@google.com <lp...@google.com> #13
alpha03, which is yet to be released.
lb...@gmail.com <lb...@gmail.com> #14
@13 You mean :
implementation 'androidx.fragment:fragment:1.1.0-alpha03' ?
implementation 'androidx.fragment:fragment:1.1.0-alpha03' ?
lp...@google.com <lp...@google.com> #15
Oh I see - sorry.
The two fragment fixes will be available in androidx.fragment:fragment:1.1.0-alpha04
However, androidx.preference:preference:1.1.0-alpha03 will depend on fragment alpha04, so you only need to specify androidx.preference:preference:1.1.0-alpha03 to bring in these fixes and other changes in Preference.
The two fragment fixes will be available in androidx.fragment:fragment:1.1.0-alpha04
However, androidx.preference:preference:1.1.0-alpha03 will depend on fragment alpha04, so you only need to specify androidx.preference:preference:1.1.0-alpha03 to bring in these fixes and other changes in Preference.
lb...@gmail.com <lb...@gmail.com> #16
@15 Thank you
hp...@gmail.com <hp...@gmail.com> #17
nice! will test and provide feedback once the new versions are released. thanks!
hp...@gmail.com <hp...@gmail.com> #18
sorry for the late feedback. I am done testing androidx.preference:preference:1.1.0-alpha03, and the bug is no longer present. I ran the linked sample project above on three devices: Samsung Galaxy J2 Prime running Android 6.0.1, Samsung Galaxy J2 Pro running Android 7.1.1, and a Samsung Galaxy J4+ running Android 8.1.0.
thanks for the fix!
thanks for the fix!
lb...@gmail.com <lb...@gmail.com> #19
lp...@google.com <lp...@google.com> #20
Seems to be unrelated, will track that issue in that bug.
lb...@gmail.com <lb...@gmail.com> #21
@20 I see. Will there be a new version of those soon, to fix similar issues?
Description
2018-12-31 18:56:12.569 5471-5471/com.supercilex.robotscouter.debug E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.supercilex.robotscouter.debug, PID: 5471
java.lang.NullPointerException: Attempt to invoke interface method 'androidx.preference.Preference androidx.preference.DialogPreference$TargetFragment.findPreference(java.lang.CharSequence)' on a null object reference
at androidx.preference.PreferenceDialogFragmentCompat.getPreference(PreferenceDialogFragmentCompat.java:177)
at androidx.preference.ListPreferenceDialogFragmentCompat.getListPreference(ListPreferenceDialogFragmentCompat.java:76)
at androidx.preference.ListPreferenceDialogFragmentCompat.onDialogClosed(ListPreferenceDialogFragmentCompat.java:104)
at androidx.preference.PreferenceDialogFragmentCompat.onDismiss(PreferenceDialogFragmentCompat.java:267)
at android.app.Dialog$ListenersHandler.handleMessage(Dialog.java:1393)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:193)
at android.app.ActivityThread.main(ActivityThread.java:6680)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)