gpt4 book ai didi

crash - 导航到新 View 时Windows Phone 8.1访问冲突

转载 作者:行者123 更新时间:2023-12-03 17:11:04 24 4
gpt4 key购买 nike

在没有任何堆栈跟踪的设备上运行时,Windows Phone 8.1应用程序中出现访问冲突问题。我找到了一个答案,可以调用调度程序进行导航,但是我不知道如何使用mvvmcross进行操作。请帮我。

Access Violation cause and solution from codeproject

在我的代码中,一切似乎都不错,也许是在ShowViewModel方法内部引起的。请帮我。

Select click enter 14:24:56.2863139  
mvx:Diagnostic: 5.99 Showing ViewModel PlayMantraViewModel
VM ctor enter 14:24:56.5572456
VM ctor leave 14:24:56.5572456
VM Init enter 14:24:56.5728871
VM init leave 14:24:56.5885270
appstate:Active
Select click leave 14:24:56.6041698
The program '[4028] Japam.WinPhone.exe' has exited with code
-1073741819 (0xc0000005) 'Access violation'.

我总共有3个 View ,导航到另一个 View 效果很好。
 ShowViewModel<PlayMantraViewModel>(new { mid = m.MantraID });

这就是我在 View 模型中所说的

最佳答案

我想通了,我需要使用调度程序

  this.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => {
ViewModel.MantraSelectedCommand.Execute(e.ClickedItem);
});

这很好。

关于crash - 导航到新 View 时Windows Phone 8.1访问冲突,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42895669/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com