Visual studio Xamarin Forms Android应用程序无一例外地退出

Visual studio Xamarin Forms Android应用程序无一例外地退出,visual-studio,xamarin.forms,Visual Studio,Xamarin.forms,我现在遇到了一个问题,android应用程序无一例外地退出了。我设法把它追溯到这一行 PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); 我检查了所有的属性,它们看起来都很好,没有空值等等 我在调试输出中也发现了这一点: tid 9154中的致命信号6(SIGABRT),代码-6(SIU TKILL) 我在谷歌上搜索了这篇文章,在过去的两天里我尝试了各种各样的事情,比如更改编译器选项,但都没有用。

我现在遇到了一个问题,android应用程序无一例外地退出了。我设法把它追溯到这一行

PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
我检查了所有的属性,它们看起来都很好,没有空值等等

我在调试输出中也发现了这一点:

tid 9154中的致命信号6(SIGABRT),代码-6(SIU TKILL)

我在谷歌上搜索了这篇文章,在过去的两天里我尝试了各种各样的事情,比如更改编译器选项,但都没有用。有没有办法获得更详细的信息?我不熟悉Android的工作原理,所以如果有什么特别的,请详细解释

我正在使用:

VS2019社区(非预览版) XF:4.7.0.1351(尝试了最新的4.8.0.1451,但情况相同) Android:9.0 API 28

在模拟器上运行也尝试了实际设备

更新1(logcat剪报):

09-20 14:09:03.764   777   777 F         : Why are we setting the target on an unoccupied slot?
--------- beginning of crash
09-20 14:09:03.764   777   777 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 777, pid 777
09-20 14:09:03.790   852   852 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
09-20 14:09:03.790  1747  1747 I /system/bin/tombstoned: received crash request for pid 777
09-20 14:09:03.791   852   852 I crash_dump32: performing dump of process 777 (target tid = 777)
09-20 14:09:03.795   852   852 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-20 14:09:03.795   852   852 F DEBUG   : Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys'
09-20 14:09:03.795   852   852 F DEBUG   : Revision: '0'
09-20 14:09:03.795   852   852 F DEBUG   : ABI: 'x86'
09-20 14:09:03.795   852   852 F DEBUG   : pid: 777, tid: 777
09-20 14:09:03.795   852   852 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
09-20 14:09:03.795   852   852 F DEBUG   : Abort message: 'Why are we setting the target on an unoccupied slot?'
09-20 14:09:03.795   852   852 F DEBUG   :     eax 00000000  ebx 00000309  ecx 00000309  edx 00000006
09-20 14:09:03.796   852   852 F DEBUG   :     edi 00000309  esi c5462780
09-20 14:09:03.796   852   852 F DEBUG   :     ebp ffa9f6b8  esp ffa9f608  eip f66dfb39
09-20 14:09:03.796   852   852 F DEBUG   : 
09-20 14:09:03.796   852   852 F DEBUG   : backtrace:
09-20 14:09:03.796   852   852 F DEBUG   :     #00 pc 00000b39  [vdso:f66df000] (__kernel_vsyscall+9)
09-20 14:09:03.796   852   852 F DEBUG   :     #01 pc 0001fdf8  /system/lib/libc.so (syscall+40)
09-20 14:09:03.796   852   852 F DEBUG   :     #02 pc 00022ed3  /system/lib/libc.so (abort+115)
更新2:

09-20 14:09:03.764   777   777 F         : Why are we setting the target on an unoccupied slot?
--------- beginning of crash
09-20 14:09:03.764   777   777 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 777, pid 777
09-20 14:09:03.790   852   852 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
09-20 14:09:03.790  1747  1747 I /system/bin/tombstoned: received crash request for pid 777
09-20 14:09:03.791   852   852 I crash_dump32: performing dump of process 777 (target tid = 777)
09-20 14:09:03.795   852   852 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-20 14:09:03.795   852   852 F DEBUG   : Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys'
09-20 14:09:03.795   852   852 F DEBUG   : Revision: '0'
09-20 14:09:03.795   852   852 F DEBUG   : ABI: 'x86'
09-20 14:09:03.795   852   852 F DEBUG   : pid: 777, tid: 777
09-20 14:09:03.795   852   852 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
09-20 14:09:03.795   852   852 F DEBUG   : Abort message: 'Why are we setting the target on an unoccupied slot?'
09-20 14:09:03.795   852   852 F DEBUG   :     eax 00000000  ebx 00000309  ecx 00000309  edx 00000006
09-20 14:09:03.796   852   852 F DEBUG   :     edi 00000309  esi c5462780
09-20 14:09:03.796   852   852 F DEBUG   :     ebp ffa9f6b8  esp ffa9f608  eip f66dfb39
09-20 14:09:03.796   852   852 F DEBUG   : 
09-20 14:09:03.796   852   852 F DEBUG   : backtrace:
09-20 14:09:03.796   852   852 F DEBUG   :     #00 pc 00000b39  [vdso:f66df000] (__kernel_vsyscall+9)
09-20 14:09:03.796   852   852 F DEBUG   :     #01 pc 0001fdf8  /system/lib/libc.so (syscall+40)
09-20 14:09:03.796   852   852 F DEBUG   :     #02 pc 00022ed3  /system/lib/libc.so (abort+115)
正如我所说,当调用PropertyChanged方法时,它会毫无例外地崩溃

