UWP在InitializeComponent()崩溃[C ++] [英] UWP crashes at InitializeComponent() [C++]
问题描述
这是我在UWP工作时遇到的weirdes错误。当我运行代码检查一些新的更改时,我很高兴地工作。应用程序执行InitializeComponent()方法后,它崩溃了。我继续调试模式并尝试缩小
可能导致问题的原因。
InitializeComponent()函数看起来像这样:
void :: SDKTemplate :: Scenario3_DataBaseHandling :: InitializeComponent(){
if(_contentLoaded)
{
return;
}
_contentLoaded = true;
:: Windows :: Foundation :: Uri ^ resourceLocator = ref new :: Windows :: Foundation :: Uri(L" ms-appx:///Scenario3_DataBaseHandling.xaml");
:: Windows :: UI :: Xaml :: Application :: LoadComponent(this,resourceLocator,:: Windows :: UI :: Xaml :: Controls :: Primitives :: ComponentResourceLocation :: Application);
}
经过几次尝试后,我发现错误发生在执行最后一行之后:
嗨Carlos,
根据您的描述,您的问题更多相关开发通用Windows应用程序。这个论坛正在讨论并询问有关Windows窗体和ClickOnce的问题,我将把这个帖子移到相应的论坛:开发Universal
Windows应用论坛以获取专用信息。
感谢您的理解。
问候,
斯坦利
This is the weirdes error I've gotten so far while working on UWP. I was happily working when I ran my code to check some new changes. After the app executed the InitializeComponent() method it crashed. I went on the debugger mode and tried to narrow down what could be the cause of the problem.
The InitializeComponent() function looks like this:
void ::SDKTemplate::Scenario3_DataBaseHandling::InitializeComponent(){ if (_contentLoaded) { return; } _contentLoaded = true; ::Windows::Foundation::Uri^ resourceLocator = ref new ::Windows::Foundation::Uri(L"ms-appx:///Scenario3_DataBaseHandling.xaml"); ::Windows::UI::Xaml::Application::LoadComponent(this, resourceLocator, ::Windows::UI::Xaml::Controls::Primitives::ComponentResourceLocation::Application); }
After a few attempts I found that the error was coming after the last line was executed:
Hi Carlos,
According to your description, your issue is more related about Developing Universal Windows apps. And this forum is discussing and asking questions about the Windows Form and ClickOnce, I will move this thread to corresponding forum: Developing Universal Windows apps Forum for dedicated information.
Thank you for your understanding.
Regards,
Stanly
这篇关于UWP在InitializeComponent()崩溃[C ++]的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!