Xamarin.Forms-MONO_GC_PARAMS = bridge-implementation = old-如何确定它是否在Windows上运行? [英] Xamarin.Forms - MONO_GC_PARAMS=bridge-implementation=old - how to tell if it's working on Windows?

查看:109
本文介绍了Xamarin.Forms-MONO_GC_PARAMS = bridge-implementation = old-如何确定它是否在Windows上运行?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在定期在bugzilla.xamarin.com上看到这种神秘的异常.大多数帖子建议您可以通过设置环境变量将网桥实现更改为旧版本而不是Tarjan来抑制该错误:

I'm seeing this cryptic exception that's been documented on bugzilla.xamarin.com periodically. Most of the posts suggest you can suppress the error by changing the bridge implementation to the Old version instead of Tarjan by setting an environment variable:

MONO_GC_PARAMS =桥实现=旧

MONO_GC_PARAMS=bridge-implementation=old

我设置了变量,但是我在logcat中没有看到任何内容,也没有建立输出来表明它正在使用一个网桥或另一个网桥,但是我仍然遇到异常.有没有办法知道正在使用哪种实现?

I set the variable, but I don't see anything in my logcat or build output to indicate it's using one bridge or the other, and I'm still getting the exception. Is there a way to tell which implementation is being used?

这是堆栈跟踪-非常感谢任何建议.

Here's the stack trace - any suggestions are greatly appreciated.

 Process: com.icon.iconsurvey, PID: 11543
 android.runtime.JavaProxyThrowable: System.ArgumentException: Handle must be valid.
 Parameter name: instance
   at Java.Interop.JniEnvironment+InstanceMethods.CallNonvirtualVoidMethod (Java.Interop.JniObjectReference instance, Java.Interop.JniObjectReference type, Java.Interop.JniMethodInfo method, Java.Interop.JniArgumentValue* args) [0x00009] in <7cfbebb561c54efc9010b018c0846c7e>:0 
   at Android.Runtime.JNIEnv.CallNonvirtualVoidMethod (System.IntPtr jobject, System.IntPtr jclass, System.IntPtr jmethod, Android.Runtime.JValue* parms) [0x00015] in <e975227ac8644a30bb0866117325de0d>:0 
   at Android.Support.V4.Widget.DrawerLayout.RemoveDrawerListener (Android.Support.V4.Widget.DrawerLayout+IDrawerListener listener) [0x00088] in <fc4222de5c684a9abf7cc4821baac4cd>:0 
   at Xamarin.Forms.Platform.Android.AppCompat.NavigationPageRenderer.Dispose (System.Boolean disposing) [0x000e4] in <b5b1173f4d49442b898c45e26ae39e48>:0 
   at Java.Lang.Object.Dispose () [0x00000] in <e975227ac8644a30bb0866117325de0d>:0 
   at Xamarin.Forms.Platform.Android.AppCompat.Platform+<>c__DisplayClass35_0.<SetPage>b__0 () [0x00015] in <b5b1173f4d49442b898c45e26ae39e48>:0 
   at Java.Lang.Thread+RunnableImplementor.Run () [0x00008] in <e975227ac8644a30bb0866117325de0d>:0 
   at Java.Lang.IRunnableInvoker.n_Run (System.IntPtr jnienv, System.IntPtr native__this) [0x00008] in <e975227ac8644a30bb0866117325de0d>:0 
     at (wrapper dynamic-method) System.Object:1d7dae73-d3c1-4d29-aa82-708ecaa93ad1 (intptr,intptr)
     at mono.java.lang.RunnableImplementor.n_run(Native Method)
     at mono.java.lang.RunnableImplementor.run(RunnableImplementor.java:30)
     at android.os.Handler.handleCallback(Handler.java:739)
     at android.os.Handler.dispatchMessage(Handler.java:95)
     at android.os.Looper.loop(Looper.java:145)
     at android.app.ActivityThread.main(ActivityThread.java:6939)
     at 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:1404)
     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1199)

推荐答案

将默认的GC Bridge更改为tarjan时,当前建议使用的是new而不是old.在Mono 4.6中更改为tarjan之前,可能已被告知您使用技术上为new的旧"默认值:

The current suggestion is using new rather than old when changing the default GC Bridge away from tarjan. You may have been told to use the "old" default which was technically new before changing to tarjan in Mono 4.6:

您可以通过检查项目的Diagnostic Build Output来查看是否已将其拾取.

You can see if this is being picked up by checking the Diagnostic Build Output of your project.

https://developer.xamarin.com/guides/android/故障排除/故障排除/#Diagnostic_MSBuild_Output

然后,您将确保使用相应的参数拾取配置文件.

You would then look to ensure the configuration file is picked up with the respective arguments.

这篇关于Xamarin.Forms-MONO_GC_PARAMS = bridge-implementation = old-如何确定它是否在Windows上运行?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