Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

StackOverflowError on Android

$
0
0

The same application works fine on Windows Phone, but throws error on Android.

Stack overflow on call to interp (req=68 top=0x56c51000 cur=0x56c4d33c size=16384 Ljava/lang/ref/FinalizerReference;.add)
threadid=1: stack overflow on call to Ljava/lang/ref/FinalizerReference;.add:VL
 UNHANDLED EXCEPTION:
 Java.Lang.StackOverflowError: Exception of type 'Java.Lang.StackOverflowError' was thrown.
 at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw () <IL 0x00011, 0x00078>
 at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (intptr,intptr,intptr,Android.Runtime.JValue*) <IL 0x0008a, 0x0034f>
 at Android.Views.View.Draw (Android.Graphics.Canvas) <IL 0x00092, 0x003d3>
 at Xamarin.Forms.Platform.Android.ScrollViewRenderer.Draw (Android.Graphics.Canvas) <IL 0x0000f, 0x000af>
    at android.util.Synchroni08-13 12:45:04.726 I/MonoDroid(19764): at Android.Views.View.n_Draw_Landroid_graphics_Canvas_ (intptr,intptr,intptr) <IL 0x00013, 0x000ef>
at (wrapper dynamic-method) object.352bcf4b-875e-4ceb-abab-c504c1ec3d50 (intptr,intptr,intptr) <IL 0x00017, 0x00043>
  --- End of managed exception stack trace ---
java.lang.StackOverflowError
    at android.graphics.Canvas$CanvasFinalizer.<init>(Canvas.java:94)
    at android.graphics.Canvas.<init>(Canvas.java:119)
    at android.view.HardwareCanvas.<init>(HardwareCanvas.java:29)
    at android.view.GLES20Canvas.<init>(GLES20Canvas.java:102)
    at android.view.GLES20RecordingCanvas.<init>(GLES20RecordingCanvas.java:62)
    at android.view.GLES20RecordingCanvas.<init>(GLES20RecordingCanvas.java:38)

This code works.

var lblName = new Label {TextColor = Color.FromHex("7F7E7E")};

This code throws exception.

var lblName = new Label {TextColor = Color.FromHex("7F7E7E")};
lblName.Text = "123";

This label is located in the ListView.ItemTemplate


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>