我使用调试器检查了PropertyChanged的属性。我有一个订阅服务器,即使它位于数据访问层的外部组件中

我删除了这个订户,看看这是否是问题所在,但没有,问题仍然存在

我再次检查了订阅服务器,现在它声明它位于名为OnPropertyChanged的Xamarin.Forms.Core.dll中

我不知道如何进一步调试这个

更新3:

09-20 14:09:03.764   777   777 F         : Why are we setting the target on an unoccupied slot?
--------- beginning of crash
09-20 14:09:03.764   777   777 F libc    : Fatal signal 6 (SIGABRT), code -6 (SI_TKILL) in tid 777, pid 777
09-20 14:09:03.790   852   852 I crash_dump32: obtaining output fd from tombstoned, type: kDebuggerdTombstone
09-20 14:09:03.790  1747  1747 I /system/bin/tombstoned: received crash request for pid 777
09-20 14:09:03.791   852   852 I crash_dump32: performing dump of process 777 (target tid = 777)
09-20 14:09:03.795   852   852 F DEBUG   : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
09-20 14:09:03.795   852   852 F DEBUG   : Build fingerprint: 'google/sdk_gphone_x86_arm/generic_x86_arm:9/PSR1.180720.117/5875966:user/release-keys'
09-20 14:09:03.795   852   852 F DEBUG   : Revision: '0'
09-20 14:09:03.795   852   852 F DEBUG   : ABI: 'x86'
09-20 14:09:03.795   852   852 F DEBUG   : pid: 777, tid: 777
09-20 14:09:03.795   852   852 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
09-20 14:09:03.795   852   852 F DEBUG   : Abort message: 'Why are we setting the target on an unoccupied slot?'
09-20 14:09:03.795   852   852 F DEBUG   :     eax 00000000  ebx 00000309  ecx 00000309  edx 00000006
09-20 14:09:03.796   852   852 F DEBUG   :     edi 00000309  esi c5462780
09-20 14:09:03.796   852   852 F DEBUG   :     ebp ffa9f6b8  esp ffa9f608  eip f66dfb39
09-20 14:09:03.796   852   852 F DEBUG   : 
09-20 14:09:03.796   852   852 F DEBUG   : backtrace:
09-20 14:09:03.796   852   852 F DEBUG   :     #00 pc 00000b39  [vdso:f66df000] (__kernel_vsyscall+9)
09-20 14:09:03.796   852   852 F DEBUG   :     #01 pc 0001fdf8  /system/lib/libc.so (syscall+40)
09-20 14:09:03.796   852   852 F DEBUG   :     #02 pc 00022ed3  /system/lib/libc.so (abort+115)
我创建了另一个项目,希望得到同样的行为,但不幸的是,我无法重现这个问题,但我确实注意到了一件事


我们可以清楚地看到我破碎的项目(第二张图片)中的目标是空的,你知道这是怎么发生的吗?

如果目标是空的,似乎没有什么区别,我不知道为什么一个项目是空的,而另一个项目不是空的

无论如何,经过数小时、数天的调试,问题是因为我正在使用Force.DeepCloner覆盖绑定对象的属性


我不确定为什么会发生这种情况,但这与绑定中如何使用对象有关。创建后,使用DeepCloner覆盖“this”会导致这些问题。

如果您注释掉该行,崩溃是否会停止?你试过用try/catch包装它吗?您是否尝试过使用appcenter.ms之类的崩溃报告工具?@Jason,是的,我尝试过try块,但它从未进入陷阱。我没有考虑过appcenter,因为对于一个不会进入商店的内部应用程序来说,它似乎有点过头了。我有一个logcat垃圾场,我浏览了一下,但看不到任何突出的东西。我会在几分钟内用剪报更新这个问题。“花了过去2天”-appcenter需要5分钟来设置和捕获崩溃信息。如果您不想,您不必在生产中使用它,但手头有这些数据,即使是内部应用程序,对于未来的问题也可能非常有用。@Jason,我在上面的转储中看到了中止消息,但我用谷歌搜索了它,它返回了一个结果,似乎是源。但我不知道这意味着什么。如果appcenter与我在logcat转储中得到的结果不同,我将设置appcenter。