Bug 57766 - NullReference attempting to use BackAgentHelper to restore preferences
Summary: NullReference attempting to use BackAgentHelper to restore preferences
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.3 (15.2)
Hardware: PC Windows
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-06-26 16:43 UTC by Pete Schmitz
Modified: 2017-08-21 21:27 UTC (History)
2 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED NORESPONSE

Description Pete Schmitz 2017-06-26 16:43:53 UTC
We've implemented a BackupAgent in our app and have 17 different users that have encounter the stack trace mentioned below. Interestingly, the affected users are all on Android 5.1 with 'uncommon' devices:

Affected devices:

5065N - MetroPCS 5056N Fierce 4
Z828 - ZTE Avid Plus
C6740 - KYOCERA Hydro Wave
Coolpad 3320A
htc desire 625
z812
alcatel_4060a

I'd be happy to share the details of our implementation, please let me know.

Stack:


Java.Interop.JniEnvironmentAttempt to invoke interface method 'java.lang.String com.android.internal.backup.IBackupTransport.transportDirName()' on a null object reference
System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()<ef9d4a00d28b4477be4e1ed395160c13>:0
Java.Interop.JniEnvironment.InstanceMethods.CallIntMethod(JniObjectReference instance, JniMethodInfo method, JniArgumentValue* args)<b8a9d79ef0764724ba1535fbfe239920>:0
Java.Interop.JniPeerMembers.JniInstanceMethods.InvokeVirtualInt32Method(string encodedMember, IJavaPeerable self, JniArgumentValue* parameters)<b8a9d79ef0764724ba1535fbfe239920>:0
Android.App.Backup.BackupManager.RequestRestore(RestoreObserver observer)<b4ebb67199d843ed88f94b83743bf422>:0
iSurvey.Android.PreferenceHelper.RestorePreferences(Context context, Action callback)<6fc883847b7c48dcb0ed2d8fb0630fb9>:0
--- End of managed Java.Lang.RuntimeException stack trace ---
Attempt.transportDirName()
at android.os.Parcel.readException(Parcel.java:1552)
at android.os.Parcel.readException(Parcel.java:1499)
at android.app.backup.IRestoreSession$Stub$Proxy.restorePackage(IRestoreSession.java:244)
at android.app.backup.RestoreSession.restorePackage(RestoreSession.java:148)
at android.app.backup.BackupManager.requestRestore(BackupManager.java:151)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.NavigationRenderer.n_onAttachedToWindow(Native Method)
at md5b60ffeb829f638581ab2bb9b1a7f4f3f.NavigationRenderer.onAttachedToWindow(NavigationRenderer.java:47)
at android.view.View.dispatchAttachedToWindow(View.java:13533)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2689)
at android.view.ViewGroup.addViewInner(ViewGroup.java:3976)
at android.view.ViewGroup.addView(ViewGroup.java:3787)
at android.view.ViewGroup.addView(ViewGroup.java:3728)
at android.view.ViewGroup.addView(ViewGroup.java:3701)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.MasterDetailRenderer.n_onAttachedToWindow(Native Method)
at md5b60ffeb829f638581ab2bb9b1a7f4f3f.MasterDetailRenderer.onAttachedToWindow(MasterDetailRenderer.java:52)
at android.view.View.dispatchAttachedToWindow(View.java:13533)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2689)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2696)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2696)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2696)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2696)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:2696)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:1316)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1078)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:5947)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:773)
at android.view.Choreographer.doCallbacks(Choreographer.java:586)
at android.view.Choreographer.doFrame(Choreographer.java:556)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:759)
at android.os.Handler.handleCallback(Handler.java:739)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5333)
java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:940)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:735)
Comment 1 Jon Douglas [MSFT] 2017-07-07 16:14:37 UTC
Hi Pete,

To move forward with this bug, we will need a reproducible project that demonstrates this issue running on Android 5.1. You can upload a project that has the minimal amount of code that will reproduce this behavior. Once you've done that, I can move forward and test the Java equivalent to see if this behavior is on the Xamarin side or a behavior with Android itself.

Thanks for the report!
Comment 2 Jon Douglas [MSFT] 2017-08-21 21:27:19 UTC
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!