Bug 53372 - Exception when screen is off.
Summary: Exception when screen is off.
Status: RESOLVED NORESPONSE
Alias: None
Product: Android
Classification: Xamarin
Component: General ()
Version: 7.1 (C9)
Hardware: PC Mac OS
: --- normal
Target Milestone: ---
Assignee: Jonathan Pryor
URL:
Depends on:
Blocks:
 
Reported: 2017-03-15 19:04 UTC by Shay
Modified: 2017-08-23 21:23 UTC (History)
3 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 Shay 2017-03-15 19:04:05 UTC
When uploading an app to my Android (Mogo G), when the screen is off, I get the following crash when I turn the screen on:

[Mono] DllImport attempting to load: '/system/lib/liblog.so'.
[Mono] DllImport loaded library '/system/lib/liblog.so'.
[Mono] DllImport searching in: '/system/lib/liblog.so' ('/system/lib/liblog.so').
[Mono] Searching for '__android_log_print'.
[Mono] Probing '__android_log_print'.
[Mono] Found as '__android_log_print'.
[MonoDroid] UNHANDLED EXCEPTION:
[Mono] [0xb9366348] hill climbing, change max number of threads 6
[MonoDroid] System.NullReferenceException: Object reference not set to an instance of an object.
[MonoDroid]   at Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00017] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\AppCompat\Platform.cs:198 
[MonoDroid]   at Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout (System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x0000e] in C:\BuildAgent3\work\ca3766cfc22354a1\Xamarin.Forms.Platform.Android\PlatformRenderer.cs:73 
[MonoDroid]   at Android.Views.ViewGroup.n_OnLayout_ZIIII (System.IntPtr jnienv, System.IntPtr native__this, System.Boolean changed, System.Int32 l, System.Int32 t, System.Int32 r, System.Int32 b) [0x00009] in /Users/builder/data/lanes/4009/9578cdcd/source/monodroid/src/Mono.Android/platforms/android-25/src/generated/Android.Views.ViewGroup.cs:3427 
[MonoDroid]   at (wrapper dynamic-method) System.Object:08b7363f-8650-40e2-92c9-f4fd37aa4273 (intptr,intptr,bool,int,int,int,int)
[Mono] Assembly Ref addref HockeySDK.AndroidBindings[0xb8627600] -> System[0xb870ea20]: 17
[art] JNI RegisterNativeMethods: attempt to register 0 native methods for android.runtime.JavaProxyThrowable


When I run the app when the screen is on, this never happens.
Comment 1 Shay 2017-03-15 19:07:25 UTC
Hockeyapp gives more details on this crash:

amarin caused by: android.runtime.JavaProxyThrowable: System.NullReferenceException: Object reference not set to an instance of an object.
Xamarin.Forms.Platform.Android.AppCompat.Platform.Xamarin.Forms.Platform.Android.IPlatformLayout.OnLayout(bool changed, int l, int t, int r, int b)
Xamarin.Forms.Platform.Android.PlatformRenderer.OnLayout(bool changed, int l, int t, int r, int b)
Android.Views.ViewGroup.n_OnLayout_ZIIII(IntPtr jnienv, IntPtr native__this, bool changed, int l, int t, int r, int b)Android.Views.ViewGroup.cs:3427
at (wrapper dynamic-method) System.Object:08b7363f-8650-40e2-92c9-f4fd37aa4273 (intptr,intptr,bool,int,int,int,int)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.n_onLayout(Native Method)
md5b60ffeb829f638581ab2bb9b1a7f4f3f.PlatformRenderer.onLayout()PlatformRenderer.java:63
android.view.View.layout()View.java:15689
android.view.ViewGroup.layout()ViewGroup.java:5040
android.widget.RelativeLayout.onLayout()RelativeLayout.java:1076
android.view.View.layout()View.java:15689
android.view.ViewGroup.layout()ViewGroup.java:5040
android.widget.FrameLayout.layoutChildren()FrameLayout.java:579
android.widget.FrameLayout.onLayout()FrameLayout.java:514
android.view.View.layout()View.java:15689
android.view.ViewGroup.layout()ViewGroup.java:5040
android.widget.LinearLayout.setChildFrame()LinearLayout.java:1703
android.widget.LinearLayout.layoutVertical()LinearLayout.java:1557
android.widget.LinearLayout.onLayout()LinearLayout.java:1466
android.view.View.layout()View.java:15689
android.view.ViewGroup.layout()ViewGroup.java:5040
android.widget.FrameLayout.layoutChildren()FrameLayout.java:579
android.widget.FrameLayout.onLayout()FrameLayout.java:514
android.view.View.layout()View.java:15689
android.view.ViewGroup.layout()ViewGroup.java:5040
android.view.ViewRootImpl.performLayout()ViewRootImpl.java:2116
android.view.ViewRootImpl.performTraversals()ViewRootImpl.java:1873
android.view.ViewRootImpl.doTraversal()ViewRootImpl.java:1084
android.view.ViewRootImpl$TraversalRunnable.run()ViewRootImpl.java:5990
android.view.Choreographer$CallbackRecord.run()Choreographer.java:767
android.view.Choreographer.doCallbacks()Choreographer.java:580
android.view.Choreographer.doFrame()Choreographer.java:550
android.view.Choreographer$FrameDisplayEventReceiver.run()Choreographer.java:753
android.os.Handler.handleCallback()Handler.java:739
android.os.Handler.dispatchMessage()Handler.java:95
android.os.Looper.loop()Looper.java:135
android.app.ActivityThread.main()ActivityThread.java:5343
java.lang.reflect.Method.invoke(Native Method)
java.lang.reflect.Method.invoke()Method.java:372
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run()ZygoteInit.java:905
com.android.internal.os.ZygoteInit.main()ZygoteInit.java:700
Comment 2 Adam Hartley [MSFT] 2017-06-29 10:11:28 UTC
Thank you for taking the time to submit the bug. We are unable to reproduce this issue. Please attach a reproduction to the bug by starting with a clean Xamarin.Android project and adding just the code necessary to demonstrate the issue. Also, does this issue happen with just your specific device / a specific version of Android?
Comment 3 Cody Beyer (MSFT) 2017-08-23 21:23:08 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!